mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 00:50:25 +02:00
Allow clicking on reg in mem window, other minor fixes
This commit is contained in:
parent
4dcd7f9c6a
commit
2618b29daa
13 changed files with 96 additions and 32 deletions
|
@ -495,6 +495,7 @@ namespace IDE.ui
|
|||
public uint32 mDisplayColor;
|
||||
public bool mIsReg;
|
||||
public bool mIsVisible;
|
||||
public Rect? mDrawRect;
|
||||
|
||||
public this(BinaryDataWidget binaryDataWidget, StringView expr, int memStart, int size, StringView displayName, uint32 displayColor, bool isReg)
|
||||
{
|
||||
|
@ -861,6 +862,9 @@ namespace IDE.ui
|
|||
{
|
||||
base.Draw(g);
|
||||
|
||||
for (var te in mTrackedExprs)
|
||||
te.mDrawRect = null;
|
||||
|
||||
int barThickness = (int)GS!(1.5f);
|
||||
|
||||
/*
|
||||
|
@ -1429,6 +1433,8 @@ namespace IDE.ui
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (var kvp in trackedRegYDict)
|
||||
{
|
||||
var te = kvp.key;
|
||||
|
@ -1441,6 +1447,9 @@ namespace IDE.ui
|
|||
var useFont = IDEApp.sApp.mTinyCodeFont;
|
||||
float strWidth = useFont.GetWidth(te.mExpr);
|
||||
bool shortLine = trackedRegYShortLines[lineIdx];
|
||||
var useLineSpacing = useFont.GetLineSpacing();
|
||||
|
||||
te.mDrawRect = Rect(barX, barY, strWidth + GS!(2), useLineSpacing + GS!(2));
|
||||
|
||||
if (te.mDisplayName.StartsWith("$"))
|
||||
continue;
|
||||
|
@ -1448,7 +1457,6 @@ namespace IDE.ui
|
|||
using (g.PushColor(te.mDisplayColor))
|
||||
{
|
||||
var regsOnThisLine = trackedRegsByLine[lineIdx].Count;
|
||||
var useLineSpacing = useFont.GetLineSpacing();
|
||||
float barYAdj = barY + useLineSpacing*0.5f + GS!(1);
|
||||
float barGoalYAdj = barGoalY + useLineSpacing*0.5f + GS!(1);
|
||||
if (regsOnThisLine == 2)
|
||||
|
@ -1699,6 +1707,18 @@ namespace IDE.ui
|
|||
|
||||
var selection = GetSelectionForDisplayPosition(x, y, 1, 1);
|
||||
|
||||
if (selection == null)
|
||||
{
|
||||
for (var te in mTrackedExprs)
|
||||
{
|
||||
if ((var rect = te.mDrawRect) && (rect.Contains(x, y)))
|
||||
{
|
||||
SelectRange(te.mCurValue, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selection != null)
|
||||
{
|
||||
delete mCurKeyCursor;
|
||||
|
|
|
@ -687,7 +687,9 @@ namespace IDE.ui
|
|||
if (folder.mIncludeKind != .Auto)
|
||||
folder.mProject.SetChanged();
|
||||
|
||||
gApp.RecordHistoryLocation(true);
|
||||
gApp.ShowProjectItem(projectSource);
|
||||
gApp.RecordHistoryLocation(true);
|
||||
}
|
||||
|
||||
int CompareListViewItem(ListViewItem left, ListViewItem right)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue