fix generator minimap checkbox
This commit is contained in:
parent
cfa5365b95
commit
616c63b115
@ -194,11 +194,11 @@ Hud::Hud(Engine* engine, LevelFrontend* frontend, Player* player)
|
|||||||
|
|
||||||
assets->store(Texture::from(debugImgWorldGen.get()), DEBUG_WORLDGEN_IMAGE);
|
assets->store(Texture::from(debugImgWorldGen.get()), DEBUG_WORLDGEN_IMAGE);
|
||||||
|
|
||||||
add(HudElement(hud_element_mode::permanent, nullptr,
|
debugMinimap = guiutil::create(
|
||||||
guiutil::create(
|
|
||||||
"<image src='"+DEBUG_WORLDGEN_IMAGE+
|
"<image src='"+DEBUG_WORLDGEN_IMAGE+
|
||||||
"' pos='0' size='256' gravity='top-right' margin='0,20,0,0'/>"
|
"' pos='0' size='256' gravity='top-right' margin='0,20,0,0'/>"
|
||||||
), true));
|
);
|
||||||
|
add(HudElement(hud_element_mode::permanent, nullptr, debugMinimap, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
Hud::~Hud() {
|
Hud::~Hud() {
|
||||||
@ -367,6 +367,7 @@ void Hud::update(bool visible) {
|
|||||||
}
|
}
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
|
debugMinimap->setVisible(player->debug && showGeneratorMinimap);
|
||||||
if (player->debug && showGeneratorMinimap) {
|
if (player->debug && showGeneratorMinimap) {
|
||||||
updateWorldGenDebugVisualization();
|
updateWorldGenDebugVisualization();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -113,6 +113,8 @@ class Hud : public util::ObjectsKeeper {
|
|||||||
/// @brief UI element will be dynamicly positioned near to inventory or in screen center
|
/// @brief UI element will be dynamicly positioned near to inventory or in screen center
|
||||||
std::shared_ptr<gui::UINode> secondUI = nullptr;
|
std::shared_ptr<gui::UINode> secondUI = nullptr;
|
||||||
|
|
||||||
|
std::shared_ptr<gui::UINode> debugMinimap = nullptr;
|
||||||
|
|
||||||
std::unique_ptr<ImageData> debugImgWorldGen;
|
std::unique_ptr<ImageData> debugImgWorldGen;
|
||||||
|
|
||||||
std::shared_ptr<gui::InventoryView> createContentAccess();
|
std::shared_ptr<gui::InventoryView> createContentAccess();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user