Updating hab labels

This commit is contained in:
Pcornat 2026-03-16 16:23:26 +01:00
commit 53a70aefa5
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD
2 changed files with 44 additions and 16 deletions

View file

@ -21,6 +21,14 @@ namespace Gtk {
}
namespace gui_to_app {
template<typename T>
struct CaracInterface {
T *base{ nullptr };
T *carac{ nullptr };
T *mat{ nullptr };
T *total{ nullptr };
};
class AppWin2Back final : public Gtk::Application {
public:
~AppWin2Back() noexcept final = default;
@ -58,10 +66,10 @@ namespace gui_to_app {
void on_quit() noexcept;
bool switch_signal_handler(bool flag, const character::billyEnums &obj) noexcept;
void debug_button_clicked() const noexcept;
void update_hab_labels() const noexcept;
bool insert_obj(const character::billyEnums &obj) noexcept;
bool erase_obj(const character::billyEnums &obj) noexcept;
@ -83,10 +91,7 @@ namespace gui_to_app {
selection_button *rock_kit_switch{ nullptr };
selection_button *sack_switch{ nullptr };
Gtk::Label *hab_base{ nullptr };
Gtk::Label *hab_carac{ nullptr };
Gtk::Label *hab_mat{ nullptr };
Gtk::Label *hab_total{ nullptr };
CaracInterface<Gtk::Label> hab_labels;
Gtk::Button *debug_button{ nullptr };