1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-22 09:38:01 +02:00
Beef/IDE/src/ui/WrappedMenuValue.bf
2019-08-23 11:56:54 -07:00

42 lines
543 B
Beef

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;
}
}
}