mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 00:20:25 +02:00
Initial checkin
This commit is contained in:
parent
c74712dad9
commit
078564ac9e
3242 changed files with 1616395 additions and 0 deletions
36
IDE/src/ui/BoundCheckbox.bf
Normal file
36
IDE/src/ui/BoundCheckbox.bf
Normal file
|
@ -0,0 +1,36 @@
|
|||
using Beefy.theme.dark;
|
||||
|
||||
namespace IDE.ui
|
||||
{
|
||||
class BoundCheckbox : DarkCheckBox
|
||||
{
|
||||
bool* mBoundValue;
|
||||
|
||||
public this(ref bool boundValue)
|
||||
{
|
||||
mBoundValue = &boundValue;
|
||||
}
|
||||
|
||||
public override bool Checked
|
||||
{
|
||||
get
|
||||
{
|
||||
mState = *mBoundValue ? .Checked : .Unchecked;
|
||||
//base.Checked = *mBoundValue;
|
||||
return *mBoundValue;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
*mBoundValue = value;
|
||||
mState = *mBoundValue ? .Checked : .Unchecked;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
base.Update();
|
||||
Checked = *mBoundValue;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue