mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 21:34:11 +02:00
Added an origX/origY to MouseClick
This commit is contained in:
parent
5f949c177d
commit
a51fa2b657
14 changed files with 76 additions and 34 deletions
|
@ -6175,9 +6175,9 @@ namespace IDE.ui
|
|||
return true;
|
||||
}
|
||||
|
||||
public override void MouseClicked(float x, float y, int32 btn)
|
||||
public override void MouseClicked(float x, float y, float origX, float origY, int32 btn)
|
||||
{
|
||||
base.MouseClicked(x, y, btn);
|
||||
base.MouseClicked(x, y, origX, origY, btn);
|
||||
|
||||
if (btn == 0)
|
||||
{
|
||||
|
@ -6277,5 +6277,26 @@ namespace IDE.ui
|
|||
idx++;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasTextAtCursor()
|
||||
{
|
||||
let ewc = mEditWidget.mEditWidgetContent;
|
||||
int textPos = mEditWidget.mEditWidgetContent.CursorTextPos;
|
||||
if (textPos >= ewc.mData.mTextLength)
|
||||
return false;
|
||||
|
||||
for (int offset = -1; offset <= 0; offset++)
|
||||
{
|
||||
int checkPos = textPos + offset;
|
||||
if (checkPos < 0)
|
||||
continue;
|
||||
|
||||
let c = ewc.mData.mText[checkPos].mChar;
|
||||
if ((c.IsLetterOrDigit) || (c == '_') || (c == '@'))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue