Add more spoofing options and added clang-format (#1020)
* feat(Spoofing): add spoofing * feat(Spoofing): prepare code for player attach * remove(PlayerAttach): isn't going to work due to netsync architecture * fix(GUI): fix scaling * feat(Project): add clang-format file * feat(Classes): update classes * fix(BlackHole): remove unnecessary cleanup * fix(Formatting): fix formatting for initializer lists * feat(clang-format): Set tab width and 1 space before comment Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
#include "core/data/speed_units.hpp"
|
||||
#include "core/enums.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "core/data/speed_units.hpp"
|
||||
#include "services/gta_data/gta_data_service.hpp"
|
||||
#include "services/model_preview/model_preview_service.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
#include <imgui_internal.h>
|
||||
|
||||
@ -29,7 +29,6 @@ namespace big
|
||||
ready = false;
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
|
||||
std::map<int, bool> tmp_seats;
|
||||
|
||||
int num_of_seats = VEHICLE::GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(self::veh);
|
||||
@ -66,7 +65,8 @@ namespace big
|
||||
name = "FUN_VEHICLE_SEAT"_T.data() + std::to_string(idx + 1);
|
||||
}
|
||||
|
||||
if ((idx + 1) % 4 != 0) {
|
||||
if ((idx + 1) % 4 != 0)
|
||||
{
|
||||
ImGui::SameLine();
|
||||
}
|
||||
|
||||
@ -87,16 +87,17 @@ namespace big
|
||||
{
|
||||
float auto_drive_speed_user_unit = vehicle::mps_to_speed(g.vehicle.auto_drive_speed, g.vehicle.speed_unit);
|
||||
if (ImGui::SliderFloat(
|
||||
std::vformat("FUN_VEHICLE_TOP_SPEED"_T, std::make_format_args(speed_unit_strings[(int)g.vehicle.speed_unit])).c_str(),
|
||||
&auto_drive_speed_user_unit,
|
||||
vehicle::mps_to_speed(0.f, g.vehicle.speed_unit),
|
||||
vehicle::mps_to_speed(150.f, g.vehicle.speed_unit),
|
||||
"%.1f"
|
||||
)) {
|
||||
std::vformat("FUN_VEHICLE_TOP_SPEED"_T, std::make_format_args(speed_unit_strings[(int)g.vehicle.speed_unit]))
|
||||
.c_str(),
|
||||
&auto_drive_speed_user_unit,
|
||||
vehicle::mps_to_speed(0.f, g.vehicle.speed_unit),
|
||||
vehicle::mps_to_speed(150.f, g.vehicle.speed_unit),
|
||||
"%.1f"))
|
||||
{
|
||||
g.vehicle.auto_drive_speed = vehicle::speed_to_mps(auto_drive_speed_user_unit, g.vehicle.speed_unit);
|
||||
}
|
||||
|
||||
const char* driving_style_names[] = { "LAW_ABIDING"_T.data(), "ROAD_IS_YOURS"_T.data() };
|
||||
const char* driving_style_names[] = {"LAW_ABIDING"_T.data(), "ROAD_IS_YOURS"_T.data()};
|
||||
if (ImGui::BeginCombo("DRIVING_STYLE"_T.data(), driving_style_names[(int)g.vehicle.auto_drive_style]))
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
@ -104,10 +105,8 @@ namespace big
|
||||
if (ImGui::Selectable(driving_style_names[i], g.vehicle.auto_drive_style == (AutoDriveStyle)i))
|
||||
{
|
||||
g.vehicle.auto_drive_style = (AutoDriveStyle)i;
|
||||
g_notification_service->push_warning(
|
||||
"AUTO_DRIVE"_T.data(),
|
||||
std::vformat("DRIVING_STYLE_SET_TO"_T.data(), std::make_format_args(driving_style_names[i]))
|
||||
);
|
||||
g_notification_service->push_warning("AUTO_DRIVE"_T.data(),
|
||||
std::vformat("DRIVING_STYLE_SET_TO"_T.data(), std::make_format_args(driving_style_names[i])));
|
||||
}
|
||||
|
||||
if (g.vehicle.auto_drive_style == (AutoDriveStyle)i)
|
||||
@ -119,21 +118,23 @@ namespace big
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
if (components::button("TO_OBJECTIVE"_T)) {
|
||||
if (components::button("TO_OBJECTIVE"_T))
|
||||
g.vehicle.auto_drive_destination = AutoDriveDestination::OBJECTITVE;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (components::button("TO_WAYPOINT"_T)) {
|
||||
|
||||
if (components::button("TO_WAYPOINT"_T))
|
||||
g.vehicle.auto_drive_destination = AutoDriveDestination::WAYPOINT;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (components::button("WANDER"_T)) {
|
||||
|
||||
if (components::button("WANDER"_T))
|
||||
g.vehicle.auto_drive_destination = AutoDriveDestination::WANDER;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (components::button("EMERGENCY_STOP"_T)) {
|
||||
|
||||
if (components::button("EMERGENCY_STOP"_T))
|
||||
g.vehicle.auto_drive_destination = AutoDriveDestination::EMERGENCY_STOP;
|
||||
}
|
||||
}
|
||||
ImGui::Separator();
|
||||
|
||||
@ -148,7 +149,7 @@ namespace big
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("SMOKE"_T.data(), &g.vehicle.rainbow_paint.smoke);
|
||||
|
||||
const char* rgb_types[] = { "OFF"_T.data(), "FADE"_T.data(), "SPASM"_T.data() };
|
||||
const char* rgb_types[] = {"OFF"_T.data(), "FADE"_T.data(), "SPASM"_T.data()};
|
||||
|
||||
ImGui::SetNextItemWidth(120);
|
||||
if (ImGui::BeginCombo("RGB_TYPE"_T.data(), rgb_types[(int)g.vehicle.rainbow_paint.type]))
|
||||
@ -179,7 +180,7 @@ namespace big
|
||||
}
|
||||
ImGui::Separator();
|
||||
|
||||
const char* boost_behaviors[] = { "DEFAULT"_T.data(), "INSTANT_REFILL"_T.data(), "INFINITE"_T.data() };
|
||||
const char* boost_behaviors[] = {"DEFAULT"_T.data(), "INSTANT_REFILL"_T.data(), "INFINITE"_T.data()};
|
||||
if (ImGui::BeginCombo("BOOST_BEHAVIOR"_T.data(), boost_behaviors[static_cast<int>(g.vehicle.boost_behavior)]))
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
@ -221,12 +222,13 @@ namespace big
|
||||
|
||||
float fly_speed_user_unit = vehicle::mps_to_speed(g.vehicle.fly.speed, g.vehicle.speed_unit);
|
||||
if (ImGui::SliderFloat(
|
||||
std::vformat("FUN_VEHICLE_SPEED"_T.data(), std::make_format_args(speed_unit_strings[(int)g.vehicle.speed_unit])).c_str(),
|
||||
&fly_speed_user_unit,
|
||||
vehicle::mps_to_speed(0.f, g.vehicle.speed_unit),
|
||||
vehicle::mps_to_speed(150.f, g.vehicle.speed_unit),
|
||||
"%.1f"
|
||||
)) {
|
||||
std::vformat("FUN_VEHICLE_SPEED"_T.data(), std::make_format_args(speed_unit_strings[(int)g.vehicle.speed_unit]))
|
||||
.c_str(),
|
||||
&fly_speed_user_unit,
|
||||
vehicle::mps_to_speed(0.f, g.vehicle.speed_unit),
|
||||
vehicle::mps_to_speed(150.f, g.vehicle.speed_unit),
|
||||
"%.1f"))
|
||||
{
|
||||
g.vehicle.fly.speed = vehicle::speed_to_mps(fly_speed_user_unit, g.vehicle.speed_unit);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
#include "core/data/lsc_types.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "services/vehicle_helper/vehicle_helper.hpp"
|
||||
#include "core/data/lsc_types.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
#include <imgui_internal.h>
|
||||
|
||||
namespace big
|
||||
@ -12,7 +13,7 @@ namespace big
|
||||
void view::lsc()
|
||||
{
|
||||
static Vehicle player_vehicle = 0;
|
||||
static bool ready = true;
|
||||
static bool ready = true;
|
||||
|
||||
static std::map<int, int32_t> owned_mods;
|
||||
static std::map<int, std::string> slot_display_names;
|
||||
@ -20,14 +21,14 @@ namespace big
|
||||
static std::map<std::string, std::vector<int>> front_wheel_map;
|
||||
static std::map<std::string, std::vector<int>> rear_wheel_map;
|
||||
|
||||
static int selected_slot = -1;
|
||||
static bool is_bennys = false;
|
||||
static int selected_slot = -1;
|
||||
static bool is_bennys = false;
|
||||
static int front_wheel_stock_mod = -1;
|
||||
static int rear_wheel_stock_mod = -1;
|
||||
static int rear_wheel_stock_mod = -1;
|
||||
|
||||
if (self::veh == 0 || player_vehicle != self::veh)
|
||||
{
|
||||
if (self::veh == 0 )
|
||||
if (self::veh == 0)
|
||||
{
|
||||
owned_mods.clear();
|
||||
slot_display_names.clear();
|
||||
@ -44,7 +45,7 @@ namespace big
|
||||
|
||||
if (player_vehicle != self::veh && ready == true)
|
||||
{
|
||||
ready = false;
|
||||
ready = false;
|
||||
player_vehicle = self::veh;
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
@ -54,7 +55,7 @@ namespace big
|
||||
HUD::REQUEST_ADDITIONAL_TEXT("MOD_MNU", 10);
|
||||
script::get_current()->yield();
|
||||
}
|
||||
|
||||
|
||||
VEHICLE::SET_VEHICLE_MOD_KIT(player_vehicle, 0);
|
||||
|
||||
Hash model = ENTITY::GET_ENTITY_MODEL(player_vehicle);
|
||||
@ -69,17 +70,13 @@ namespace big
|
||||
|
||||
tmp_slot_display_names[MOD_PLATE_STYLE] = "PLATE_STYLE"_T.data();
|
||||
tmp_slot_display_names[MOD_WINDOW_TINT] = "WINDOW_TINT"_T.data();
|
||||
tmp_slot_display_names[MOD_WHEEL_TYPE] = "WHEEL_TYPE"_T.data();
|
||||
tmp_slot_display_names[MOD_WHEEL_TYPE] = "WHEEL_TYPE"_T.data();
|
||||
|
||||
tmp_mod_display_names[MOD_PLATE_STYLE].insert(lsc_plate_styles.begin(), lsc_plate_styles.end());
|
||||
tmp_mod_display_names[MOD_WINDOW_TINT].insert(lsc_window_tint_types.begin(), lsc_window_tint_types.end());
|
||||
tmp_mod_display_names[MOD_WHEEL_TYPE].insert(lsc_wheel_styles.begin(), lsc_wheel_styles.end());
|
||||
|
||||
is_bennys = owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_BENNYS_ORIGINAL ||
|
||||
owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_BENNYS_BESPOKE ||
|
||||
owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_OPEN_WHEEL ||
|
||||
owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_STREET ||
|
||||
owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_TRACK;
|
||||
is_bennys = owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_BENNYS_ORIGINAL || owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_BENNYS_BESPOKE || owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_OPEN_WHEEL || owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_STREET || owned_mods[MOD_WHEEL_TYPE] == WHEEL_TYPE_TRACK;
|
||||
|
||||
for (int slot = MOD_SPOILERS; slot <= MOD_LIGHTBAR; slot++)
|
||||
{
|
||||
@ -125,7 +122,6 @@ namespace big
|
||||
{
|
||||
mod_name = new_mod_name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,7 +137,7 @@ namespace big
|
||||
is_repeated = true;
|
||||
}
|
||||
}
|
||||
else if(slot == MOD_REARWHEEL)
|
||||
else if (slot == MOD_REARWHEEL)
|
||||
{
|
||||
if (is_bennys)
|
||||
{
|
||||
@ -153,7 +149,6 @@ namespace big
|
||||
{
|
||||
mod_name = new_mod_name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,9 +181,9 @@ namespace big
|
||||
}
|
||||
|
||||
slot_display_names = tmp_slot_display_names;
|
||||
mod_display_names = tmp_mod_display_names;
|
||||
front_wheel_map = tmp_front_wheel_map;
|
||||
rear_wheel_map = tmp_rear_wheel_map;
|
||||
mod_display_names = tmp_mod_display_names;
|
||||
front_wheel_map = tmp_front_wheel_map;
|
||||
rear_wheel_map = tmp_rear_wheel_map;
|
||||
|
||||
ready = true;
|
||||
});
|
||||
@ -279,8 +274,8 @@ namespace big
|
||||
if (selected_slot != -1)
|
||||
{
|
||||
auto wheel_stock_mod = &front_wheel_stock_mod;
|
||||
auto wheel_custom = &owned_mods[MOD_FRONTWHEEL_VAR];
|
||||
bool is_wheel_mod = false;
|
||||
auto wheel_custom = &owned_mods[MOD_FRONTWHEEL_VAR];
|
||||
bool is_wheel_mod = false;
|
||||
|
||||
if (selected_slot == MOD_FRONTWHEEL)
|
||||
{
|
||||
@ -289,8 +284,8 @@ namespace big
|
||||
else if (selected_slot == MOD_REARWHEEL)
|
||||
{
|
||||
wheel_stock_mod = &rear_wheel_stock_mod;
|
||||
wheel_custom = &owned_mods[MOD_REARWHEEL_VAR];
|
||||
is_wheel_mod = true;
|
||||
wheel_custom = &owned_mods[MOD_REARWHEEL_VAR];
|
||||
is_wheel_mod = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -305,7 +300,7 @@ namespace big
|
||||
{
|
||||
for (const auto& it : mod_display_names[selected_slot])
|
||||
{
|
||||
const auto& mod = it.first;
|
||||
const auto& mod = it.first;
|
||||
const auto& name = it.second;
|
||||
|
||||
bool item_selected = mod == owned_mods[selected_slot];
|
||||
@ -328,7 +323,7 @@ namespace big
|
||||
if (is_wheel_mod)
|
||||
{
|
||||
*wheel_stock_mod = mod;
|
||||
*wheel_custom = false;
|
||||
*wheel_custom = false;
|
||||
}
|
||||
}
|
||||
else if (selected_slot == MOD_WINDOW_TINT)
|
||||
@ -356,9 +351,8 @@ namespace big
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
if (
|
||||
is_wheel_mod && *wheel_stock_mod != -1
|
||||
) {
|
||||
if (is_wheel_mod && *wheel_stock_mod != -1)
|
||||
{
|
||||
auto wheel_map = front_wheel_map;
|
||||
|
||||
if (selected_slot == MOD_REARWHEEL)
|
||||
@ -373,7 +367,7 @@ namespace big
|
||||
if (ImGui::ListBoxHeader("##style", ImVec2(200, 200)))
|
||||
{
|
||||
std::string mod_name = mod_display_names[selected_slot][*wheel_stock_mod];
|
||||
auto wheel_mods = wheel_map[mod_name];
|
||||
auto wheel_mods = wheel_map[mod_name];
|
||||
|
||||
for (int i = 0; i < wheel_mods.size(); i++)
|
||||
{
|
||||
@ -415,7 +409,6 @@ namespace big
|
||||
}
|
||||
|
||||
|
||||
|
||||
ImGui::Separator();
|
||||
components::sub_title("NEON_LIGHT_OPTIONS"_T);
|
||||
|
||||
@ -458,11 +451,11 @@ namespace big
|
||||
ImGui::SameLine();
|
||||
ImGui::PushID("##neon_check_all");
|
||||
components::button("CHECK_ALL"_T, [] {
|
||||
owned_mods[MOD_XENON_LIGHTS] = true;
|
||||
owned_mods[MOD_NEON_LEFT_ON] = true;
|
||||
owned_mods[MOD_XENON_LIGHTS] = true;
|
||||
owned_mods[MOD_NEON_LEFT_ON] = true;
|
||||
owned_mods[MOD_NEON_RIGHT_ON] = true;
|
||||
owned_mods[MOD_NEON_FRONT_ON] = true;
|
||||
owned_mods[MOD_NEON_BACK_ON] = true;
|
||||
owned_mods[MOD_NEON_BACK_ON] = true;
|
||||
|
||||
VEHICLE::TOGGLE_VEHICLE_MOD(player_vehicle, MOD_XENON_LIGHTS, owned_mods[MOD_XENON_LIGHTS]);
|
||||
VEHICLE::SET_VEHICLE_NEON_ENABLED(player_vehicle, NEON_LEFT, owned_mods[MOD_NEON_LEFT_ON]);
|
||||
@ -474,11 +467,11 @@ namespace big
|
||||
ImGui::SameLine();
|
||||
ImGui::PushID("##neon_uncheck_all");
|
||||
components::button("UNCHECK_ALL"_T, [] {
|
||||
owned_mods[MOD_XENON_LIGHTS] = false;
|
||||
owned_mods[MOD_NEON_LEFT_ON] = false;
|
||||
owned_mods[MOD_XENON_LIGHTS] = false;
|
||||
owned_mods[MOD_NEON_LEFT_ON] = false;
|
||||
owned_mods[MOD_NEON_RIGHT_ON] = false;
|
||||
owned_mods[MOD_NEON_FRONT_ON] = false;
|
||||
owned_mods[MOD_NEON_BACK_ON] = false;
|
||||
owned_mods[MOD_NEON_BACK_ON] = false;
|
||||
|
||||
VEHICLE::TOGGLE_VEHICLE_MOD(player_vehicle, MOD_XENON_LIGHTS, owned_mods[MOD_XENON_LIGHTS]);
|
||||
VEHICLE::SET_VEHICLE_NEON_ENABLED(player_vehicle, NEON_LEFT, owned_mods[MOD_NEON_LEFT_ON]);
|
||||
@ -492,14 +485,12 @@ namespace big
|
||||
components::sub_title("COLOR_OPTIONS"_T);
|
||||
|
||||
static int color_to_change = 0;
|
||||
static int color_type = 8;
|
||||
static int color_type = 8;
|
||||
|
||||
if (
|
||||
(color_to_change == 7 && !owned_mods[MOD_XENON_LIGHTS]) ||
|
||||
(color_to_change == 5 && !owned_mods[MOD_TYRE_SMOKE])
|
||||
) {
|
||||
if ((color_to_change == 7 && !owned_mods[MOD_XENON_LIGHTS]) || (color_to_change == 5 && !owned_mods[MOD_TYRE_SMOKE]))
|
||||
{
|
||||
color_to_change = 0;
|
||||
color_type = 8;
|
||||
color_type = 8;
|
||||
}
|
||||
|
||||
if (ImGui::ListBoxHeader("##color_options", ImVec2(120, 254)))
|
||||
@ -517,19 +508,19 @@ namespace big
|
||||
if (ImGui::Selectable("PEARLESCENT"_T.data(), color_to_change == 2))
|
||||
{
|
||||
color_to_change = 2;
|
||||
color_type = 4;
|
||||
color_type = 4;
|
||||
}
|
||||
|
||||
if (ImGui::Selectable("INTERIOR"_T.data(), color_to_change == 3))
|
||||
{
|
||||
color_to_change = 3;
|
||||
color_type = 6;
|
||||
color_type = 6;
|
||||
}
|
||||
|
||||
if (ImGui::Selectable("DASHBOARD"_T.data(), color_to_change == 4))
|
||||
{
|
||||
color_to_change = 4;
|
||||
color_type = 7;
|
||||
color_type = 7;
|
||||
}
|
||||
|
||||
if (!owned_mods[MOD_TYRE_SMOKE])
|
||||
@ -539,7 +530,7 @@ namespace big
|
||||
if (ImGui::Selectable("TIRE_SMOKE"_T.data(), color_to_change == 5))
|
||||
{
|
||||
color_to_change = 5;
|
||||
color_type = 8;
|
||||
color_type = 8;
|
||||
}
|
||||
if (!owned_mods[MOD_TYRE_SMOKE])
|
||||
{
|
||||
@ -549,7 +540,7 @@ namespace big
|
||||
if (ImGui::Selectable("WHEEL_COLOR"_T.data(), color_to_change == 6))
|
||||
{
|
||||
color_to_change = 6;
|
||||
color_type = 5;
|
||||
color_type = 5;
|
||||
}
|
||||
|
||||
if (!owned_mods[MOD_XENON_LIGHTS])
|
||||
@ -560,7 +551,7 @@ namespace big
|
||||
if (ImGui::Selectable("HEADLIGHT"_T.data(), color_to_change == 7))
|
||||
{
|
||||
color_to_change = 7;
|
||||
color_type = 9;
|
||||
color_type = 9;
|
||||
}
|
||||
ImGui::PopID();
|
||||
if (!owned_mods[MOD_XENON_LIGHTS])
|
||||
@ -571,7 +562,7 @@ namespace big
|
||||
if (ImGui::Selectable("NEON"_T.data(), color_to_change == 8))
|
||||
{
|
||||
color_to_change = 8;
|
||||
color_type = 8;
|
||||
color_type = 8;
|
||||
}
|
||||
|
||||
ImGui::ListBoxFooter();
|
||||
@ -638,10 +629,10 @@ namespace big
|
||||
{
|
||||
// custom color
|
||||
|
||||
static float color[3] = { 1, 1, 1 };
|
||||
auto color_r = &owned_mods[MOD_PRIMARY_COL_R];
|
||||
auto color_g = &owned_mods[MOD_PRIMARY_COL_G];
|
||||
auto color_b = &owned_mods[MOD_PRIMARY_COL_B];
|
||||
static float color[3] = {1, 1, 1};
|
||||
auto color_r = &owned_mods[MOD_PRIMARY_COL_R];
|
||||
auto color_g = &owned_mods[MOD_PRIMARY_COL_G];
|
||||
auto color_b = &owned_mods[MOD_PRIMARY_COL_B];
|
||||
|
||||
if (color_to_change == 1)
|
||||
{
|
||||
@ -674,7 +665,7 @@ namespace big
|
||||
for (const auto& it : lsc_tire_smoke_rgb)
|
||||
{
|
||||
auto& name = it.first;
|
||||
auto& rgb = it.second;
|
||||
auto& rgb = it.second;
|
||||
|
||||
if (ImGui::Selectable(name.c_str(), false))
|
||||
{
|
||||
@ -685,7 +676,6 @@ namespace big
|
||||
*color_g = rgb[1];
|
||||
*color_b = rgb[2];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ImGui::ListBoxFooter();
|
||||
@ -699,7 +689,7 @@ namespace big
|
||||
for (const auto& it : lsc_neon_rgb)
|
||||
{
|
||||
auto& name = it.first;
|
||||
auto& rgb = it.second;
|
||||
auto& rgb = it.second;
|
||||
|
||||
if (ImGui::Selectable(name.c_str(), false))
|
||||
{
|
||||
@ -733,12 +723,8 @@ namespace big
|
||||
case 1:
|
||||
VEHICLE::SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(player_vehicle, *color_r, *color_g, *color_b);
|
||||
break;
|
||||
case 5:
|
||||
VEHICLE::SET_VEHICLE_TYRE_SMOKE_COLOR(player_vehicle, *color_r, *color_g, *color_b);
|
||||
break;
|
||||
case 8:
|
||||
VEHICLE::SET_VEHICLE_NEON_COLOUR(player_vehicle, *color_r, *color_g, *color_b);
|
||||
break;
|
||||
case 5: VEHICLE::SET_VEHICLE_TYRE_SMOKE_COLOR(player_vehicle, *color_r, *color_g, *color_b); break;
|
||||
case 8: VEHICLE::SET_VEHICLE_NEON_COLOUR(player_vehicle, *color_r, *color_g, *color_b); break;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -750,21 +736,11 @@ namespace big
|
||||
int selected_color = 0;
|
||||
switch (color_type)
|
||||
{
|
||||
case 4:
|
||||
selected_color = owned_mods[MOD_PEARLESCENT_COL];
|
||||
break;
|
||||
case 5:
|
||||
selected_color = owned_mods[MOD_WHEEL_COL];
|
||||
break;
|
||||
case 6:
|
||||
selected_color = owned_mods[MOD_INTERIOR_COL];
|
||||
break;
|
||||
case 7:
|
||||
selected_color = owned_mods[MOD_DASHBOARD_COL];
|
||||
break;
|
||||
case 9:
|
||||
selected_color = owned_mods[MOD_XENON_COL];
|
||||
break;
|
||||
case 4: selected_color = owned_mods[MOD_PEARLESCENT_COL]; break;
|
||||
case 5: selected_color = owned_mods[MOD_WHEEL_COL]; break;
|
||||
case 6: selected_color = owned_mods[MOD_INTERIOR_COL]; break;
|
||||
case 7: selected_color = owned_mods[MOD_DASHBOARD_COL]; break;
|
||||
case 9: selected_color = owned_mods[MOD_XENON_COL]; break;
|
||||
default:
|
||||
selected_color = (color_to_change == 0) ? owned_mods[MOD_PRIMARY_COL] : owned_mods[MOD_SECONDARY_COL];
|
||||
}
|
||||
@ -778,7 +754,7 @@ namespace big
|
||||
{
|
||||
switch (color_type)
|
||||
{
|
||||
case 0: //Chrome
|
||||
case 0://Chrome
|
||||
{
|
||||
if (ImGui::Selectable("CHROME"_T.data(), selected_color == COLOR_CHROME))
|
||||
{
|
||||
@ -797,7 +773,7 @@ namespace big
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: //Classic
|
||||
case 1://Classic
|
||||
{
|
||||
for (const auto& [color, name] : lsc_classic_colors)
|
||||
{
|
||||
@ -818,11 +794,10 @@ namespace big
|
||||
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, owned_mods[MOD_PRIMARY_COL], owned_mods[MOD_SECONDARY_COL]);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: //Matte
|
||||
case 2://Matte
|
||||
{
|
||||
for (const auto& [color, name] : lsc_matte_colors)
|
||||
{
|
||||
@ -843,11 +818,10 @@ namespace big
|
||||
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, owned_mods[MOD_PRIMARY_COL], owned_mods[MOD_SECONDARY_COL]);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3: //Metals
|
||||
case 3://Metals
|
||||
{
|
||||
for (const auto& [color, name] : lsc_metal_colors)
|
||||
{
|
||||
@ -871,13 +845,13 @@ namespace big
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 4: //Pearlescent
|
||||
case 4://Pearlescent
|
||||
{
|
||||
for (const auto& [color, name] : lsc_classic_colors)
|
||||
{
|
||||
if (ImGui::Selectable(name.c_str(), selected_color == color))
|
||||
{
|
||||
selected_color = color;
|
||||
selected_color = color;
|
||||
owned_mods[MOD_PEARLESCENT_COL] = color;
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
@ -887,13 +861,13 @@ namespace big
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 5: //Wheel Color
|
||||
case 5://Wheel Color
|
||||
{
|
||||
for (const auto& [color, name] : lsc_classic_colors)
|
||||
{
|
||||
if (ImGui::Selectable(name.c_str(), selected_color == color))
|
||||
{
|
||||
selected_color = color;
|
||||
selected_color = color;
|
||||
owned_mods[MOD_WHEEL_COL] = color;
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
@ -903,13 +877,13 @@ namespace big
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 6: //Interior Color
|
||||
case 6://Interior Color
|
||||
{
|
||||
for (const auto& [color, name] : lsc_classic_colors)
|
||||
{
|
||||
if (ImGui::Selectable(name.c_str(), selected_color == color))
|
||||
{
|
||||
selected_color = color;
|
||||
selected_color = color;
|
||||
owned_mods[MOD_INTERIOR_COL] = color;
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
@ -919,13 +893,13 @@ namespace big
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 7: //Dashboard Color
|
||||
case 7://Dashboard Color
|
||||
{
|
||||
for (const auto& [color, name] : lsc_classic_colors)
|
||||
{
|
||||
if (ImGui::Selectable(name.c_str(), selected_color == color))
|
||||
{
|
||||
selected_color = color;
|
||||
selected_color = color;
|
||||
owned_mods[MOD_DASHBOARD_COL] = color;
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
@ -935,13 +909,13 @@ namespace big
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 9: //Headlight Color
|
||||
case 9://Headlight Color
|
||||
{
|
||||
for (const auto& [color, name] : lsc_headlight_colors)
|
||||
{
|
||||
if (ImGui::Selectable(name.c_str(), selected_color == color))
|
||||
{
|
||||
selected_color = color;
|
||||
selected_color = color;
|
||||
owned_mods[MOD_XENON_COL] = color;
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "core/data/speed_units.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
#include "services/vehicle/persist_car_service.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "core/data/speed_units.hpp"
|
||||
#include "services/vehicle/persist_car_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -64,20 +64,15 @@ namespace big
|
||||
static char vehicle_file_name_input[50]{};
|
||||
|
||||
ImGui::PushItemWidth(250);
|
||||
components::input_text_with_hint(
|
||||
"VEHICLE_FILE_NAME"_T,
|
||||
"VEHICLE_FILE_NAME_EXAMPLE"_T,
|
||||
vehicle_file_name_input, IM_ARRAYSIZE(vehicle_file_name_input));
|
||||
components::input_text_with_hint("VEHICLE_FILE_NAME"_T, "VEHICLE_FILE_NAME_EXAMPLE"_T, vehicle_file_name_input, IM_ARRAYSIZE(vehicle_file_name_input));
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("SAVE_VEHICLE"_T, []
|
||||
{
|
||||
components::button("SAVE_VEHICLE"_T, [] {
|
||||
save_vehicle(vehicle_file_name_input);
|
||||
});
|
||||
|
||||
components::button("LOAD_VEHICLE"_T, []
|
||||
{
|
||||
components::button("LOAD_VEHICLE"_T, [] {
|
||||
load_vehicle(selected_vehicle_file);
|
||||
});
|
||||
|
||||
|
@ -1,15 +1,16 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "services/mobile/mobile_service.hpp"
|
||||
#include "services/gta_data/gta_data_service.hpp"
|
||||
#include "services/mobile/mobile_service.hpp"
|
||||
#include "services/model_preview/model_preview_service.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::pv() {
|
||||
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
|
||||
void view::pv()
|
||||
{
|
||||
ImGui::SetWindowSize({0.f, (float)*g_pointers->m_resolution_y}, ImGuiCond_Always);
|
||||
|
||||
if (ImGui::Checkbox("PREVIEW"_T.data(), &g.clone_pv.preview_vehicle))
|
||||
{
|
||||
@ -22,8 +23,8 @@ namespace big
|
||||
ImGui::Checkbox("SPAWN_IN"_T.data(), &g.clone_pv.spawn_inside);
|
||||
ImGui::SameLine();
|
||||
|
||||
static char plate_buf[9] = { 0 };
|
||||
int num_of_rows = 3;
|
||||
static char plate_buf[9] = {0};
|
||||
int num_of_rows = 3;
|
||||
|
||||
ImGui::Checkbox("SPAWN_CLONE"_T.data(), &g.clone_pv.spawn_clone);
|
||||
if (g.clone_pv.spawn_clone)
|
||||
@ -51,10 +52,11 @@ namespace big
|
||||
|
||||
|
||||
static int selected_class = -1;
|
||||
const auto& class_arr = g_gta_data_service->vehicle_classes();
|
||||
const auto& class_arr = g_gta_data_service->vehicle_classes();
|
||||
|
||||
ImGui::SetNextItemWidth(300.f);
|
||||
if (ImGui::BeginCombo("VEHICLE_CLASS"_T.data(), selected_class == -1 ? "ALL"_T.data() : class_arr[selected_class].c_str()))
|
||||
if (ImGui::BeginCombo("VEHICLE_CLASS"_T.data(),
|
||||
selected_class == -1 ? "ALL"_T.data() : class_arr[selected_class].c_str()))
|
||||
{
|
||||
if (ImGui::Selectable("ALL"_T.data(), selected_class == -1))
|
||||
{
|
||||
@ -84,7 +86,7 @@ namespace big
|
||||
components::input_text_with_hint("MODEL_NAME"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
|
||||
|
||||
g_mobile_service->refresh_personal_vehicles();
|
||||
if (ImGui::ListBoxHeader("###personal_veh_list", { 300, static_cast<float>(*g_pointers->m_resolution_y - 188 - 38 * num_of_rows) }))
|
||||
if (ImGui::ListBoxHeader("###personal_veh_list", {300, static_cast<float>(*g_pointers->m_resolution_y - 188 - 38 * num_of_rows)}))
|
||||
{
|
||||
if (g_mobile_service->personal_vehicles().empty())
|
||||
{
|
||||
@ -97,32 +99,28 @@ namespace big
|
||||
|
||||
for (const auto& it : g_mobile_service->personal_vehicles())
|
||||
{
|
||||
const auto& label = it.first;
|
||||
const auto& label = it.first;
|
||||
const auto& personal_veh = it.second;
|
||||
const auto& item = g_gta_data_service->vehicle_by_hash(personal_veh->get_hash());
|
||||
const auto& item = g_gta_data_service->vehicle_by_hash(personal_veh->get_hash());
|
||||
|
||||
std::string vehicle_class = item.m_vehicle_class;
|
||||
std::string display_name = label;
|
||||
std::string vehicle_class = item.m_vehicle_class;
|
||||
std::string display_name = label;
|
||||
std::string display_manufacturer = item.m_display_manufacturer;
|
||||
std::transform(display_name.begin(), display_name.end(), display_name.begin(), ::tolower);
|
||||
std::transform(display_manufacturer.begin(), display_manufacturer.end(), display_manufacturer.begin(), ::tolower);
|
||||
|
||||
if ((
|
||||
selected_class == -1 || class_arr[selected_class] == vehicle_class
|
||||
) && (
|
||||
display_name.find(lower_search) != std::string::npos ||
|
||||
display_manufacturer.find(lower_search) != std::string::npos
|
||||
)) {
|
||||
|
||||
if ((selected_class == -1 || class_arr[selected_class] == vehicle_class)
|
||||
&& (display_name.find(lower_search) != std::string::npos || display_manufacturer.find(lower_search) != std::string::npos))
|
||||
{
|
||||
ImGui::PushID('v' << 24 & personal_veh->get_id());
|
||||
components::selectable(label, false, [&personal_veh] {
|
||||
if (g.clone_pv.spawn_clone)
|
||||
{
|
||||
Vector3 spawn_location = vehicle::get_spawn_location(g.spawn_vehicle.spawn_inside);
|
||||
float spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
|
||||
float spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
|
||||
|
||||
auto vehicle_idx = personal_veh->get_vehicle_idx();
|
||||
auto owned_mods = vehicle::get_owned_mods_from_vehicle_idx(vehicle_idx);
|
||||
auto owned_mods = vehicle::get_owned_mods_from_vehicle_idx(vehicle_idx);
|
||||
|
||||
const char* spawn_plate_buf = plate_buf;
|
||||
if (g.clone_pv.clone_plate)
|
||||
@ -169,9 +167,8 @@ namespace big
|
||||
{
|
||||
g_fiber_pool->queue_job([&personal_veh] {
|
||||
g_model_preview_service->show_vehicle(
|
||||
vehicle::get_owned_mods_from_vehicle_idx(personal_veh->get_vehicle_idx()),
|
||||
g.clone_pv.spawn_maxed
|
||||
);
|
||||
vehicle::get_owned_mods_from_vehicle_idx(personal_veh->get_vehicle_idx()),
|
||||
g.clone_pv.spawn_maxed);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "services/gta_data/gta_data_service.hpp"
|
||||
#include "services/model_preview/model_preview_service.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::spawn_vehicle()
|
||||
{
|
||||
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
|
||||
ImGui::SetWindowSize({0.f, (float)*g_pointers->m_resolution_y}, ImGuiCond_Always);
|
||||
|
||||
if (ImGui::Checkbox("PREVIEW"_T.data(), &g.spawn_vehicle.preview_vehicle))
|
||||
{
|
||||
@ -23,7 +23,7 @@ namespace big
|
||||
ImGui::SameLine();
|
||||
components::command_checkbox<"spawnmaxed">();
|
||||
|
||||
static char plate_buf[9] = { 0 };
|
||||
static char plate_buf[9] = {0};
|
||||
strncpy(plate_buf, g.spawn_vehicle.plate.c_str(), 9);
|
||||
|
||||
ImGui::SetNextItemWidth(300.f);
|
||||
@ -31,12 +31,12 @@ namespace big
|
||||
g.spawn_vehicle.plate = plate_buf;
|
||||
});
|
||||
|
||||
|
||||
static int selected_class = -1;
|
||||
const auto& class_arr = g_gta_data_service->vehicle_classes();
|
||||
const auto& class_arr = g_gta_data_service->vehicle_classes();
|
||||
|
||||
ImGui::SetNextItemWidth(300.f);
|
||||
if (ImGui::BeginCombo("VEHICLE_CLASS"_T.data(), selected_class == -1 ? "ALL"_T.data() : class_arr[selected_class].c_str()))
|
||||
if (ImGui::BeginCombo("VEHICLE_CLASS"_T.data(),
|
||||
selected_class == -1 ? "ALL"_T.data() : class_arr[selected_class].c_str()))
|
||||
{
|
||||
if (ImGui::Selectable("ALL"_T.data(), selected_class == -1))
|
||||
{
|
||||
@ -66,12 +66,12 @@ namespace big
|
||||
components::input_text_with_hint("MODEL_NAME"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
|
||||
|
||||
|
||||
if (ImGui::ListBoxHeader("###vehicles", { 300, static_cast<float>(*g_pointers->m_resolution_y - 188 - 38 * 4) }))
|
||||
if (ImGui::ListBoxHeader("###vehicles", {300, static_cast<float>(*g_pointers->m_resolution_y - 188 - 38 * 4)}))
|
||||
{
|
||||
if (self::veh)
|
||||
{
|
||||
static auto veh_hash = 0;
|
||||
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
veh_hash = ENTITY::GET_ENTITY_MODEL(self::veh);
|
||||
});
|
||||
@ -84,7 +84,7 @@ namespace big
|
||||
if (self::veh)
|
||||
{
|
||||
Vector3 spawn_location = vehicle::get_spawn_location(g.spawn_vehicle.spawn_inside);
|
||||
float spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
|
||||
float spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
|
||||
|
||||
auto owned_mods = vehicle::get_owned_mods_from_vehicle(self::veh);
|
||||
|
||||
@ -120,10 +120,8 @@ namespace big
|
||||
else if (ImGui::IsItemHovered())
|
||||
{
|
||||
g_fiber_pool->queue_job([] {
|
||||
g_model_preview_service->show_vehicle(
|
||||
vehicle::get_owned_mods_from_vehicle(self::veh),
|
||||
g.spawn_vehicle.spawn_maxed
|
||||
);
|
||||
g_model_preview_service->show_vehicle(vehicle::get_owned_mods_from_vehicle(self::veh),
|
||||
g.spawn_vehicle.spawn_maxed);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -139,24 +137,20 @@ namespace big
|
||||
{
|
||||
const auto& vehicle = item.second;
|
||||
|
||||
std::string display_name = vehicle.m_display_name;
|
||||
std::string display_name = vehicle.m_display_name;
|
||||
std::string display_manufacturer = vehicle.m_display_manufacturer;
|
||||
std::string clazz = vehicle.m_vehicle_class;
|
||||
std::string clazz = vehicle.m_vehicle_class;
|
||||
|
||||
std::transform(display_name.begin(), display_name.end(), display_name.begin(), ::tolower);
|
||||
std::transform(display_manufacturer.begin(), display_manufacturer.end(), display_manufacturer.begin(), ::tolower);
|
||||
|
||||
if ((
|
||||
selected_class == -1 || class_arr[selected_class] == clazz
|
||||
) && (
|
||||
display_name.find(lower_search) != std::string::npos ||
|
||||
display_manufacturer.find(lower_search) != std::string::npos
|
||||
)) {
|
||||
if ((selected_class == -1 || class_arr[selected_class] == clazz)
|
||||
&& (display_name.find(lower_search) != std::string::npos || display_manufacturer.find(lower_search) != std::string::npos))
|
||||
{
|
||||
ImGui::PushID(vehicle.m_hash);
|
||||
components::selectable(vehicle.m_display_name, false, [&vehicle]
|
||||
{
|
||||
components::selectable(vehicle.m_display_name, false, [&vehicle] {
|
||||
const auto spawn_location = vehicle::get_spawn_location(g.spawn_vehicle.spawn_inside);
|
||||
const auto spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
|
||||
const auto spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
|
||||
|
||||
const auto veh = vehicle::spawn(vehicle.m_hash, spawn_location, spawn_heading);
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "core/data/speed_units.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "core/data/speed_units.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -11,8 +11,9 @@ namespace big
|
||||
components::button("MORS_FIX_ALL"_T, [] {
|
||||
int amount_fixed = mobile::mors_mutual::fix_all();
|
||||
g_notification_service->push("MOBILE"_T.data(),
|
||||
std::vformat("VEHICLE_FIX_AMOUNT"_T.data(), std::make_format_args(amount_fixed, amount_fixed == 1 ? "VEHICLE_FIX_HAS"_T.data() : "VEHICLE_FIX_HAVE"_T.data()))
|
||||
);
|
||||
std::vformat("VEHICLE_FIX_AMOUNT"_T.data(),
|
||||
std::make_format_args(amount_fixed,
|
||||
amount_fixed == 1 ? "VEHICLE_FIX_HAS"_T.data() : "VEHICLE_FIX_HAVE"_T.data())));
|
||||
});
|
||||
ImGui::SameLine();
|
||||
components::button("REPAIR"_T, [] {
|
||||
@ -42,21 +43,11 @@ namespace big
|
||||
ImGui::Separator();
|
||||
|
||||
components::button("TURN_ENGINE_ON"_T, [] {
|
||||
vehicle::set_engine_state(
|
||||
self::veh,
|
||||
true,
|
||||
g.vehicle.change_engine_state_immediately,
|
||||
g.vehicle.disable_engine_auto_start
|
||||
);
|
||||
vehicle::set_engine_state(self::veh, true, g.vehicle.change_engine_state_immediately, g.vehicle.disable_engine_auto_start);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
components::button("TURN_ENGINE_OFF"_T, [] {
|
||||
vehicle::set_engine_state(
|
||||
self::veh,
|
||||
false,
|
||||
g.vehicle.change_engine_state_immediately,
|
||||
g.vehicle.disable_engine_auto_start
|
||||
);
|
||||
vehicle::set_engine_state(self::veh, false, g.vehicle.change_engine_state_immediately, g.vehicle.disable_engine_auto_start);
|
||||
});
|
||||
ImGui::Checkbox("DISABLE_ENGINE_AUTO_START"_T.data(), &g.vehicle.disable_engine_auto_start);
|
||||
ImGui::SameLine();
|
||||
@ -109,26 +100,26 @@ namespace big
|
||||
{
|
||||
if (ImGui::Button("CHECK_ALL"_T.data()))
|
||||
{
|
||||
g.vehicle.proof_bullet = true;
|
||||
g.vehicle.proof_fire = true;
|
||||
g.vehicle.proof_bullet = true;
|
||||
g.vehicle.proof_fire = true;
|
||||
g.vehicle.proof_collision = true;
|
||||
g.vehicle.proof_melee = true;
|
||||
g.vehicle.proof_melee = true;
|
||||
g.vehicle.proof_explosion = true;
|
||||
g.vehicle.proof_steam = true;
|
||||
g.vehicle.proof_water = true;
|
||||
g.vehicle.proof_steam = true;
|
||||
g.vehicle.proof_water = true;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("UNCHECK_ALL"_T.data()))
|
||||
{
|
||||
g.vehicle.proof_bullet = false;
|
||||
g.vehicle.proof_fire = false;
|
||||
g.vehicle.proof_bullet = false;
|
||||
g.vehicle.proof_fire = false;
|
||||
g.vehicle.proof_collision = false;
|
||||
g.vehicle.proof_melee = false;
|
||||
g.vehicle.proof_melee = false;
|
||||
g.vehicle.proof_explosion = false;
|
||||
g.vehicle.proof_steam = false;
|
||||
g.vehicle.proof_water = false;
|
||||
g.vehicle.proof_steam = false;
|
||||
g.vehicle.proof_water = false;
|
||||
}
|
||||
|
||||
ImGui::BeginGroup();
|
||||
@ -163,23 +154,11 @@ namespace big
|
||||
|
||||
components::sub_title("SPEED_UNIT"_T);
|
||||
{
|
||||
ImGui::RadioButton(
|
||||
speed_unit_strings[(int)SpeedUnit::KMPH].c_str(),
|
||||
(int*)&g.vehicle.speed_unit,
|
||||
(int)SpeedUnit::KMPH
|
||||
);
|
||||
ImGui::RadioButton(speed_unit_strings[(int)SpeedUnit::KMPH].c_str(), (int*)&g.vehicle.speed_unit, (int)SpeedUnit::KMPH);
|
||||
ImGui::SameLine();
|
||||
ImGui::RadioButton(
|
||||
speed_unit_strings[(int)SpeedUnit::MIPH].c_str(),
|
||||
(int*)&g.vehicle.speed_unit,
|
||||
(int)SpeedUnit::MIPH
|
||||
);
|
||||
ImGui::RadioButton(speed_unit_strings[(int)SpeedUnit::MIPH].c_str(), (int*)&g.vehicle.speed_unit, (int)SpeedUnit::MIPH);
|
||||
ImGui::SameLine();
|
||||
ImGui::RadioButton(
|
||||
speed_unit_strings[(int)SpeedUnit::MPS].c_str(),
|
||||
(int*)&g.vehicle.speed_unit,
|
||||
(int)SpeedUnit::MPS
|
||||
);
|
||||
ImGui::RadioButton(speed_unit_strings[(int)SpeedUnit::MPS].c_str(), (int*)&g.vehicle.speed_unit, (int)SpeedUnit::MPS);
|
||||
}
|
||||
ImGui::Separator();
|
||||
|
||||
@ -191,7 +170,7 @@ namespace big
|
||||
{
|
||||
ImGui::Text("POS_X_Y"_T.data());
|
||||
|
||||
float pos[2] = { g.vehicle.speedo_meter.x, g.vehicle.speedo_meter.y };
|
||||
float pos[2] = {g.vehicle.speedo_meter.x, g.vehicle.speedo_meter.y};
|
||||
|
||||
if (ImGui::SliderFloat2("###speedo_pos", pos, .001f, .999f, "%.3f"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user