X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Ftheme.h;fp=nageru%2Ftheme.h;h=b4e8d8c406bcd612637eb662882d04798a115f2d;hb=2e1b69c339862fb9b8147bf0ac07d87ca4810d4e;hp=22a9ff7d3423a4e203c9fc688be2f4f354306ca5;hpb=efeea7571ab45c6a846208f0554153de549d1711;p=nageru diff --git a/nageru/theme.h b/nageru/theme.h index 22a9ff7..b4e8d8c 100644 --- a/nageru/theme.h +++ b/nageru/theme.h @@ -149,12 +149,15 @@ public: #endif struct MenuEntry { - MenuEntry(const std::string &text, lua_State *L, int lua_ref) - : text(text), is_submenu(false), entry{L, lua_ref} {} + MenuEntry(const std::string &text, lua_State *L, int lua_ref, unsigned flags) + : text(text), is_submenu(false), entry{L, lua_ref, flags} {} MenuEntry(const std::string &text, std::vector> submenu) : text(text), is_submenu(true), submenu(std::move(submenu)) {} ~MenuEntry(); + static constexpr unsigned CHECKABLE = 1; + static constexpr unsigned CHECKED = 2; + std::string text; bool is_submenu; @@ -163,6 +166,7 @@ public: struct { lua_State *L; int lua_ref; + unsigned flags; } entry; // is_submenu = true.