1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Some globals (un-)init fixes

This commit is contained in:
sfan5 2024-04-11 13:54:09 +02:00
parent 2af5191070
commit d8190e1c5f
16 changed files with 58 additions and 62 deletions

View file

@ -80,7 +80,7 @@ public:
return mm && mm->preprocessEvent(event);
}
u32 menuCount()
size_t menuCount() const
{
return m_stack.size();
}
@ -95,12 +95,16 @@ public:
return false;
}
// FIXME: why isn't this private?
std::list<gui::IGUIElement*> m_stack;
};
extern MainMenuManager g_menumgr;
extern bool isMenuActive();
static inline bool isMenuActive()
{
return g_menumgr.menuCount() != 0;
}
class MainGameCallback : public IGameCallback
{
@ -138,7 +142,8 @@ public:
keyconfig_changed = true;
}
void showOpenURLDialog(const std::string &url) override {
void showOpenURLDialog(const std::string &url) override
{
show_open_url_dialog = url;
}