diff --git a/src/dlangui/core/events.d b/src/dlangui/core/events.d index 4d394d91..f4970fdf 100644 --- a/src/dlangui/core/events.d +++ b/src/dlangui/core/events.d @@ -242,6 +242,7 @@ struct ActionState { const ACTION_STATE_ENABLED = ActionState(true, true, false); const ACTION_STATE_DISABLE = ActionState(false, true, false); const ACTION_STATE_INVISIBLE = ActionState(false, false, false); +const ACTION_STATE_CHECKED = ActionState(true, true, true); /// Match key flags static bool matchKeyFlags(uint eventFlags, uint requestedFlags) { diff --git a/src/dlangui/widgets/menu.d b/src/dlangui/widgets/menu.d index bdd1b45d..d207a502 100644 --- a/src/dlangui/widgets/menu.d +++ b/src/dlangui/widgets/menu.d @@ -207,6 +207,13 @@ class MenuItem { subitem._parent = this; return this; } + /// adds submenu checkbox item + MenuItem addCheck(const Action a) { + MenuItem res = new MenuItem(a); + res.type = MenuItemType.Check; + add(res); + return this; + } /// adds submenu item(s) from one or more actions (will return item for last action) MenuItem add(Action[] subitemActions...) { MenuItem res = null; diff --git a/views/DLANGUI_VERSION b/views/DLANGUI_VERSION index 1389f0e1..e9ac3a9a 100644 --- a/views/DLANGUI_VERSION +++ b/views/DLANGUI_VERSION @@ -1 +1 @@ -v0.9.137 \ No newline at end of file +v0.9.138 \ No newline at end of file