mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 18:09:46 +00:00
make hotbar size and layout configurable
Add hotbar-size, hotbar-layout and inventory-layout to config/defaults.toml, player.get_hotbar_size / player.set_hotbar_size and hud.is_hotbar_visible / hud.set_hotbar_visible.
This commit is contained in:
parent
2e2233a489
commit
aa670f3c9d
16 changed files with 188 additions and 20 deletions
|
|
@ -89,6 +89,10 @@ class Hud : public util::ObjectsKeeper {
|
|||
std::shared_ptr<gui::InventoryView> contentAccess;
|
||||
/// @brief Player inventory hotbar
|
||||
std::shared_ptr<gui::InventoryView> hotbarView;
|
||||
/// @brief Hotbar layout set by 'hotbar-layout', nullptr for built-in
|
||||
UiDocument* hotbarDocument = nullptr;
|
||||
/// @brief Hotbar is not hidden by scripts
|
||||
bool hotbarVisible = true;
|
||||
/// @brief Debug info and control panel (F3 key)
|
||||
std::shared_ptr<gui::UINode> debugPanel;
|
||||
/// @brief Overlay used in pause mode
|
||||
|
|
@ -219,6 +223,10 @@ public:
|
|||
|
||||
void setAllowPause(bool flag);
|
||||
|
||||
void setHotbarVisible(bool flag);
|
||||
|
||||
bool isHotbarVisible() const;
|
||||
|
||||
bool isOpen(const std::string& layoutid) const;
|
||||
|
||||
static bool showGeneratorMinimap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue