mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 10:08:00 +02:00
Breakpoint hotkeys, autocomplete fix
This commit is contained in:
parent
d6a9f4c9ca
commit
1c6c06fa4d
20 changed files with 316 additions and 262 deletions
|
@ -13,29 +13,48 @@ namespace IDE.ui
|
|||
{
|
||||
None,
|
||||
Smart,
|
||||
Always
|
||||
Always,
|
||||
Extra
|
||||
}
|
||||
|
||||
public class LocatorAnim : Widget
|
||||
{
|
||||
LocatorType mType;
|
||||
float mPct;
|
||||
|
||||
public this()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Draw(Graphics g)
|
||||
{
|
||||
base.Draw(g);
|
||||
|
||||
bool isExtra = mType == .Extra;
|
||||
|
||||
int32 circleCount = 2;
|
||||
for (int32 i = 0; i < circleCount; i++)
|
||||
{
|
||||
float sepPct = 0.3f;
|
||||
float maxSep = (circleCount - 2) * sepPct;
|
||||
float pct = (mPct - maxSep + (i * 0.3f)) / (1.0f - maxSep);
|
||||
|
||||
if (isExtra)
|
||||
pct *= 1.2f;
|
||||
|
||||
if ((pct < 0.0f) || (pct > 1.0f))
|
||||
continue;
|
||||
|
||||
float scale = (float)Math.Sin(pct * Math.PI_f / 2) * 0.5f;
|
||||
float alpha = Math.Min(0.3f, (1.0f - (float)Math.Sin(pct * Math.PI_f / 2)) * 1.0f);
|
||||
|
||||
if (isExtra)
|
||||
{
|
||||
scale *= 1.2f;
|
||||
alpha *= 1.2f;
|
||||
}
|
||||
|
||||
using (g.PushColor(Color.Get(alpha)))
|
||||
{
|
||||
using (g.PushScale(scale, scale, GS!(32), GS!(32)))
|
||||
|
@ -48,7 +67,8 @@ namespace IDE.ui
|
|||
{
|
||||
base.Update();
|
||||
|
||||
mPct += 0.03f;
|
||||
mPct += (mType == .Extra) ? 0.02f : 0.03f;
|
||||
|
||||
if (mPct >= 1.0f)
|
||||
{
|
||||
RemoveSelf();
|
||||
|
@ -59,7 +79,7 @@ namespace IDE.ui
|
|||
MarkDirty();
|
||||
}
|
||||
|
||||
public static void Show(Widget refWidget, float x, float y)
|
||||
public static void Show(LocatorType locatorType, Widget refWidget, float x, float y)
|
||||
{
|
||||
if (!gApp.mSettings.mEditorSettings.mShowLocatorAnim)
|
||||
return;
|
||||
|
@ -68,6 +88,7 @@ namespace IDE.ui
|
|||
float yOfs = GS!(-32.0f);
|
||||
|
||||
LocatorAnim anim = new LocatorAnim();
|
||||
anim.mType = locatorType;
|
||||
anim.mX = x + xOfs;
|
||||
anim.mY = y + yOfs;
|
||||
refWidget.AddWidget(anim);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue