Modern border flag for child in GUI.

This commit is contained in:
Pcornat 2024-02-26 17:51:20 +01:00
parent bdc9adcf75
commit 60957902cb
Signed by: Pcornat
GPG Key ID: E0326CC678A00BDD

View File

@ -112,7 +112,9 @@ void gui::Gui::render_gpu() const {
} }
void gui::Gui::habilete_menu() noexcept { void gui::Gui::habilete_menu() noexcept {
ImGui::BeginChild("habilete", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f), true); ImGui::BeginChild("habilete",
ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f),
ImGuiChildFlags_Border);
ImGui::Text("Habileté"); ImGui::Text("Habileté");
data.base.second = data.billy.get_habilete().get_base(); data.base.second = data.billy.get_habilete().get_base();
data.base.first = ImGui::InputInt("Base", reinterpret_cast<int *>(&data.base.second)) ? characChanged::Habilete data.base.first = ImGui::InputInt("Base", reinterpret_cast<int *>(&data.base.second)) ? characChanged::Habilete
@ -134,7 +136,9 @@ void gui::Gui::habilete_menu() noexcept {
} }
void gui::Gui::adresse_menu() noexcept { void gui::Gui::adresse_menu() noexcept {
ImGui::BeginChild("adresse", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f), true); ImGui::BeginChild("adresse",
ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f),
ImGuiChildFlags_Border);
ImGui::Text("Adresse"); ImGui::Text("Adresse");
data.base.second = data.billy.get_adresse().get_base(); data.base.second = data.billy.get_adresse().get_base();
data.base.first = ImGui::InputInt("Base", reinterpret_cast<int *>(&data.base.second)) ? characChanged::Adresse data.base.first = ImGui::InputInt("Base", reinterpret_cast<int *>(&data.base.second)) ? characChanged::Adresse
@ -156,7 +160,9 @@ void gui::Gui::adresse_menu() noexcept {
} }
void gui::Gui::endurance_menu() noexcept { void gui::Gui::endurance_menu() noexcept {
ImGui::BeginChild("endurance", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f), true); ImGui::BeginChild("endurance",
ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f),
ImGuiChildFlags_Border);
ImGui::Text("Endurance"); ImGui::Text("Endurance");
data.base.second = data.billy.get_endurance().get_base(); data.base.second = data.billy.get_endurance().get_base();
@ -180,7 +186,9 @@ void gui::Gui::endurance_menu() noexcept {
} }
void gui::Gui::chance_menu() noexcept { void gui::Gui::chance_menu() noexcept {
ImGui::BeginChild("chance", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f), true); ImGui::BeginChild("chance",
ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f),
ImGuiChildFlags_Border);
ImGui::Text("Chance"); ImGui::Text("Chance");
data.base.second = data.billy.get_chance().get_base(); data.base.second = data.billy.get_chance().get_base();
data.base.first = ImGui::InputInt("Base", reinterpret_cast<int *>(&data.base.second)) ? characChanged::Chance data.base.first = ImGui::InputInt("Base", reinterpret_cast<int *>(&data.base.second)) ? characChanged::Chance
@ -202,25 +210,33 @@ void gui::Gui::chance_menu() noexcept {
} }
void gui::Gui::stat_second_menu() noexcept { void gui::Gui::stat_second_menu() noexcept {
ImGui::BeginChild("stats secondaire", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.4f), true); ImGui::BeginChild("stats secondaire",
ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.4f),
ImGuiChildFlags_Border);
ImGui::Text("STAT. SECONDAIRES"); ImGui::Text("STAT. SECONDAIRES");
ImGui::EndChild(); ImGui::EndChild();
} }
void gui::Gui::materiel_menu() noexcept { void gui::Gui::materiel_menu() noexcept {
ImGui::BeginChild("materiel", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.2f), true); ImGui::BeginChild("materiel",
ImVec2(ImGui::GetWindowWidth() / 3, 0),
ImGuiChildFlags_Border | ImGuiChildFlags_AutoResizeY);
ImGui::Text("Matériel"); ImGui::Text("Matériel");
ImGui::EndChild(); ImGui::EndChild();
} }
void gui::Gui::gloire_menu() noexcept { void gui::Gui::gloire_menu() noexcept {
ImGui::BeginChild("gloire", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.1f), true); ImGui::BeginChild("gloire",
ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.1f),
ImGuiChildFlags_Border);
ImGui::Text("Gloire"); ImGui::Text("Gloire");
ImGui::EndChild(); ImGui::EndChild();
} }
void gui::Gui::richesse_menu() noexcept { void gui::Gui::richesse_menu() noexcept {
ImGui::BeginChild("richesse", ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.1f), true); ImGui::BeginChild("richesse",
ImVec2(ImGui::GetWindowWidth() / 3, ImGui::GetWindowHeight() * 0.1f),
ImGuiChildFlags_Border);
ImGui::Text("Richesse"); ImGui::Text("Richesse");
ImGui::EndChild(); ImGui::EndChild();
} }