From 92cab050ad2e8dc54a9da76a68c75901b6cbecda Mon Sep 17 00:00:00 2001 From: William JCM Date: Mon, 21 Jun 2021 00:28:16 +0200 Subject: [PATCH] SaveTool: reorganise the UI again. --- src/SaveTool/SaveTool_MainManager.cpp | 38 +++++++++++---------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/src/SaveTool/SaveTool_MainManager.cpp b/src/SaveTool/SaveTool_MainManager.cpp index 3da25e1..7bc2aa2 100644 --- a/src/SaveTool/SaveTool_MainManager.cpp +++ b/src/SaveTool/SaveTool_MainManager.cpp @@ -67,38 +67,32 @@ void SaveTool::drawManager() { ImGui::EndTable(); } - ImGui::BeginGroup(); - - if(ImGui::BeginChild("##GeneralProfileInfo", - {ImGui::GetContentRegionAvailWidth() * 0.60f, (ImGui::GetContentRegionAvail().y - ImGui::GetStyle().ItemSpacing.x) / 2.0f}, - true, ImGuiWindowFlags_MenuBar)) - { - if(ImGui::BeginMenuBar()) { - ImGui::TextUnformatted("General profile information"); - ImGui::EndMenuBar(); - } - - drawGeneralInfo(); - } - ImGui::EndChild(); - - ImGui::Dummy({0.0f, 0.0f}); - - if(ImGui::BeginChild("##ResearchInventory", + if(ImGui::BeginChild("##ProfileInfo", {ImGui::GetContentRegionAvailWidth() * 0.60f, 0.0f}, true, ImGuiWindowFlags_MenuBar)) { if(ImGui::BeginMenuBar()) { - ImGui::TextUnformatted("Research inventory"); + ImGui::TextUnformatted("Profile information"); ImGui::EndMenuBar(); } - drawResearchInventory(); + if(ImGui::BeginTabBar("##ProfileTabBar")) { + if(ImGui::BeginTabItem("General info")) { + drawGeneralInfo(); + ImGui::EndTabItem(); + } + + if(ImGui::BeginTabItem("Research inventory")) { + drawResearchInventory(); + ImGui::EndTabItem(); + } + + ImGui::EndTabBar(); + } + } ImGui::EndChild(); - ImGui::EndGroup(); - ImGui::SameLine(); if(ImGui::BeginChild("##MASSManager", {0.0f, 0.0f},