 |
Cytopia
0.3
A city building simulation game
|
Go to the documentation of this file.
7 #include "../util/Singleton.hxx"
13 using Ptr = std::shared_ptr<GameMenu>;
109 if (
dynamic_cast<Menu *
>(m.get()))
117 if (
dynamic_cast<Menu *
>(m.get()))
std::unordered_map< std::string, LayoutData > & getLayouts()
Get the LayoutGroup container.
void closeOpenMenus()
Close all open menus but the build menu.
Draws the UI to the screen.
void setFPSCounterText(const std::string &fps)
Helper function to update the FPS Counter.
void setTooltip(const std::string &tooltipText)
void init()
Parses the UiLayout.json files and creates UI Elements.
void setBuildMenuLayout(BUILDMENU_LAYOUT l)
std::unordered_map< std::string, ImFont * > m_loadedFonts
struct ImFont * fontDefault
pointer to the default font used for in-game text
std::unordered_map< std::string, LayoutData > m_layouts
map holding layput groups, accessible via the layoutgroup ID
void parseLayouts(const json &uiLayout)
void initializeImGuiFonts()
void drawUI()
Renders all UI Widgets.
bool isAnyMenuOpen() const
BUILDMENU_LAYOUT buildMenuLayout() const
bool isMouseHovered() const
std::vector< GameMenu::Ptr > m_menuStack
GameMenu::Ptr findMenu() const
std::vector< GameMenu::Ptr > m_persistentMenu
Abstract Singleton implementation.
void loadSettings(json &uiLayout)
void clearTooltip()
Hides and resets the active tooltip.
void toggleDebugMenu()
Toggle Visibility of Debug Menu.
bool m_showDebugMenu
visibility of the debug menu
BUILDMENU_LAYOUT m_buildMenuLayout
struct ImFont * loadFont(const std::string &name, uint32_t size)