From eb709930f5e0d7473e668d248bb223fb8c439e18 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Thu, 24 Apr 2025 23:48:25 -0400 Subject: [PATCH] Combat UI now uses different icons for different attack elements. --- combat_ui.cpp | 30 +++++++++++++++++++++++++----- combat_ui.hpp | 2 +- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/combat_ui.cpp b/combat_ui.cpp index b769304..e881240 100644 --- a/combat_ui.cpp +++ b/combat_ui.cpp @@ -15,17 +15,35 @@ namespace gui { "[*%(100,150)button_0 | *%(100,150)button_1 | *%(100,150)button_2 | *%(100,150)button_3]"); } - void CombatUI::make_button(std::string name, std::wstring label, Events::GUI event, int action) { + void CombatUI::make_button(std::string name, std::wstring label, Events::GUI event, int action, const std::string &icon_name) { + (void)label; auto button = $gui.entity(name); - $gui.set(button, {"leather_pouch-128"}); - $gui.set(button, {}); + $gui.set(button, {icon_name}); + // $gui.set(button, {}); $gui.set(button, {"ui_click"}); - $gui.set