lua: added hud.open_permanent(layoutid)

This commit is contained in:
MihailRis
2024-02-17 02:57:42 +03:00
parent 4e126e25cf
commit e58624d3e8
4 changed files with 52 additions and 4 deletions
+8
View File
@@ -55,6 +55,10 @@ public:
UiDocument* getDocument() const;
std::shared_ptr<gui::UINode> getNode() const;
void setRemoved() {
removed = true;
}
bool isRemoved() const {
return removed;
}
@@ -90,6 +94,8 @@ class Hud {
std::shared_ptr<gui::UINode> createDebugPanel(Engine* engine);
std::shared_ptr<InventoryView> createContentAccess();
std::shared_ptr<InventoryView> createHotbar();
void cleanup();
public:
Hud(Engine* engine, LevelFrontend* frontend);
~Hud();
@@ -105,9 +111,11 @@ public:
void openInventory();
void openInventory(glm::ivec3 block, UiDocument* doc, std::shared_ptr<Inventory> blockInv);
void closeInventory();
void openPermanent(UiDocument* doc);
void add(HudElement element);
void remove(HudElement& element);
void remove(std::shared_ptr<gui::UINode> node);
};
#endif /* SRC_HUD_H_ */