From 5fc6ef8fb50838f7cd7045d9cb9f1ecba98a7d86 Mon Sep 17 00:00:00 2001 From: DayibBaba <79384354+DayibBaba@users.noreply.github.com> Date: Tue, 27 Jun 2023 14:05:44 +0200 Subject: [PATCH] General UI tweaks (#1538) --- src/backend/looped/self/part_water.cpp | 35 ------------------ src/core/globals.hpp | 12 +++--- src/gui.cpp | 4 +- src/services/hotkey/hotkey_service.cpp | 1 + src/views/debug/view_debug_animations.cpp | 2 +- src/views/network/view_spoofing.cpp | 6 +-- src/views/players/player/player_toxic.cpp | 5 ++- src/views/self/view_mobile.cpp | 10 ++--- src/views/self/view_self.cpp | 12 ++---- src/views/self/view_teleport.cpp | 13 ++----- src/views/self/view_weapons.cpp | 13 ++----- src/views/settings/view_hotkey_settings.cpp | 2 + src/views/vehicle/view_fun_vehicle.cpp | 19 +++------- src/views/vehicle/view_lsc.cpp | 32 +++++++--------- src/views/vehicle/view_vehicle.cpp | 14 ++----- src/views/world/view_blackhole.cpp | 6 +-- src/views/world/view_spawn_ped.cpp | 11 +++--- src/views/world/view_squad_spawner.cpp | 7 ++-- src/views/world/view_world.cpp | 41 ++++++++------------- 19 files changed, 85 insertions(+), 160 deletions(-) delete mode 100644 src/backend/looped/self/part_water.cpp diff --git a/src/backend/looped/self/part_water.cpp b/src/backend/looped/self/part_water.cpp deleted file mode 100644 index 00bbf38c..00000000 --- a/src/backend/looped/self/part_water.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "backend/looped/looped.hpp" -#include "backend/looped_command.hpp" -#include "natives.hpp" - -namespace big -{ - // this doesn't actually work - class partwater : looped_command - { - using looped_command::looped_command; - - virtual void on_tick() override - { - WATER::RESET_DEEP_OCEAN_SCALER(); - - Vector3 coords = self::pos; - float offset[] = {-4, 4}; - - for (int i = 0; i < 5; i++) - { - if (i < 2) - { - coords.x += offset[(i % 2 == 0)]; - } - else if (i < 4) - { - coords.y += offset[(i % 2 == 0)]; - } - WATER::MODIFY_WATER(coords.x, coords.y, 0.0f, 300.0f); - } - } - }; - - partwater g_partwater("partwater", "PART_WATER", "PART_WATER_DESC", g.world.water.part_water); -} diff --git a/src/core/globals.hpp b/src/core/globals.hpp index 3f2407b3..5f3f1b72 100644 --- a/src/core/globals.hpp +++ b/src/core/globals.hpp @@ -421,8 +421,10 @@ namespace big int cmd_excecutor = 0x55; int repairpv = 0; int open_vehicle_controller = 0; + int clear_wanted = 0; + int random_ped_components = 0; - NLOHMANN_DEFINE_TYPE_INTRUSIVE(hotkeys, editing_menu_toggle, menu_toggle, teleport_waypoint, teleport_objective, noclip, bringvehicle, invis, heal, fill_inventory, skip_cutscene, freecam, superrun, superjump, beastjump, invisveh, localinvisveh, fill_ammo, fast_quit, cmd_excecutor, repairpv, open_vehicle_controller) + NLOHMANN_DEFINE_TYPE_INTRUSIVE(hotkeys, editing_menu_toggle, menu_toggle, teleport_waypoint, teleport_objective, noclip, bringvehicle, invis, heal, fill_inventory, skip_cutscene, freecam, superrun, superjump, beastjump, invisveh, localinvisveh, fill_ammo, fast_quit, cmd_excecutor, repairpv, open_vehicle_controller, clear_wanted, random_ped_components) } hotkeys{}; bool dev_dlc = false; @@ -727,10 +729,10 @@ namespace big struct window { - ImU32 background_color = 3189656871; + ImU32 background_color = 3696311571; ImU32 text_color = 4294967295; - ImU32 button_color = 4216956014; - ImU32 frame_color = 2939772740; + ImU32 button_color = 2947901213; + ImU32 frame_color = 2942518340; float gui_scale = 1.f; ImFont* font_title = nullptr; @@ -738,7 +740,7 @@ namespace big ImFont* font_small = nullptr; ImFont* font_icon = nullptr; - bool demo = false; + bool demo = false; bool switched_view = true; struct ingame_overlay diff --git a/src/gui.cpp b/src/gui.cpp index b6c80037..975434f4 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -156,6 +156,8 @@ namespace big auto button_color = ImGui::ColorConvertU32ToFloat4(g.window.button_color); auto button_active_color = ImVec4(button_color.x + 0.33f, button_color.y + 0.33f, button_color.z + 0.33f, button_color.w); + auto button_hovered_color = + ImVec4(button_color.x + 0.15f, button_color.y + 0.15f, button_color.z + 0.15f, button_color.w); auto frame_color = ImGui::ColorConvertU32ToFloat4(g.window.frame_color); auto frame_hovered_color = ImVec4(frame_color.x + 0.14f, frame_color.y + 0.14f, frame_color.z + 0.14f, button_color.w); @@ -165,7 +167,7 @@ namespace big ImGui::PushStyleColor(ImGuiCol_WindowBg, ImGui::ColorConvertU32ToFloat4(g.window.background_color)); ImGui::PushStyleColor(ImGuiCol_Text, ImGui::ColorConvertU32ToFloat4(g.window.text_color)); ImGui::PushStyleColor(ImGuiCol_Button, button_color); - ImGui::PushStyleColor(ImGuiCol_ButtonHovered, button_color); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, button_hovered_color); ImGui::PushStyleColor(ImGuiCol_ButtonActive, button_active_color); ImGui::PushStyleColor(ImGuiCol_FrameBg, frame_color); ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, frame_hovered_color); diff --git a/src/services/hotkey/hotkey_service.cpp b/src/services/hotkey/hotkey_service.cpp index 92d421cc..cf79ece7 100644 --- a/src/services/hotkey/hotkey_service.cpp +++ b/src/services/hotkey/hotkey_service.cpp @@ -31,6 +31,7 @@ namespace big register_hotkey("superjump", g.settings.hotkeys.superjump, RAGE_JOAAT("superjump")); register_hotkey("vehiclecontroller", g.settings.hotkeys.open_vehicle_controller, RAGE_JOAAT("vehiclecontrol")); register_hotkey("waypoint", g.settings.hotkeys.teleport_waypoint, RAGE_JOAAT("waypointtp")); + register_hotkey("clearwantedlvl", g.settings.hotkeys.clear_wanted, RAGE_JOAAT("clearwantedlvl")); g_renderer->add_wndproc_callback([this](HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { wndproc(static_cast(msg), wparam); diff --git a/src/views/debug/view_debug_animations.cpp b/src/views/debug/view_debug_animations.cpp index 530625ee..37d22cb5 100644 --- a/src/views/debug/view_debug_animations.cpp +++ b/src/views/debug/view_debug_animations.cpp @@ -28,7 +28,7 @@ namespace big }); ImGui::SetNextItemWidth(400); - components::input_text_with_hint("", "Dictionary", ¤t_dict); + components::input_text_with_hint("##dictionaryfilter", "Dictionary", ¤t_dict); if (animations::has_anim_list_been_populated() && ImGui::BeginListBox("##dictionaries", ImVec2(400, 200))) { diff --git a/src/views/network/view_spoofing.cpp b/src/views/network/view_spoofing.cpp index dcb38cae..185f748d 100644 --- a/src/views/network/view_spoofing.cpp +++ b/src/views/network/view_spoofing.cpp @@ -82,11 +82,11 @@ namespace big components::command_checkbox<"vcaudio">(); - components::sub_title("SPOOFING_HIDE_FEATURES"_T); + ImGui::SeparatorText("SPOOFING_HIDE_FEATURES"_T.data()); ImGui::Checkbox("SPOOFING_HIDE_GOD_MODE"_T.data(), &g.spoofing.spoof_hide_god); ImGui::Checkbox("SPOOFING_HIDE_SPECTATE"_T.data(), &g.spoofing.spoof_hide_spectate); - components::sub_title("CREW"_T); + ImGui::SeparatorText("CREW"_T.data()); ImGui::Checkbox("SPOOFING_CREW"_T.data(), &g.spoofing.spoof_crew_data); @@ -104,7 +104,7 @@ namespace big ImGui::Checkbox("SPOOFING_CREW_SQUARE_TAG"_T.data(), &g.spoofing.square_crew_tag); - components::sub_title("SPOOFING_SESSION_ATTRIBUTES"_T); + ImGui::SeparatorText("SPOOFING_SESSION_ATTRIBUTES"_T.data()); components::small_text("SPOOFING_ONLY_WORKS_AS_HOST"_T); ImGui::Checkbox("SPOOFING_ATTRIBUTE_REGION"_T.data(), &g.spoofing.spoof_session_region_type); diff --git a/src/views/players/player/player_toxic.cpp b/src/views/players/player/player_toxic.cpp index 7b2203d9..91bb2b13 100644 --- a/src/views/players/player/player_toxic.cpp +++ b/src/views/players/player/player_toxic.cpp @@ -47,10 +47,11 @@ namespace big components::player_command_button<"fakeban">(g_player_service->get_selected(), {}); static int wanted_level; - ImGui::SliderInt("WANTED_LVL"_T.data(), &wanted_level, 0, 5); + components::small_text("WANTED_LVL"); + ImGui::SliderInt("##wantedlevelslider", &wanted_level, 0, 5); ImGui::SameLine(); components::player_command_button<"wanted">(g_player_service->get_selected(), {(uint64_t)wanted_level}, "Set"); - ImGui::SameLine(); + components::player_command_button<"remweaps">(g_player_service->get_selected(), {}); components::player_command_button<"tutorial">(g_player_service->get_selected(), {}); diff --git a/src/views/self/view_mobile.cpp b/src/views/self/view_mobile.cpp index 4f8839c1..04c83184 100644 --- a/src/views/self/view_mobile.cpp +++ b/src/views/self/view_mobile.cpp @@ -9,8 +9,7 @@ namespace big { ImGui::SetWindowSize({0.f, (float)*g_pointers->m_gta.m_resolution_y}, ImGuiCond_Always); - components::sub_title("MERRYWEATHER"_T); - ImGui::Separator(); + ImGui::SeparatorText("MERRYWEATHER"_T.data()); components::button("MW_AMMO_DROP"_T, [] { mobile::merry_weather::request_ammo_drop(); @@ -30,8 +29,8 @@ namespace big mobile::merry_weather::request_airstrike(); }); - components::sub_title("MORS_MUTUAL"_T); - ImGui::Separator(); + + ImGui::SeparatorText("MORS_MUTUAL"_T.data()); components::button("MORS_FIX_ALL"_T, [] { int amount_fixed = mobile::mors_mutual::fix_all(); @@ -41,8 +40,7 @@ namespace big amount_fixed == 1 ? "VEHICLE_FIX_HAS"_T.data() : "VEHICLE_FIX_HAVE"_T.data()))); }); - components::sub_title("CEO_ABILITIES"_T); - ImGui::Separator(); + ImGui::SeparatorText("CEO_ABILITIES"_T.data()); components::button("CEO_BULLSHARK"_T, [] { mobile::ceo_abilities::request_bullshark_testosterone(); diff --git a/src/views/self/view_self.cpp b/src/views/self/view_self.cpp index 95f1132e..e3154198 100644 --- a/src/views/self/view_self.cpp +++ b/src/views/self/view_self.cpp @@ -23,9 +23,7 @@ namespace big ImGui::SameLine(); components::command_button<"fillammo">(); - ImGui::Separator(); - - components::sub_title("GENERAL"_T); + ImGui::SeparatorText("GENERAL"_T.data()); ImGui::BeginGroup(); @@ -181,9 +179,7 @@ namespace big ImGui::EndGroup(); - ImGui::Separator(); - - components::sub_title("PROOFS"_T); + ImGui::SeparatorText("PROOFS"_T.data()); if (ImGui::Button("CHECK_ALL"_T.data())) { @@ -239,9 +235,7 @@ namespace big ImGui::EndGroup(); - ImGui::Separator(); - - components::sub_title("HUD"_T); + ImGui::SeparatorText("HUD"_T.data()); ImGui::BeginGroup(); diff --git a/src/views/self/view_teleport.cpp b/src/views/self/view_teleport.cpp index 50572389..f77c7bb7 100644 --- a/src/views/self/view_teleport.cpp +++ b/src/views/self/view_teleport.cpp @@ -10,7 +10,7 @@ namespace big { void view::teleport() { - components::sub_title("BLIPS"_T.data()); + ImGui::SeparatorText("BLIPS"_T.data()); ImGui::Spacing(); components::command_button<"waypointtp">({}, "Waypoint"); @@ -18,9 +18,8 @@ namespace big components::command_button<"objectivetp">({}, "Objective"); components::command_checkbox<"autotptowp">(); - ImGui::Separator(); + ImGui::SeparatorText("Movement"); - components::sub_title("Movement"); ImGui::Spacing(); components::small_text("Current coordinates"); @@ -81,9 +80,7 @@ namespace big }); ImGui::EndGroup(); - ImGui::Separator(); - - components::sub_title("VEHICLES"_T.data()); + ImGui::SeparatorText("VEHICLES"_T.data()); ImGui::Spacing(); components::command_button<"lastvehtp">(); @@ -92,9 +89,7 @@ namespace big ImGui::SameLine(); components::command_button<"pvtp">(); - ImGui::Separator(); - - components::sub_title("GUI_TAB_IPL"_T.data()); + ImGui::SeparatorText("GUI_TAB_IPL"_T.data()); if (ImGui::BeginCombo("IPL_LOCATION"_T.data(), ipls[g.self.ipls.select].friendly_name)) { diff --git a/src/views/self/view_weapons.cpp b/src/views/self/view_weapons.cpp index 4c6faccd..54939ddf 100644 --- a/src/views/self/view_weapons.cpp +++ b/src/views/self/view_weapons.cpp @@ -12,7 +12,7 @@ namespace big { void view::weapons() { - components::sub_title("AMMO"_T); + ImGui::SeparatorText("AMMO"_T.data()); ImGui::BeginGroup(); @@ -73,9 +73,7 @@ namespace big ImGui::EndGroup(); - ImGui::Separator(); - - components::sub_title("MISC"_T); + ImGui::SeparatorText("MISC"_T.data()); components::command_checkbox<"norecoil">(); ImGui::SameLine(); @@ -103,9 +101,7 @@ namespace big components::command_checkbox<"incrdamage">(); ImGui::InputFloat("Damage", &g.weapons.increased_damage, .1, 10, "%.1f"); - ImGui::Separator(); - - components::sub_title("CUSTOM_WEAPONS"_T); + ImGui::SeparatorText("CUSTOM_WEAPONS"_T.data()); ImGui::Checkbox("Custom Gun only fires when weapon is out", &g.self.custom_weapon_stop); CustomWeapon selected = g.weapons.custom_weapon; @@ -151,8 +147,7 @@ namespace big break; } - ImGui::Separator(); - components::sub_title("Aim Assistance"); + ImGui::SeparatorText("Aim Assistance"); components::command_checkbox<"triggerbot">(); ImGui::SameLine(); components::command_checkbox<"aimbot">(); diff --git a/src/views/settings/view_hotkey_settings.cpp b/src/views/settings/view_hotkey_settings.cpp index 232834cf..6c87d6b1 100644 --- a/src/views/settings/view_hotkey_settings.cpp +++ b/src/views/settings/view_hotkey_settings.cpp @@ -50,6 +50,8 @@ namespace big g_hotkey_service->update_hotkey("repairpv", g.settings.hotkeys.repairpv); if (ImGui::Hotkey("Vehicle controller", &g.settings.hotkeys.open_vehicle_controller)) g_hotkey_service->update_hotkey("vehiclecontroller", g.settings.hotkeys.open_vehicle_controller); + if (ImGui::Hotkey("Clear Wanted", &g.settings.hotkeys.clear_wanted)) + g_hotkey_service->update_hotkey("clearwantedlvl", g.settings.hotkeys.clear_wanted); ImGui::PopItemWidth(); } diff --git a/src/views/vehicle/view_fun_vehicle.cpp b/src/views/vehicle/view_fun_vehicle.cpp index d287c0ee..e01e4a79 100644 --- a/src/views/vehicle/view_fun_vehicle.cpp +++ b/src/views/vehicle/view_fun_vehicle.cpp @@ -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 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(); diff --git a/src/views/vehicle/view_lsc.cpp b/src/views/vehicle/view_lsc.cpp index 6974d2af..664d2b52 100644 --- a/src/views/vehicle/view_lsc.cpp +++ b/src/views/vehicle/view_lsc.cpp @@ -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) { diff --git a/src/views/vehicle/view_vehicle.cpp b/src/views/vehicle/view_vehicle.cpp index f392d8a8..04f74434 100644 --- a/src/views/vehicle/view_vehicle.cpp +++ b/src/views/vehicle/view_vehicle.cpp @@ -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(); diff --git a/src/views/world/view_blackhole.cpp b/src/views/world/view_blackhole.cpp index 03e0cbb0..9e12c94b 100644 --- a/src/views/world/view_blackhole.cpp +++ b/src/views/world/view_blackhole.cpp @@ -7,12 +7,12 @@ namespace big { components::command_checkbox<"blackhole">(); - components::sub_title("Entities"); + ImGui::SeparatorText("Entities"); components::command_checkbox<"blackholeincvehs">(); ImGui::SameLine(); components::command_checkbox<"blackholeincpeds">(); - components::sub_title("Position"); + ImGui::SeparatorText("Position"); ImGui::InputFloat("X", &g.world.blackhole.pos.x, 5.f, 200.f); ImGui::InputFloat("Y", &g.world.blackhole.pos.y, 5.f, 200.f); ImGui::InputFloat("Z", &g.world.blackhole.pos.z, 5.f, 200.f); @@ -26,7 +26,7 @@ namespace big g.world.blackhole.pos.z = player_pos->z; }); - components::sub_title("Customize Hole"); + ImGui::SeparatorText("Customize Hole"); ImGui::SetNextItemWidth(214); ImGui::ColorPicker3("Color", g.world.blackhole.color, ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHex); ImGui::SliderInt("Alpha", &g.world.blackhole.alpha, 0, 255); diff --git a/src/views/world/view_spawn_ped.cpp b/src/views/world/view_spawn_ped.cpp index 032735bb..76a4c237 100644 --- a/src/views/world/view_spawn_ped.cpp +++ b/src/views/world/view_spawn_ped.cpp @@ -224,7 +224,8 @@ namespace big } } - components::sub_title("PED_MODEL"_T); + + ImGui::SeparatorText("PED_MODEL"_T.data()); { ImGui::BeginGroup(); { @@ -428,8 +429,8 @@ namespace big } ImGui::Separator(); - - components::sub_title("WEAPON"_T); + + ImGui::SeparatorText("WEAPON"_T.data()); { ImGui::BeginGroup(); { @@ -528,8 +529,8 @@ namespace big } ImGui::Separator(); - - components::sub_title("SPAWN_FOR"_T); + + ImGui::SeparatorText("SPAWN_FOR"_T.data()); { if (ImGui::BeginCombo("##ped_for", (selected_ped_for_player_id == SPAWN_PED_FOR_SELF ? diff --git a/src/views/world/view_squad_spawner.cpp b/src/views/world/view_squad_spawner.cpp index f6799768..5ec21629 100644 --- a/src/views/world/view_squad_spawner.cpp +++ b/src/views/world/view_squad_spawner.cpp @@ -16,7 +16,8 @@ namespace big static squad new_template{}; static player_ptr victim = g_player_service->get_selected(); - ImGui::Text("Victim"); + + ImGui::SeparatorText("Victim"); ImGui::SetNextItemWidth(200); if (ImGui::BeginCombo("##victim", victim->get_name())) { @@ -103,11 +104,9 @@ namespace big ImGui::EndCombo(); } - ImGui::Separator(); + ImGui::SeparatorText("Squad Details"); ImGui::BeginGroup(); //Main variables - - ImGui::Text("Squad Details"); ImGui::Spacing(); ImGui::PushItemWidth(250); diff --git a/src/views/world/view_world.cpp b/src/views/world/view_world.cpp index 97547e1c..bdcf9620 100644 --- a/src/views/world/view_world.cpp +++ b/src/views/world/view_world.cpp @@ -1,34 +1,26 @@ -#include "views/view.hpp" #include "util/entity.hpp" -#include "util/ped.hpp" #include "util/notify.hpp" +#include "util/ped.hpp" #include "util/vehicle.hpp" +#include "views/view.hpp" namespace big { - void view::world() - { - components::sub_title("GUI_TAB_TIME_N_WEATHER"_T); - { - view::time_and_weather(); - } + void view::world() + { + ImGui::SeparatorText("GUI_TAB_TIME_N_WEATHER"_T.data()); + { + view::time_and_weather(); + } - ImGui::Separator(); - - components::sub_title("GUI_TAB_WATER"_T); - { - components::command_checkbox<"partwater">(); - } - - ImGui::Separator(); - components::sub_title("Peds"); + ImGui::SeparatorText("Peds"); // Nearby Ped Actions components::button("Kill", [] { for (auto peds : entity::get_entities(false, true)) { - if(!PED::IS_PED_A_PLAYER(peds)) - ped::kill_ped(peds); + if (!PED::IS_PED_A_PLAYER(peds)) + ped::kill_ped(peds); } }); ImGui::SameLine(); @@ -55,7 +47,7 @@ namespace big ImGui::Checkbox("Neutralize", &g.world.nearby.auto_disarm.neutralize); }); - ImGui::Separator(); + ImGui::SeparatorText("Vehicles"); components::sub_title("Vehicles"); components::button("Max Upgrade", [] { @@ -83,8 +75,7 @@ namespace big components::command_checkbox<"vehiclerain">(); - ImGui::Separator(); - components::sub_title("Entities"); + ImGui::SeparatorText("Entities"); static bool included_entity_types[3]; static bool own_vehicle, deleting; @@ -125,9 +116,9 @@ namespace big if (ENTITY::IS_ENTITY_A_VEHICLE(ent)) if (ent == self::veh && own_vehicle) TASK::CLEAR_PED_TASKS_IMMEDIATELY(self::ped); - + if (entity::take_control_of(ent, 25)) - entity::delete_entity(ent); + entity::delete_entity(ent); } script::get_current()->yield(5ms); @@ -144,5 +135,5 @@ namespace big deleting = false; }); } - } + } } \ No newline at end of file