MenuCheckboxItem
MenuCheckboxItem
Section titled “MenuCheckboxItem”A menu item with a checkbox on the right.
Example usage
Section titled “Example usage”// checkedValue: when this is set to true, the checkbox will be 'checked' by default.bool checkedValue = false;MenuCheckboxItem item = new MenuCheckboxItem("Checkbox Text", "Checkbox description.", checkedValue);
// Set the style:item.Style = MenuCheckboxItem.CheckboxStyle.Cross;
// Add a menu item to a menu:menu.AddMenuItem(item);Reacting to a checkbox
Section titled “Reacting to a checkbox”Toggling raises OnCheckboxChange on the parent menu. Checked is already updated when your handler runs, and newCheckedState holds the same value.
MenuCheckboxItem godMode = new MenuCheckboxItem("God mode", "Makes you invincible.", false);menu.AddMenuItem(godMode);
menu.OnCheckboxChange += (_menu, _item, _index, _checked) =>{ if (_item == godMode) { SetPlayerInvincible(Game.Player.Handle, _checked); }};A locked checkbox
Section titled “A locked checkbox”A disabled checkbox is greyed out and cannot be toggled.
menu.AddMenuItem(new MenuCheckboxItem("Premium feature", "Only available to donators.", false){ Enabled = false, LeftIcon = MenuItem.Icon.LOCK});Constructors
Section titled “Constructors”| Constructor | Description |
|---|---|
MenuCheckboxItem(string text) |
Unchecked, no description. |
MenuCheckboxItem(string text, bool _checked) |
No description, with the given checked state. |
MenuCheckboxItem(string text, string description) |
Unchecked, with a description. |
MenuCheckboxItem(string text, string description, bool _checked) |
With a description and the given checked state. |
text is drawn on the left side of the row. description is shown below the menu while the item is highlighted.
Properties
Section titled “Properties”| Property | Type | Default value | Description |
|---|---|---|---|
| Checked | bool | false | The checked state. |
| Style | CheckboxStyle | CheckboxStyle.Tick |
What the checkbox shows when checked. |
Methods
Section titled “Methods”MenuCheckboxItem has no methods of its own.
Checkbox Styles
Section titled “Checkbox Styles”The enum is MenuCheckboxItem.CheckboxStyle.
| Style | Default | Example |
|---|---|---|
| CheckboxStyle.Tick | Yes | ![]() |
| CheckboxStyle.Cross | No | ![]() |


