General UI tweaks (#1538)

This commit is contained in:
DayibBaba
2023-06-27 14:05:44 +02:00
committed by GitHub
parent f8f63a789a
commit 5fc6ef8fb5
19 changed files with 85 additions and 160 deletions

View File

@ -14,7 +14,8 @@ namespace big
{
void view::fun_vehicle()
{
components::sub_title("SEAT_CHANGER"_T);
ImGui::SeparatorText("SEAT_CHANGER"_T.data());
{
static std::map<int, bool> seats;
static bool ready = true;
@ -80,10 +81,7 @@ namespace big
}
}
}
ImGui::Separator();
components::sub_title("AUTO_DRIVE"_T);
ImGui::SeparatorText("AUTO_DRIVE"_T.data());
{
float auto_drive_speed_user_unit = vehicle::mps_to_speed(g.vehicle.auto_drive_speed, g.vehicle.speed_unit);
if (ImGui::SliderFloat(
@ -136,10 +134,7 @@ namespace big
if (components::button("EMERGENCY_STOP"_T))
g.vehicle.auto_drive_destination = AutoDriveDestination::EMERGENCY_STOP;
}
ImGui::Separator();
components::sub_title("RAINBOW_PAINT"_T);
ImGui::SeparatorText("RAINBOW_PAINT"_T.data());
{
components::command_checkbox<"rainbowpri">("PRIMARY"_T);
ImGui::SameLine();
@ -200,11 +195,7 @@ namespace big
ImGui::EndCombo();
}
ImGui::Separator();
components::sub_title("VEHICLE_FLY"_T);
ImGui::SeparatorText("VEHICLE_FLY"_T.data());
{
ImGui::BeginGroup();

View File

@ -208,7 +208,7 @@ namespace big
{
g_fiber_pool->queue_job([] {
vehicle::max_vehicle_performance(self::veh);
// refresh mod names
player_vehicle = 0;
});
@ -228,8 +228,7 @@ namespace big
});
}
ImGui::Separator();
components::sub_title("MOD_OPTIONS"_T);
ImGui::SeparatorText("MOD_OPTIONS"_T.data());
bool is_bulletproof_tires = !owned_mods[MOD_TIRE_CAN_BURST];
if (ImGui::Checkbox("BULLETPROOF_TIRES"_T.data(), (bool*)&is_bulletproof_tires))
@ -263,7 +262,7 @@ namespace big
});
}
ImGui::Separator();
ImGui::SeparatorText("Mod Slots");
ImGui::BeginGroup();
@ -419,9 +418,7 @@ namespace big
}
}
ImGui::Separator();
components::sub_title("NEON_LIGHT_OPTIONS"_T);
ImGui::SeparatorText("NEON_LIGHT_OPTIONS"_T.data());
ImGui::PushID("##headlight_en");
if (ImGui::Checkbox("HEADLIGHT"_T.data(), (bool*)&owned_mods[MOD_XENON_LIGHTS]))
@ -492,8 +489,7 @@ namespace big
});
ImGui::PopID();
ImGui::Separator();
components::sub_title("COLOR_OPTIONS"_T);
ImGui::SeparatorText("COLOR_OPTIONS"_T.data());
static int color_to_change = 0;
static int color_type = 8;
@ -765,7 +761,7 @@ namespace big
{
switch (color_type)
{
case 0://Chrome
case 0: //Chrome
{
if (ImGui::Selectable("CHROME"_T.data(), selected_color == COLOR_CHROME))
{
@ -784,7 +780,7 @@ namespace big
}
break;
}
case 1://Classic
case 1: //Classic
{
for (const auto& [color, name] : lsc_classic_colors)
{
@ -808,7 +804,7 @@ namespace big
}
break;
}
case 2://Matte
case 2: //Matte
{
for (const auto& [color, name] : lsc_matte_colors)
{
@ -832,7 +828,7 @@ namespace big
}
break;
}
case 3://Metals
case 3: //Metals
{
for (const auto& [color, name] : lsc_metal_colors)
{
@ -856,7 +852,7 @@ namespace big
}
break;
}
case 4://Pearlescent
case 4: //Pearlescent
{
for (const auto& [color, name] : lsc_classic_colors)
{
@ -872,7 +868,7 @@ namespace big
}
break;
}
case 5://Wheel Color
case 5: //Wheel Color
{
for (const auto& [color, name] : lsc_classic_colors)
{
@ -888,7 +884,7 @@ namespace big
}
break;
}
case 6://Interior Color
case 6: //Interior Color
{
for (const auto& [color, name] : lsc_classic_colors)
{
@ -904,7 +900,7 @@ namespace big
}
break;
}
case 7://Dashboard Color
case 7: //Dashboard Color
{
for (const auto& [color, name] : lsc_classic_colors)
{
@ -920,7 +916,7 @@ namespace big
}
break;
}
case 9://Headlight Color
case 9: //Headlight Color
{
for (const auto& [color, name] : lsc_headlight_colors)
{

View File

@ -63,9 +63,7 @@ namespace big
ImGui::SameLine();
components::command_checkbox<"keepengine">();
ImGui::Separator();
components::sub_title("GENERAL"_T);
ImGui::SeparatorText("GENERAL"_T.data());
{
ImGui::BeginGroup();
@ -124,10 +122,7 @@ namespace big
ImGui::EndGroup();
}
ImGui::Separator();
components::sub_title("PROOFS"_T);
ImGui::SeparatorText("PROOFS"_T.data());
{
if (ImGui::Button("CHECK_ALL"_T.data()))
{
@ -180,10 +175,7 @@ namespace big
ImGui::EndGroup();
}
ImGui::Separator();
components::sub_title("SPEED_UNIT"_T);
ImGui::SeparatorText("SPEED_UNIT"_T.data());
{
ImGui::RadioButton(speed_unit_strings[(int)SpeedUnit::KMPH].c_str(), (int*)&g.vehicle.speed_unit, (int)SpeedUnit::KMPH);
ImGui::SameLine();