From bffd13987e529518e0988f3b49a3d178436ce0f4 Mon Sep 17 00:00:00 2001 From: Yimura Date: Sat, 18 Sep 2021 22:15:45 +0200 Subject: [PATCH] feat(HandlingCurrentProfile): Added update modal --- .../handling/handling_current_profile.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/BigBaseV2/src/gui/window/handling/handling_current_profile.cpp b/BigBaseV2/src/gui/window/handling/handling_current_profile.cpp index f7b49d71..048a0305 100644 --- a/BigBaseV2/src/gui/window/handling/handling_current_profile.cpp +++ b/BigBaseV2/src/gui/window/handling/handling_current_profile.cpp @@ -6,17 +6,26 @@ namespace big { if (ImGui::BeginTabItem("Current Profile")) { - if (ImGui::Button("Save Profile")) + if (g_vehicle_service->get_active_profile(g_local_player->m_vehicle->m_handling->m_model_hash).empty()) { - ImGui::OpenPopup("Save Handling"); + if (ImGui::Button("Save Profile")) + { + ImGui::OpenPopup("Save Handling"); + } + } + else + { + if (ImGui::Button("Update Profile")) + { + ImGui::OpenPopup("Update Handling"); + } } modal_handling::modal_save_handling(); + modal_handling::modal_update_handling(); ImGui::SameLine(); if (ImGui::Button("Restore Handling")) - { g_vehicle_service->restore_vehicle(); - } ImGui::Separator();