X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Ftheme.h;h=b4e8d8c406bcd612637eb662882d04798a115f2d;hb=a60a2c892c08f6fab3a1e6b7cf4343cad8689058;hp=22a9ff7d3423a4e203c9fc688be2f4f354306ca5;hpb=fe13490dcc54882e6f1fc9293cbdffabf6daa290;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.