refactor(Handling): switch from DragFloats to SliderFloats (#2662)

This commit is contained in:
Robert Motrogeanu 2024-01-28 07:19:58 -05:00 committed by GitHub
parent b0e528d7cd
commit dfb3ecc9be
3 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@ namespace big
if (ImGui::BeginTabItem("HANDLING_TAB_BRAKES"_T.data()))
{
ImGui::Text("HANDLING_BRAKE_FORCE"_T.data());
ImGui::DragFloat("##brake force", &g_local_player->m_vehicle->m_handling_data->m_brake_force, .01f, 0.f, 10.f);
ImGui::SliderFloat("##brake force", &g_local_player->m_vehicle->m_handling_data->m_brake_force, .01f, 10.f);
ImGui::Text("HANDLING_BRAKE_BIAS"_T.data());
float fBrakeBias = g_local_player->m_vehicle->m_handling_data->m_brake_bias_front / 2;
@ -15,7 +15,7 @@ namespace big
g_local_player->m_vehicle->m_handling_data->m_brake_bias_front = fBrakeBias * 2;
ImGui::Text("HANDLING_HAND_BRAKE_FORCE"_T.data());
ImGui::DragFloat("##hand brake force", &g_local_player->m_vehicle->m_handling_data->m_handbrake_force, .01f, 0.f, 10.f);
ImGui::SliderFloat("##hand brake force", &g_local_player->m_vehicle->m_handling_data->m_handbrake_force, .01f, 10.f);
ImGui::EndTabItem();
}

View File

@ -12,10 +12,10 @@ namespace big
g_local_player->m_vehicle->m_handling_data->m_initial_drive_gears = initial_drive_gears;
ImGui::Text("HANDLING_UPSHIFT_MULTIPLIER"_T.data());
ImGui::DragFloat("###handling_upshift", &g_local_player->m_vehicle->m_handling_data->m_upshift, .01f, 0.f, 10.f);
ImGui::SliderFloat("###handling_upshift", &g_local_player->m_vehicle->m_handling_data->m_upshift, .01f, 10.f);
ImGui::Text("HANDLING_DOWNSHIFT_MULTIPLIER"_T.data());
ImGui::DragFloat("###handling_downshift", &g_local_player->m_vehicle->m_handling_data->m_downshift, .01f, 0.f, 10.f);
ImGui::SliderFloat("###handling_downshift", &g_local_player->m_vehicle->m_handling_data->m_downshift, .01f, 10.f);
ImGui::EndTabItem();
}

View File

@ -7,10 +7,10 @@ namespace big
if (ImGui::BeginTabItem("HANDLING_TAB_OTHER"_T.data()))
{
ImGui::Text("HANDLING_ACCELERATION_MULTIPLIER"_T.data());
ImGui::DragFloat("###handling_acceleration", &g_local_player->m_vehicle->m_handling_data->m_acceleration, .01f, .01f, 10.f);
ImGui::SliderFloat("###handling_acceleration", &g_local_player->m_vehicle->m_handling_data->m_acceleration, .01f, 10.f);
ImGui::Text("HANDLING_DOWNFORCE_MULTIPLIER"_T.data());
ImGui::DragFloat("###handling_downforce", &g_local_player->m_vehicle->m_handling_data->m_downforce_multiplier, .01f, .01f, 10.f);
ImGui::SliderFloat("###handling_downforce", &g_local_player->m_vehicle->m_handling_data->m_downforce_multiplier, .01f, 10.f);
ImGui::Text("HANDLING_INERTIA_MULTIPLIER"_T.data());
float fInertiaMult[3];