mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 01:18:02 +02:00
Find in Watch
This commit is contained in:
parent
732af58138
commit
82b4974a82
5 changed files with 710 additions and 28 deletions
26
IDE/src/ui/ToggleButton.bf
Normal file
26
IDE/src/ui/ToggleButton.bf
Normal file
|
@ -0,0 +1,26 @@
|
|||
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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue