General UI tweaks (#1538)

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

View File

@ -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);
}

View File

@ -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;

View File

@ -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);

View File

@ -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<eKeyState>(msg), wparam);

View File

@ -28,7 +28,7 @@ namespace big
});
ImGui::SetNextItemWidth(400);
components::input_text_with_hint("", "Dictionary", &current_dict);
components::input_text_with_hint("##dictionaryfilter", "Dictionary", &current_dict);
if (animations::has_anim_list_been_populated() && ImGui::BeginListBox("##dictionaries", ImVec2(400, 200)))
{

View File

@ -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);

View File

@ -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(), {});

View File

@ -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();

View File

@ -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();

View File

@ -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))
{

View File

@ -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">();

View File

@ -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();
}

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

@ -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();

View File

@ -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);

View File

@ -224,7 +224,8 @@ namespace big
}
}
components::sub_title("PED_MODEL"_T);
ImGui::SeparatorText("PED_MODEL"_T.data());
{
ImGui::BeginGroup();
{
@ -429,7 +430,7 @@ namespace big
ImGui::Separator();
components::sub_title("WEAPON"_T);
ImGui::SeparatorText("WEAPON"_T.data());
{
ImGui::BeginGroup();
{
@ -529,7 +530,7 @@ 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 ?

View File

@ -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);

View File

@ -1,33 +1,25 @@
#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);
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<ImVec2(110, 0), ImVec4(0.70196f, 0.3333f, 0.00392f, 1.f)>("Kill", [] {
for (auto peds : entity::get_entities(false, true))
{
if(!PED::IS_PED_A_PLAYER(peds))
if (!PED::IS_PED_A_PLAYER(peds))
ped::kill_ped(peds);
}
});
@ -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<ImVec2(110, 0), ImVec4(0.02745f, 0.4745f, 0.10196f, 1.f)>("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;