mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-14 04:03:51 +02:00
Embedded string view in watch window, series watch format
This commit is contained in:
parent
c925d7ccc2
commit
1b9e0490f2
13 changed files with 521 additions and 116 deletions
|
@ -531,10 +531,23 @@ namespace Beefy.theme.dark
|
|||
}
|
||||
}
|
||||
|
||||
var darkListView = mListView as DarkListView;
|
||||
float height = darkListView.mFont.GetLineSpacing();
|
||||
|
||||
uint32 color = Focused ? mFocusColor : mSelectColor;
|
||||
using (g.PushColor(color))
|
||||
g.DrawButton(DarkTheme.sDarkTheme.GetImage(Focused ? DarkTheme.ImageIdx.MenuSelect : DarkTheme.ImageIdx.MenuNonFocusSelect),
|
||||
hiliteX, 0, Math.Max(lastStrWidth + GS!(16), mWidth - GS!(4) - hiliteX));
|
||||
{
|
||||
if (Math.Abs(height - mSelfHeight) < height * 0.5f)
|
||||
{
|
||||
g.DrawButton(DarkTheme.sDarkTheme.GetImage(Focused ? DarkTheme.ImageIdx.MenuSelect : DarkTheme.ImageIdx.MenuNonFocusSelect),
|
||||
hiliteX, 0, Math.Max(lastStrWidth + GS!(16), mWidth - GS!(4) - hiliteX));
|
||||
}
|
||||
else
|
||||
{
|
||||
g.DrawBox(DarkTheme.sDarkTheme.GetImage(Focused ? DarkTheme.ImageIdx.MenuSelect : DarkTheme.ImageIdx.MenuNonFocusSelect),
|
||||
hiliteX, 0, Math.Max(lastStrWidth + GS!(16), mWidth - GS!(4) - hiliteX), mSelfHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int FindItemAtY(float y)
|
||||
|
|
|
@ -3469,7 +3469,19 @@ namespace Beefy.widgets
|
|||
GetTextCoordAtLineChar(line, lineChar, out x, out y);
|
||||
|
||||
int coordLine;
|
||||
GetLineAndColumnAtCoord(x, y, out coordLine, out lineColumn);
|
||||
if (!GetLineAndColumnAtCoord(x, y, out coordLine, out lineColumn))
|
||||
{
|
||||
GetLinePosition(line, var lineStart, var lineEnd);
|
||||
|
||||
lineColumn = 0;
|
||||
int checkTextPos = lineStart;
|
||||
for (int i < lineChar)
|
||||
{
|
||||
let c32 = mData.GetChar32(ref checkTextPos);
|
||||
if (!c32.IsCombiningMark)
|
||||
lineColumn++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void MoveCursorTo(int line, int charIdx, bool centerCursor = false, int movingDir = 0, CursorMoveKind cursorMoveKind = .Unknown)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue