mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 01:58:00 +02:00
Initial checkin
This commit is contained in:
parent
c74712dad9
commit
078564ac9e
3242 changed files with 1616395 additions and 0 deletions
42
IDE/src/ui/WrappedMenuValue.bf
Normal file
42
IDE/src/ui/WrappedMenuValue.bf
Normal file
|
@ -0,0 +1,42 @@
|
|||
using Beefy.widgets;
|
||||
using Beefy.sys;
|
||||
namespace IDE.ui
|
||||
{
|
||||
struct WrappedMenuValue
|
||||
{
|
||||
public IMenu mMenu;
|
||||
public bool mIsSet;
|
||||
|
||||
public bool Bool
|
||||
{
|
||||
get
|
||||
{
|
||||
return mIsSet;
|
||||
}
|
||||
|
||||
set mut
|
||||
{
|
||||
mIsSet = value;
|
||||
var sysMenu = (SysMenu)mMenu;
|
||||
sysMenu.Modify(null, null, null, true, mIsSet ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void Toggle() mut
|
||||
{
|
||||
Bool = !mIsSet;
|
||||
}
|
||||
|
||||
public this(bool isSet)
|
||||
{
|
||||
mMenu = null;
|
||||
mIsSet = isSet;
|
||||
}
|
||||
|
||||
public this(IMenu menu, bool isSet)
|
||||
{
|
||||
mMenu = menu;
|
||||
mIsSet = isSet;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue