From d7e9944e58e5e2d071eaa6b8a28260dbe395e681 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Tue, 8 Apr 2025 13:01:56 -0400 Subject: [PATCH] Change the buttons to text for development until I can get the icons/art. --- combat_ui.cpp | 29 +++++++++++++++-------------- combat_ui.hpp | 1 + 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/combat_ui.cpp b/combat_ui.cpp index ca47b1e..79660be 100644 --- a/combat_ui.cpp +++ b/combat_ui.cpp @@ -11,23 +11,24 @@ namespace gui { { $gui.position(COMBAT_UI_X, COMBAT_UI_Y, COMBAT_UI_WIDTH, COMBAT_UI_HEIGHT); $gui.layout( - "[*%(100,150)button_attack1 | *%(100,150)button_attack2 | *%(100,150)button_attack3 | *%(100,150)button_heal]"); + "[*%(100,150)button_attack | *%(100,150)button_block | *%(100,150)button_evade | *%(100,150)button_heal]"); } - void CombatUI::init() { - auto& world = $gui.world(); - - world.set_the({$gui.$parser, ColorValue::DARK_MID}); - - for(auto& [name, cell] : $gui.cells()) { - if(name.starts_with("button_")) { - auto button = $gui.entity(name); - world.set(button, {"leather_pouch-128"}); - world.set(button, - guecs::make_action(*$level.world, Events::GUI::ATTACK)); - } - } + void CombatUI::make_button(std::string name, std::wstring label) { + auto button = $gui.entity(name); + // $gui.set(button, {"leather_pouch-128"}); + $gui.set(button, {}); + $gui.set