From e808b23c9380d40d593a15492e60acf48dda21dd Mon Sep 17 00:00:00 2001 From: Yimura Date: Thu, 16 Sep 2021 22:12:50 +0200 Subject: [PATCH] chore: Rename handling to current_profile --- .../current_profile_brakes.cpp} | 44 +++++------ .../current_profile_gearing.cpp} | 44 +++++------ .../current_profile_general.cpp} | 64 ++++++++-------- .../current_profile_other.cpp} | 58 +++++++-------- .../current_profile_roll_centre_height.cpp} | 42 +++++------ .../current_profile_rollbars.cpp} | 38 +++++----- .../current_profile_steering.cpp} | 28 +++---- .../current_profile_suspension.cpp} | 68 ++++++++--------- .../current_profile_tabs.hpp} | 52 ++++++------- .../current_profile_traction.cpp} | 74 +++++++++---------- .../current_profile_transmission.cpp} | 48 ++++++------ .../window/handling/modals/save_handling.cpp | 2 +- 12 files changed, 281 insertions(+), 281 deletions(-) rename BigBaseV2/src/gui/window/handling/{handling_brakes.cpp => current_profile/current_profile_brakes.cpp} (93%) rename BigBaseV2/src/gui/window/handling/{handling_gearing.cpp => current_profile/current_profile_gearing.cpp} (93%) rename BigBaseV2/src/gui/window/handling/{handling_general.cpp => current_profile/current_profile_general.cpp} (94%) rename BigBaseV2/src/gui/window/handling/{handling_other.cpp => current_profile/current_profile_other.cpp} (94%) rename BigBaseV2/src/gui/window/handling/{handling_roll_centre_height.cpp => current_profile/current_profile_roll_centre_height.cpp} (93%) rename BigBaseV2/src/gui/window/handling/{handling_rollbars.cpp => current_profile/current_profile_rollbars.cpp} (93%) rename BigBaseV2/src/gui/window/handling/{handling_steering.cpp => current_profile/current_profile_steering.cpp} (86%) rename BigBaseV2/src/gui/window/handling/{handling_suspension.cpp => current_profile/current_profile_suspension.cpp} (96%) rename BigBaseV2/src/gui/window/handling/{handling_tabs.hpp => current_profile/current_profile_tabs.hpp} (94%) rename BigBaseV2/src/gui/window/handling/{handling_traction.cpp => current_profile/current_profile_traction.cpp} (96%) rename BigBaseV2/src/gui/window/handling/{handling_transmission.cpp => current_profile/current_profile_transmission.cpp} (94%) diff --git a/BigBaseV2/src/gui/window/handling/handling_brakes.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_brakes.cpp similarity index 93% rename from BigBaseV2/src/gui/window/handling/handling_brakes.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_brakes.cpp index dabab7fc..3a81141a 100644 --- a/BigBaseV2/src/gui/window/handling/handling_brakes.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_brakes.cpp @@ -1,23 +1,23 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_brakes() - { - if (ImGui::BeginTabItem("Brakes")) - { - ImGui::Text("Brake Force"); - ImGui::DragFloat("##brake force", &g_local_player->m_vehicle->m_handling->m_brake_force, .01f, 0.f, 10.f); - - ImGui::Text("Brake Bias (1.0 = front, 0.0 = rear, 0.5 = balanced)"); - float fBrakeBias = g_local_player->m_vehicle->m_handling->m_brake_bias_front / 2; - if (ImGui::SliderFloat("##brake bias front", &fBrakeBias, 0.f, 1.f)) - g_local_player->m_vehicle->m_handling->m_brake_bias_front = fBrakeBias * 2; - - ImGui::Text("Hand Brake Force"); - ImGui::DragFloat("##hand brake force", &g_local_player->m_vehicle->m_handling->m_handbrake_force, .01f, 0.f, 10.f); - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_brakes() + { + if (ImGui::BeginTabItem("Brakes")) + { + ImGui::Text("Brake Force"); + ImGui::DragFloat("##brake force", &g_local_player->m_vehicle->m_handling->m_brake_force, .01f, 0.f, 10.f); + + ImGui::Text("Brake Bias (1.0 = front, 0.0 = rear, 0.5 = balanced)"); + float fBrakeBias = g_local_player->m_vehicle->m_handling->m_brake_bias_front / 2; + if (ImGui::SliderFloat("##brake bias front", &fBrakeBias, 0.f, 1.f)) + g_local_player->m_vehicle->m_handling->m_brake_bias_front = fBrakeBias * 2; + + ImGui::Text("Hand Brake Force"); + ImGui::DragFloat("##hand brake force", &g_local_player->m_vehicle->m_handling->m_handbrake_force, .01f, 0.f, 10.f); + + ImGui::EndTabItem(); + } + } } \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_gearing.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_gearing.cpp similarity index 93% rename from BigBaseV2/src/gui/window/handling/handling_gearing.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_gearing.cpp index 666885e3..fd9d0534 100644 --- a/BigBaseV2/src/gui/window/handling/handling_gearing.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_gearing.cpp @@ -1,23 +1,23 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_gearing() - { - if (ImGui::BeginTabItem("Gearing")) - { - ImGui::Text("Initial Drive Gears"); - int initial_drive_gears = g_local_player->m_vehicle->m_handling->m_initial_drive_gears; - if (ImGui::DragInt("###handling_drive_gears", &initial_drive_gears, .1f, 1, 16)) - g_local_player->m_vehicle->m_handling->m_initial_drive_gears = initial_drive_gears; - - ImGui::Text("Upshift Multiplier"); - ImGui::DragFloat("###handling_upshift", &g_local_player->m_vehicle->m_handling->m_upshift, .01f, 0.f, 10.f); - - ImGui::Text("Downshift Multiplier"); - ImGui::DragFloat("###handling_downshift", &g_local_player->m_vehicle->m_handling->m_downshift, .01f, 0.f, 10.f); - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_gearing() + { + if (ImGui::BeginTabItem("Gearing")) + { + ImGui::Text("Initial Drive Gears"); + int initial_drive_gears = g_local_player->m_vehicle->m_handling->m_initial_drive_gears; + if (ImGui::DragInt("###handling_drive_gears", &initial_drive_gears, .1f, 1, 16)) + g_local_player->m_vehicle->m_handling->m_initial_drive_gears = initial_drive_gears; + + ImGui::Text("Upshift Multiplier"); + ImGui::DragFloat("###handling_upshift", &g_local_player->m_vehicle->m_handling->m_upshift, .01f, 0.f, 10.f); + + ImGui::Text("Downshift Multiplier"); + ImGui::DragFloat("###handling_downshift", &g_local_player->m_vehicle->m_handling->m_downshift, .01f, 0.f, 10.f); + + ImGui::EndTabItem(); + } + } }; \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_general.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_general.cpp similarity index 94% rename from BigBaseV2/src/gui/window/handling/handling_general.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_general.cpp index cbcdcc5a..4e74c98b 100644 --- a/BigBaseV2/src/gui/window/handling/handling_general.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_general.cpp @@ -1,33 +1,33 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_general() - { - if (ImGui::BeginTabItem("General")) - { - ImGui::Text("Gravity"); - ImGui::SliderFloat("##Gravity", &g_local_player->m_vehicle->m_gravity, -50.f, 50.f); - - ImGui::Text("Mass"); - ImGui::SliderFloat("##Mass", &g_local_player->m_vehicle->m_handling->m_mass, 0.f, 50000.f); - - ImGui::Text("Centre of mass"); - float fCenterOfMass[3]; - fCenterOfMass[0] = g_local_player->m_vehicle->m_handling->m_centre_of_mass.x; - fCenterOfMass[1] = g_local_player->m_vehicle->m_handling->m_centre_of_mass.y; - fCenterOfMass[2] = g_local_player->m_vehicle->m_handling->m_centre_of_mass.z; - if (ImGui::SliderFloat3("##centre_of_mass", fCenterOfMass, -10.f, 10.f)) - { - g_local_player->m_vehicle->m_handling->m_centre_of_mass.x = fCenterOfMass[0]; - g_local_player->m_vehicle->m_handling->m_centre_of_mass.y = fCenterOfMass[1]; - g_local_player->m_vehicle->m_handling->m_centre_of_mass.z = fCenterOfMass[2]; - } - - ImGui::Text("Buoyancy"); - ImGui::SliderFloat("##buoyancy", &g_local_player->m_vehicle->m_handling->m_buoyancy, .01f, 99.f); - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_general() + { + if (ImGui::BeginTabItem("General")) + { + ImGui::Text("Gravity"); + ImGui::SliderFloat("##Gravity", &g_local_player->m_vehicle->m_gravity, -50.f, 50.f); + + ImGui::Text("Mass"); + ImGui::SliderFloat("##Mass", &g_local_player->m_vehicle->m_handling->m_mass, 0.f, 50000.f); + + ImGui::Text("Centre of mass"); + float fCenterOfMass[3]; + fCenterOfMass[0] = g_local_player->m_vehicle->m_handling->m_centre_of_mass.x; + fCenterOfMass[1] = g_local_player->m_vehicle->m_handling->m_centre_of_mass.y; + fCenterOfMass[2] = g_local_player->m_vehicle->m_handling->m_centre_of_mass.z; + if (ImGui::SliderFloat3("##centre_of_mass", fCenterOfMass, -10.f, 10.f)) + { + g_local_player->m_vehicle->m_handling->m_centre_of_mass.x = fCenterOfMass[0]; + g_local_player->m_vehicle->m_handling->m_centre_of_mass.y = fCenterOfMass[1]; + g_local_player->m_vehicle->m_handling->m_centre_of_mass.z = fCenterOfMass[2]; + } + + ImGui::Text("Buoyancy"); + ImGui::SliderFloat("##buoyancy", &g_local_player->m_vehicle->m_handling->m_buoyancy, .01f, 99.f); + + ImGui::EndTabItem(); + } + } } \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_other.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_other.cpp similarity index 94% rename from BigBaseV2/src/gui/window/handling/handling_other.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_other.cpp index 434da6bc..bcc996dc 100644 --- a/BigBaseV2/src/gui/window/handling/handling_other.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_other.cpp @@ -1,30 +1,30 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_other() - { - if (ImGui::BeginTabItem("Other")) - { - ImGui::Text("Acceleration Multiplier"); - ImGui::DragFloat("###handling_acceleration", &g_local_player->m_vehicle->m_handling->m_acceleration, 1.f, .01f, 10.f); - - ImGui::Text("Downforce Multiplier"); - ImGui::DragFloat("###handling_downforce", &g_local_player->m_vehicle->m_handling->m_downforce_multiplier, 1.f, 0.f, 10.f); - - ImGui::Text("Inertia Multiplier"); - float fInertiaMult[3]; - fInertiaMult[0] = g_local_player->m_vehicle->m_handling->m_inertia_mult.x; - fInertiaMult[1] = g_local_player->m_vehicle->m_handling->m_inertia_mult.y; - fInertiaMult[2] = g_local_player->m_vehicle->m_handling->m_inertia_mult.z; - if (ImGui::SliderFloat3("##inertia_multiplier", fInertiaMult, -10.f, 10.f)) - { - g_local_player->m_vehicle->m_handling->m_inertia_mult.x = fInertiaMult[0]; - g_local_player->m_vehicle->m_handling->m_inertia_mult.y = fInertiaMult[1]; - g_local_player->m_vehicle->m_handling->m_inertia_mult.z = fInertiaMult[2]; - } - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_other() + { + if (ImGui::BeginTabItem("Other")) + { + ImGui::Text("Acceleration Multiplier"); + ImGui::DragFloat("###handling_acceleration", &g_local_player->m_vehicle->m_handling->m_acceleration, 1.f, .01f, 10.f); + + ImGui::Text("Downforce Multiplier"); + ImGui::DragFloat("###handling_downforce", &g_local_player->m_vehicle->m_handling->m_downforce_multiplier, 1.f, 0.f, 10.f); + + ImGui::Text("Inertia Multiplier"); + float fInertiaMult[3]; + fInertiaMult[0] = g_local_player->m_vehicle->m_handling->m_inertia_mult.x; + fInertiaMult[1] = g_local_player->m_vehicle->m_handling->m_inertia_mult.y; + fInertiaMult[2] = g_local_player->m_vehicle->m_handling->m_inertia_mult.z; + if (ImGui::SliderFloat3("##inertia_multiplier", fInertiaMult, -10.f, 10.f)) + { + g_local_player->m_vehicle->m_handling->m_inertia_mult.x = fInertiaMult[0]; + g_local_player->m_vehicle->m_handling->m_inertia_mult.y = fInertiaMult[1]; + g_local_player->m_vehicle->m_handling->m_inertia_mult.z = fInertiaMult[2]; + } + + ImGui::EndTabItem(); + } + } }; \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_roll_centre_height.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_roll_centre_height.cpp similarity index 93% rename from BigBaseV2/src/gui/window/handling/handling_roll_centre_height.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_roll_centre_height.cpp index 84b6ef5b..40393f51 100644 --- a/BigBaseV2/src/gui/window/handling/handling_roll_centre_height.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_roll_centre_height.cpp @@ -1,22 +1,22 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_roll_centre_height() - { - if (ImGui::BeginTabItem("Roll Centre Height")) - { - ImGui::Text("The point in the transverse vertical plane through any pair of wheel centres\nat which lateral forces apply to the sprung mass without producing suspension roll."); - - ImGui::Separator(); - - ImGui::Text("Roll Centre Height Front"); - ImGui::SliderFloat("##roll centre height front", &g_local_player->m_vehicle->m_handling->m_roll_centre_height_front, -1.f, 1.f); - - ImGui::Text("Roll Centre Height Back"); - ImGui::SliderFloat("##roll centre height back", &g_local_player->m_vehicle->m_handling->m_roll_centre_height_rear, -1.f, 1.f); - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_roll_centre_height() + { + if (ImGui::BeginTabItem("Roll Centre Height")) + { + ImGui::Text("The point in the transverse vertical plane through any pair of wheel centres\nat which lateral forces apply to the sprung mass without producing suspension roll."); + + ImGui::Separator(); + + ImGui::Text("Roll Centre Height Front"); + ImGui::SliderFloat("##roll centre height front", &g_local_player->m_vehicle->m_handling->m_roll_centre_height_front, -1.f, 1.f); + + ImGui::Text("Roll Centre Height Back"); + ImGui::SliderFloat("##roll centre height back", &g_local_player->m_vehicle->m_handling->m_roll_centre_height_rear, -1.f, 1.f); + + ImGui::EndTabItem(); + } + } }; \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_rollbars.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_rollbars.cpp similarity index 93% rename from BigBaseV2/src/gui/window/handling/handling_rollbars.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_rollbars.cpp index 065be22b..73ed4227 100644 --- a/BigBaseV2/src/gui/window/handling/handling_rollbars.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_rollbars.cpp @@ -1,20 +1,20 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_rollbars() - { - if (ImGui::BeginTabItem("Rollbars")) - { - ImGui::Text("Anti-Roll Bar force"); - ImGui::SliderFloat("##anti rollbar force", &g_local_player->m_vehicle->m_handling->m_anti_rollbar_force, 0.f, 10.f); - - ImGui::Text("Anti-Roll Bar Bias front (0 = front, 1 = rear)"); - float fAntiRollBarBiasFront = g_local_player->m_vehicle->m_handling->m_anti_rollbar_bias_front / 2; - if (ImGui::SliderFloat("##anti rollbar bias", &fAntiRollBarBiasFront, 0.f, 1.f)) - g_local_player->m_vehicle->m_handling->m_anti_rollbar_bias_front = fAntiRollBarBiasFront * 2; - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_rollbars() + { + if (ImGui::BeginTabItem("Rollbars")) + { + ImGui::Text("Anti-Roll Bar force"); + ImGui::SliderFloat("##anti rollbar force", &g_local_player->m_vehicle->m_handling->m_anti_rollbar_force, 0.f, 10.f); + + ImGui::Text("Anti-Roll Bar Bias front (0 = front, 1 = rear)"); + float fAntiRollBarBiasFront = g_local_player->m_vehicle->m_handling->m_anti_rollbar_bias_front / 2; + if (ImGui::SliderFloat("##anti rollbar bias", &fAntiRollBarBiasFront, 0.f, 1.f)) + g_local_player->m_vehicle->m_handling->m_anti_rollbar_bias_front = fAntiRollBarBiasFront * 2; + + ImGui::EndTabItem(); + } + } }; \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_steering.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_steering.cpp similarity index 86% rename from BigBaseV2/src/gui/window/handling/handling_steering.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_steering.cpp index 9608aa22..323dedbc 100644 --- a/BigBaseV2/src/gui/window/handling/handling_steering.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_steering.cpp @@ -1,15 +1,15 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_steering() - { - if (ImGui::BeginTabItem("Steering")) - { - ImGui::Text("Steering Lock (degrees)"); - ImGui::SliderAngle("##steering lock", &g_local_player->m_vehicle->m_handling->m_steering_lock, -90.f, 90.f); - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_steering() + { + if (ImGui::BeginTabItem("Steering")) + { + ImGui::Text("Steering Lock (degrees)"); + ImGui::SliderAngle("##steering lock", &g_local_player->m_vehicle->m_handling->m_steering_lock, -90.f, 90.f); + + ImGui::EndTabItem(); + } + } } \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_suspension.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_suspension.cpp similarity index 96% rename from BigBaseV2/src/gui/window/handling/handling_suspension.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_suspension.cpp index 5d2d1cb9..14297a5f 100644 --- a/BigBaseV2/src/gui/window/handling/handling_suspension.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_suspension.cpp @@ -1,35 +1,35 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_suspension() - { - if (ImGui::BeginTabItem("Suspension")) - { - ImGui::Text("Suspension Force (General Suspension Strength)"); - ImGui::SliderFloat("##suspension force", &g_local_player->m_vehicle->m_handling->m_suspension_force, 0.f, 5.f); - - ImGui::Text("Suspension Compression Damp (Higher = Less Compression)"); - ImGui::SliderFloat("##suspension comp", &g_local_player->m_vehicle->m_handling->m_suspension_comp_damp, 0.f, 5.f); - - ImGui::Text("Suspension Rebound Damp (Higher = Less Decompression)"); - ImGui::SliderFloat("##suspension rebound", &g_local_player->m_vehicle->m_handling->m_suspension_rebound_damp, 0.f, 5.f); - - ImGui::Text("Suspension Upper Limit (mostly visual)"); - ImGui::SliderFloat("##suspension upper", &g_local_player->m_vehicle->m_handling->m_suspension_upper_limit, -1.f, 1.f); - - ImGui::Text("Suspension Lower Limit (mostly visual)"); - ImGui::SliderFloat("##suspension lower", &g_local_player->m_vehicle->m_handling->m_suspension_lower_limit, -1.f, 1.f); - - ImGui::Text("Suspension Raise (Ride Height)"); - ImGui::SliderFloat("##suspension raise", &g_local_player->m_vehicle->m_handling->m_suspension_raise, -1.f, 1.f); - - ImGui::Text("Suspension Bias Front (Strength Bias, 1 = front, 0 = rear)"); - float fSuspensionBiasFront = g_local_player->m_vehicle->m_handling->m_suspension_bias_front / 2; - if (ImGui::SliderFloat("##suspension bias", &fSuspensionBiasFront, 0.f, 1.f)) - g_local_player->m_vehicle->m_handling->m_suspension_bias_front = fSuspensionBiasFront * 2; - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_suspension() + { + if (ImGui::BeginTabItem("Suspension")) + { + ImGui::Text("Suspension Force (General Suspension Strength)"); + ImGui::SliderFloat("##suspension force", &g_local_player->m_vehicle->m_handling->m_suspension_force, 0.f, 5.f); + + ImGui::Text("Suspension Compression Damp (Higher = Less Compression)"); + ImGui::SliderFloat("##suspension comp", &g_local_player->m_vehicle->m_handling->m_suspension_comp_damp, 0.f, 5.f); + + ImGui::Text("Suspension Rebound Damp (Higher = Less Decompression)"); + ImGui::SliderFloat("##suspension rebound", &g_local_player->m_vehicle->m_handling->m_suspension_rebound_damp, 0.f, 5.f); + + ImGui::Text("Suspension Upper Limit (mostly visual)"); + ImGui::SliderFloat("##suspension upper", &g_local_player->m_vehicle->m_handling->m_suspension_upper_limit, -1.f, 1.f); + + ImGui::Text("Suspension Lower Limit (mostly visual)"); + ImGui::SliderFloat("##suspension lower", &g_local_player->m_vehicle->m_handling->m_suspension_lower_limit, -1.f, 1.f); + + ImGui::Text("Suspension Raise (Ride Height)"); + ImGui::SliderFloat("##suspension raise", &g_local_player->m_vehicle->m_handling->m_suspension_raise, -1.f, 1.f); + + ImGui::Text("Suspension Bias Front (Strength Bias, 1 = front, 0 = rear)"); + float fSuspensionBiasFront = g_local_player->m_vehicle->m_handling->m_suspension_bias_front / 2; + if (ImGui::SliderFloat("##suspension bias", &fSuspensionBiasFront, 0.f, 1.f)) + g_local_player->m_vehicle->m_handling->m_suspension_bias_front = fSuspensionBiasFront * 2; + + ImGui::EndTabItem(); + } + } } \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_tabs.hpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_tabs.hpp similarity index 94% rename from BigBaseV2/src/gui/window/handling/handling_tabs.hpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_tabs.hpp index f766ae57..dca31a78 100644 --- a/BigBaseV2/src/gui/window/handling/handling_tabs.hpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_tabs.hpp @@ -1,27 +1,27 @@ -#pragma once -#include "common.hpp" -#include "imgui.h" - -namespace big -{ - class tab_handling - { - public: - static void tab_brakes(); - static void tab_gearing(); - static void tab_general(); - static void tab_other(); - static void tab_rollbars(); - static void tab_roll_centre_height(); - static void tab_suspension(); - static void tab_steering(); - static void tab_traction(); - static void tab_transmission(); - }; - - class modal_handling - { - public: - static void modal_save_handling(); - }; +#pragma once +#include "common.hpp" +#include "imgui.h" + +namespace big +{ + class tab_handling + { + public: + static void tab_brakes(); + static void tab_gearing(); + static void tab_general(); + static void tab_other(); + static void tab_rollbars(); + static void tab_roll_centre_height(); + static void tab_suspension(); + static void tab_steering(); + static void tab_traction(); + static void tab_transmission(); + }; + + class modal_handling + { + public: + static void modal_save_handling(); + }; } \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_traction.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_traction.cpp similarity index 96% rename from BigBaseV2/src/gui/window/handling/handling_traction.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_traction.cpp index 6d4f44f4..d74baf0f 100644 --- a/BigBaseV2/src/gui/window/handling/handling_traction.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_traction.cpp @@ -1,38 +1,38 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_traction() - { - if (ImGui::BeginTabItem("Traction")) - { - ImGui::Text("Minimum Traction"); - ImGui::SliderFloat("##traction curve min", &g_local_player->m_vehicle->m_handling->m_traction_curve_min, 0.f, 7.f); - - ImGui::Text("Peak Traction before grip is lost"); - ImGui::SliderFloat("##traction curve max", &g_local_player->m_vehicle->m_handling->m_traction_curve_max, 0.f, 7.f); - - ImGui::Text("Traction Curve (point of grip loss)"); - ImGui::SliderAngle("##traction curve lateral", &g_local_player->m_vehicle->m_handling->m_traction_curve_lateral); - - ImGui::Text("Traction Height Loss (distance ground and tires)"); - ImGui::SliderFloat("##traction spring delta max", &g_local_player->m_vehicle->m_handling->m_traction_spring_delta_max, 0.f, 2.f); - - ImGui::Text("Burnout Multiplier"); - ImGui::SliderFloat("##low speed traction loss mult", &g_local_player->m_vehicle->m_handling->m_low_speed_traction_loss_mult, 0.f, 10.f); - - //ImGui::Text("Camber Stiffness (grip when drifting)"); - //ImGui::SliderFloat("##camber stiffness", &g_local_player->m_vehicle->m_handling->m_camber_stiffness, -1.f, 1.f); - - ImGui::Text("Traction Bias (1.0 = front, 0.0 = rear, 0.5 = balanced)"); - float fTractionBiasFront = g_local_player->m_vehicle->m_handling->m_traction_bias_front / 2; - if (ImGui::SliderFloat("##traction bias front", &fTractionBiasFront, 0.01f, .99f)) - g_local_player->m_vehicle->m_handling->m_traction_bias_front = fTractionBiasFront * 2; - - ImGui::Text("Off-Road Traction Loss (1.0 = normal, lower = better)"); - ImGui::SliderFloat("##traction loss mult", &g_local_player->m_vehicle->m_handling->m_traction_loss_mult, 0.f, 5.f); - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_traction() + { + if (ImGui::BeginTabItem("Traction")) + { + ImGui::Text("Minimum Traction"); + ImGui::SliderFloat("##traction curve min", &g_local_player->m_vehicle->m_handling->m_traction_curve_min, 0.f, 7.f); + + ImGui::Text("Peak Traction before grip is lost"); + ImGui::SliderFloat("##traction curve max", &g_local_player->m_vehicle->m_handling->m_traction_curve_max, 0.f, 7.f); + + ImGui::Text("Traction Curve (point of grip loss)"); + ImGui::SliderAngle("##traction curve lateral", &g_local_player->m_vehicle->m_handling->m_traction_curve_lateral); + + ImGui::Text("Traction Height Loss (distance ground and tires)"); + ImGui::SliderFloat("##traction spring delta max", &g_local_player->m_vehicle->m_handling->m_traction_spring_delta_max, 0.f, 2.f); + + ImGui::Text("Burnout Multiplier"); + ImGui::SliderFloat("##low speed traction loss mult", &g_local_player->m_vehicle->m_handling->m_low_speed_traction_loss_mult, 0.f, 10.f); + + //ImGui::Text("Camber Stiffness (grip when drifting)"); + //ImGui::SliderFloat("##camber stiffness", &g_local_player->m_vehicle->m_handling->m_camber_stiffness, -1.f, 1.f); + + ImGui::Text("Traction Bias (1.0 = front, 0.0 = rear, 0.5 = balanced)"); + float fTractionBiasFront = g_local_player->m_vehicle->m_handling->m_traction_bias_front / 2; + if (ImGui::SliderFloat("##traction bias front", &fTractionBiasFront, 0.01f, .99f)) + g_local_player->m_vehicle->m_handling->m_traction_bias_front = fTractionBiasFront * 2; + + ImGui::Text("Off-Road Traction Loss (1.0 = normal, lower = better)"); + ImGui::SliderFloat("##traction loss mult", &g_local_player->m_vehicle->m_handling->m_traction_loss_mult, 0.f, 5.f); + + ImGui::EndTabItem(); + } + } } \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/handling_transmission.cpp b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_transmission.cpp similarity index 94% rename from BigBaseV2/src/gui/window/handling/handling_transmission.cpp rename to BigBaseV2/src/gui/window/handling/current_profile/current_profile_transmission.cpp index 9a82da8e..7ee085b8 100644 --- a/BigBaseV2/src/gui/window/handling/handling_transmission.cpp +++ b/BigBaseV2/src/gui/window/handling/current_profile/current_profile_transmission.cpp @@ -1,25 +1,25 @@ -#include "handling_tabs.hpp" - -namespace big -{ - void tab_handling::tab_transmission() - { - if (ImGui::BeginTabItem("Transmission")) - { - ImGui::Text("Drive Bias (1.0 = front, 0.0 = rear, 0.5 = balanced 4WD)"); - float fDriveBiasFront = g_local_player->m_vehicle->m_handling->m_drive_bias_front / 2; - if (ImGui::SliderFloat("##drive_bias_front", &fDriveBiasFront, 0.f, 1.0f)) - g_local_player->m_vehicle->m_handling->m_drive_bias_front = fDriveBiasFront * 2; - - ImGui::Text("Drive Bias (1.0 = rear, 0.0 = front, 0.5 = balanced 4WD)"); - float fDriveBiasRear = g_local_player->m_vehicle->m_handling->m_drive_bias_rear / 2; - if (ImGui::SliderFloat("##drive_bias_rear", &fDriveBiasRear, 0.f, 1.0f)) - g_local_player->m_vehicle->m_handling->m_drive_bias_rear = fDriveBiasRear * 2; - - ImGui::Text("Transmission Output (force)"); - ImGui::SliderFloat("##initial drive force", &g_local_player->m_vehicle->m_handling->m_initial_drive_force, 0.01f, 2.f); - - ImGui::EndTabItem(); - } - } +#include "current_profile_tabs.hpp" + +namespace big +{ + void tab_handling::tab_transmission() + { + if (ImGui::BeginTabItem("Transmission")) + { + ImGui::Text("Drive Bias (1.0 = front, 0.0 = rear, 0.5 = balanced 4WD)"); + float fDriveBiasFront = g_local_player->m_vehicle->m_handling->m_drive_bias_front / 2; + if (ImGui::SliderFloat("##drive_bias_front", &fDriveBiasFront, 0.f, 1.0f)) + g_local_player->m_vehicle->m_handling->m_drive_bias_front = fDriveBiasFront * 2; + + ImGui::Text("Drive Bias (1.0 = rear, 0.0 = front, 0.5 = balanced 4WD)"); + float fDriveBiasRear = g_local_player->m_vehicle->m_handling->m_drive_bias_rear / 2; + if (ImGui::SliderFloat("##drive_bias_rear", &fDriveBiasRear, 0.f, 1.0f)) + g_local_player->m_vehicle->m_handling->m_drive_bias_rear = fDriveBiasRear * 2; + + ImGui::Text("Transmission Output (force)"); + ImGui::SliderFloat("##initial drive force", &g_local_player->m_vehicle->m_handling->m_initial_drive_force, 0.01f, 2.f); + + ImGui::EndTabItem(); + } + } } \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/handling/modals/save_handling.cpp b/BigBaseV2/src/gui/window/handling/modals/save_handling.cpp index 32712a55..fe49221b 100644 --- a/BigBaseV2/src/gui/window/handling/modals/save_handling.cpp +++ b/BigBaseV2/src/gui/window/handling/modals/save_handling.cpp @@ -1,4 +1,4 @@ -#include "../handling_tabs.hpp" +#include "../current_profile/current_profile_tabs.hpp" #include "fiber_pool.hpp" #include "natives.hpp" #include "script.hpp"