Adding debug button for objects in sheet
This commit is contained in:
parent
e8933c5029
commit
92db466083
3 changed files with 23 additions and 0 deletions
|
|
@ -4,7 +4,9 @@
|
|||
#include <billy_objects.hpp>
|
||||
|
||||
#include <glibmm/miscutils.h>
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/label.h>
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <ranges>
|
||||
|
|
@ -162,10 +164,13 @@ namespace gui_to_app {
|
|||
if (switches_procedure()) {
|
||||
return;
|
||||
}
|
||||
debug_button = app_builder->get_widget<Gtk::Button>("debug_button");
|
||||
hab_base = app_builder->get_widget<Gtk::Label>("habilete_label_base");
|
||||
hab_carac = app_builder->get_widget<Gtk::Label>("habilete_label_carac");
|
||||
hab_mat = app_builder->get_widget<Gtk::Label>("habilete_label_materiel");
|
||||
hab_total = app_builder->get_widget<Gtk::Label>("habilete_label_total");
|
||||
|
||||
debug_button->signal_clicked().connect(sigc::mem_fun(*this, &AppWin2Back::debug_button_clicked), false);
|
||||
}
|
||||
|
||||
void AppWin2Back::on_quit() noexcept {
|
||||
|
|
@ -181,6 +186,13 @@ namespace gui_to_app {
|
|||
return flag ? gestionnaire.insert_object(sheet, obj) : !gestionnaire.erase_object(sheet, obj);
|
||||
}
|
||||
|
||||
void AppWin2Back::debug_button_clicked() const noexcept {
|
||||
spdlog::info("Display objects");
|
||||
for (const auto &obj: sheet.get_objects() | views::values) {
|
||||
spdlog::info("Object: {}", obj->to_string());
|
||||
}
|
||||
}
|
||||
|
||||
bool AppWin2Back::insert_obj(const character::billyEnums &obj) noexcept {
|
||||
return gestionnaire.insert_object(sheet, obj);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue