1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-18 10:45:27 +02: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;
}