Compare commits
No commits in common. "8a91b471528339c447150a6128ce2a39cf57d427" and "a2bd12c9939bc89016eb185227c01ddeca20e26d" have entirely different histories.
8a91b47152
...
a2bd12c993
3 changed files with 9 additions and 32 deletions
|
|
@ -206,10 +206,6 @@ namespace gui_to_app {
|
||||||
app_builder
|
app_builder
|
||||||
};
|
};
|
||||||
|
|
||||||
damage_label = app_builder->get_widget<Gtk::Label>("label_degat");
|
|
||||||
armor_label = app_builder->get_widget<Gtk::Label>("label_armure");
|
|
||||||
critic_label = app_builder->get_widget<Gtk::Label>("label_critique");
|
|
||||||
|
|
||||||
debug_button->signal_clicked().connect(sigc::mem_fun(*this, &AppWin2Back::debug_button_clicked), false);
|
debug_button->signal_clicked().connect(sigc::mem_fun(*this, &AppWin2Back::debug_button_clicked), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -229,7 +225,7 @@ namespace gui_to_app {
|
||||||
|
|
||||||
static void convert_to_label(std::array<char, 10> &convert,
|
static void convert_to_label(std::array<char, 10> &convert,
|
||||||
const std::string_view &err_msg,
|
const std::string_view &err_msg,
|
||||||
const std::int32_t data,
|
const uint32_t data,
|
||||||
Gtk::Label *const __restrict label) noexcept {
|
Gtk::Label *const __restrict label) noexcept {
|
||||||
if (const auto [ptr, ec] = std::to_chars(convert.data(), convert.data() + convert.size(), data);
|
if (const auto [ptr, ec] = std::to_chars(convert.data(), convert.data() + convert.size(), data);
|
||||||
ec != std::errc()) {
|
ec != std::errc()) {
|
||||||
|
|
@ -248,13 +244,10 @@ namespace gui_to_app {
|
||||||
const std::string_view short_name,
|
const std::string_view short_name,
|
||||||
const CaracInterface<Gtk::Label> &labels) noexcept {
|
const CaracInterface<Gtk::Label> &labels) noexcept {
|
||||||
std::array<char, 10> convert{};
|
std::array<char, 10> convert{};
|
||||||
convert_to_label(convert,
|
convert_to_label(convert, std::format("base {}", short_name), charac.get_base(), labels.base);
|
||||||
std::format("base {}", short_name),
|
|
||||||
static_cast<std::int32_t>(charac.get_base()),
|
|
||||||
labels.base);
|
|
||||||
convert_to_label(convert,
|
convert_to_label(convert,
|
||||||
std::format("carac {}", short_name),
|
std::format("carac {}", short_name),
|
||||||
static_cast<std::int32_t>(charac.get_carac()),
|
charac.get_carac(),
|
||||||
labels.carac);
|
labels.carac);
|
||||||
convert_to_label(convert,
|
convert_to_label(convert,
|
||||||
std::format("materiel {}", short_name),
|
std::format("materiel {}", short_name),
|
||||||
|
|
@ -271,11 +264,6 @@ namespace gui_to_app {
|
||||||
update_in_labels(sheet.get_endurance(), "endu", endu_labels);
|
update_in_labels(sheet.get_endurance(), "endu", endu_labels);
|
||||||
update_in_labels(sheet.get_adresse(), "adresse", addr_labels);
|
update_in_labels(sheet.get_adresse(), "adresse", addr_labels);
|
||||||
update_in_labels(sheet.get_chance(), "chance", luck_labels);
|
update_in_labels(sheet.get_chance(), "chance", luck_labels);
|
||||||
|
|
||||||
std::array<char, 10> convert{ '\0' };
|
|
||||||
convert_to_label(convert, "damage", static_cast<std::int32_t>(sheet.get_damage()), damage_label);
|
|
||||||
convert_to_label(convert, "armor", static_cast<std::int32_t>(sheet.get_armor()), armor_label);
|
|
||||||
convert_to_label(convert, "critic", static_cast<std::int32_t>(sheet.get_critique()), critic_label);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AppWin2Back::insert_obj(const character::billyEnums &obj) noexcept {
|
bool AppWin2Back::insert_obj(const character::billyEnums &obj) noexcept {
|
||||||
|
|
|
||||||
|
|
@ -108,10 +108,6 @@ namespace gui_to_app {
|
||||||
|
|
||||||
CaracInterface<Gtk::Label> luck_labels;
|
CaracInterface<Gtk::Label> luck_labels;
|
||||||
|
|
||||||
Gtk::Label *damage_label{ nullptr };
|
|
||||||
Gtk::Label *armor_label{ nullptr };
|
|
||||||
Gtk::Label *critic_label{ nullptr };
|
|
||||||
|
|
||||||
Gtk::Button *debug_button{ nullptr };
|
Gtk::Button *debug_button{ nullptr };
|
||||||
|
|
||||||
std::array<SwitchSignalHelper, 12> signal_handlers{
|
std::array<SwitchSignalHelper, 12> signal_handlers{
|
||||||
|
|
|
||||||
19
window_ui.ui
19
window_ui.ui
|
|
@ -536,7 +536,6 @@
|
||||||
<object class="GtkGrid">
|
<object class="GtkGrid">
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid">
|
<object class="GtkGrid">
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="halign">start</property>
|
<property name="halign">start</property>
|
||||||
|
|
@ -550,8 +549,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="adresse_label_base">
|
<object class="GtkLabel" id="adresse_label_base">
|
||||||
<property name="halign">center</property>
|
<property name="halign">end</property>
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="column">1</property>
|
<property name="column">1</property>
|
||||||
<property name="row">0</property>
|
<property name="row">0</property>
|
||||||
|
|
@ -570,7 +568,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="adresse_label_carac">
|
<object class="GtkLabel" id="adresse_label_carac">
|
||||||
<property name="halign">center</property>
|
<property name="halign">end</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="column">1</property>
|
<property name="column">1</property>
|
||||||
<property name="row">1</property>
|
<property name="row">1</property>
|
||||||
|
|
@ -589,7 +587,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="adresse_label_materiel">
|
<object class="GtkLabel" id="adresse_label_materiel">
|
||||||
<property name="halign">center</property>
|
<property name="halign">end</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="column">1</property>
|
<property name="column">1</property>
|
||||||
<property name="row">2</property>
|
<property name="row">2</property>
|
||||||
|
|
@ -613,8 +611,6 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="adresse_label_total">
|
<object class="GtkLabel" id="adresse_label_total">
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="column">2</property>
|
<property name="column">2</property>
|
||||||
<property name="row">0</property>
|
<property name="row">0</property>
|
||||||
|
|
@ -658,8 +654,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="chance_label_base">
|
<object class="GtkLabel" id="chance_label_base">
|
||||||
<property name="halign">center</property>
|
<property name="halign">end</property>
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="column">1</property>
|
<property name="column">1</property>
|
||||||
<property name="row">0</property>
|
<property name="row">0</property>
|
||||||
|
|
@ -678,7 +673,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="chance_label_carac">
|
<object class="GtkLabel" id="chance_label_carac">
|
||||||
<property name="halign">center</property>
|
<property name="halign">end</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="column">1</property>
|
<property name="column">1</property>
|
||||||
<property name="row">1</property>
|
<property name="row">1</property>
|
||||||
|
|
@ -697,7 +692,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="chance_label_materiel">
|
<object class="GtkLabel" id="chance_label_materiel">
|
||||||
<property name="halign">center</property>
|
<property name="halign">end</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="column">1</property>
|
<property name="column">1</property>
|
||||||
<property name="row">2</property>
|
<property name="row">2</property>
|
||||||
|
|
@ -721,8 +716,6 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="chance_label_total">
|
<object class="GtkLabel" id="chance_label_total">
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="column">2</property>
|
<property name="column">2</property>
|
||||||
<property name="row">0</property>
|
<property name="row">0</property>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue