X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Ftheme.h;h=37113b2b954d88a607087ca8e691df1aa082a8fd;hb=5e9f3fe04e04a7c53a8e64106797e14e44fe9024;hp=22a9ff7d3423a4e203c9fc688be2f4f354306ca5;hpb=fe13490dcc54882e6f1fc9293cbdffabf6daa290;p=nageru diff --git a/nageru/theme.h b/nageru/theme.h index 22a9ff7..37113b2 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. @@ -179,6 +183,8 @@ public: theme_menu_callback = callback; } + std::string format_status_line(const std::string &disk_space_left_text, double file_length_seconds); + private: void register_globals(); void register_class(const char *class_name, const luaL_Reg *funcs, EffectType effect_type = NO_EFFECT_TYPE);