mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 01:18:02 +02:00
26 lines
508 B
Beef
26 lines
508 B
Beef
![]() |
using Beefy.theme.dark;
|
||
|
using Beefy.gfx;
|
||
|
|
||
|
namespace IDE.ui;
|
||
|
|
||
|
class ToggleButton : DarkButton
|
||
|
{
|
||
|
public bool mToggled;
|
||
|
|
||
|
public override void Draw(Graphics g)
|
||
|
{
|
||
|
base.Draw(g);
|
||
|
|
||
|
if (mToggled)
|
||
|
{
|
||
|
g.DrawBox(DarkTheme.sDarkTheme.GetImage(mHasFocus ? DarkTheme.ImageIdx.MenuSelect : DarkTheme.ImageIdx.MenuNonFocusSelect),
|
||
|
0, 0, mWidth, mHeight);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public override void MouseDown(float x, float y, int32 btn, int32 btnCount)
|
||
|
{
|
||
|
mToggled = !mToggled;
|
||
|
base.MouseDown(x, y, btn, btnCount);
|
||
|
}
|
||
|
}
|