refactor(UX): Moved menu options around for better UX

This commit is contained in:
Yimura 2020-12-29 23:32:58 +01:00
parent 0ce27e39ce
commit 4fd2768aa0
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78
11 changed files with 108 additions and 62 deletions

View File

@ -20,6 +20,7 @@ namespace big
off_radar();
population_modifiers();
reveal_players();
speedo_meter();
spoof_rank();
sticky_tyres();
super_sprint();

View File

@ -4,6 +4,7 @@
#include "structs/lists.hpp"
#include "structs/player.hpp"
#include "structs/temp.hpp"
#include "features/functions.hpp"
#include "features/notify.hpp"
#include "features/stats.hpp"
#include "features/teleport.hpp"
@ -34,6 +35,7 @@ namespace big
void off_radar();
void population_modifiers();
void reveal_players();
void speedo_meter();
void spoof_rank();
void sticky_tyres();
void super_sprint();

View File

@ -15,7 +15,7 @@ namespace big
tabbar::render_teleport();
tabbar::render_vehicle();
tabbar::render_world();
tabbar::render_network();
tabbar::render_online();
tabbar::render_misc();
tabbar::render_spawn();
ImGui::EndTabBar();

View File

@ -18,7 +18,7 @@ namespace big
static void render_teleport();
static void render_vehicle();
static void render_world();
static void render_network();
static void render_online();
static void render_misc();
static void render_spawn();
};

View File

@ -6,10 +6,15 @@ namespace big
{
if (ImGui::BeginTabItem("Misc"))
{
if (ImGui::Checkbox("Player Join Message", g_settings.options["join_message"].get<bool*>()))
g_settings.save();
ImGui::Separator();
ImGui::Text("Set Current Character Level:");
ImGui::SliderInt("##input_levels_self", &g_temp.set_level, 0, 8000);
if (ImGui::Button("Set Level"))
{
QUEUE_JOB_BEGIN_CLAUSE()
{
features::functions::set_player_level(g_temp.set_level);
}QUEUE_JOB_END_CLAUSE
}
if (ImGui::Button("Unlock Achievements"))
{

View File

@ -1,41 +0,0 @@
#pragma once
#include "tab_bar.hpp"
#include "pointers.hpp"
#include "script_global.hpp"
namespace big
{
void tabbar::render_network()
{
if (ImGui::BeginTabItem("Network"))
{
if (ImGui::Checkbox("Reveal Players", g_settings.options["reveal_players"].get<bool*>()))
g_settings.save();
ImGui::Separator();
ImGui::Text("Time: ");
ImGui::SliderInt("Hour:", &g_temp.time.hour, 0, 23);
ImGui::SliderInt("Minutes:", &g_temp.time.minutes, 0, 59);
if (ImGui::Button("Apply"))
{
QUEUE_JOB_BEGIN_CLAUSE(= )
{
NETWORK::NETWORK_OVERRIDE_CLOCK_TIME(g_temp.time.hour, g_temp.time.minutes, 0);
g_pointers->m_sync_local_time(1, 0);
}QUEUE_JOB_END_CLAUSE
}
ImGui::Separator();
if (ImGui::Checkbox("Spoof Online Rank", g_settings.options["spoof_rank"].get<bool*>()))
g_settings.save();
if (ImGui::InputInt(": Rank", (PINT)g_settings.options["rank"].get<int64_t*>(), 1, 50))
g_settings.save();
ImGui::EndTabItem();
}
}
}

View File

@ -0,0 +1,88 @@
#include "tab_bar.hpp"
#include "pointers.hpp"
#include "script_global.hpp"
namespace big
{
void tabbar::render_online()
{
if (ImGui::BeginTabItem("Online"))
{
if (ImGui::TreeNode("Self"))
{
if (ImGui::Checkbox("Off-Radar", g_settings.options["off_radar"].get<bool*>()))
g_settings.save();
ImGui::SameLine();
if (ImGui::Checkbox("Reveal Players", g_settings.options["reveal_players"].get<bool*>()))
g_settings.save();
if (ImGui::Checkbox("Player Join Message", g_settings.options["join_message"].get<bool*>()))
g_settings.save();
ImGui::TreePop();
}
ImGui::Separator();
if (ImGui::TreeNode("Money"))
{
ImGui::Text("Instructions:\n\nTake a vehicle from the street.\nGo in LSC and put a tracker on it.\nOpen the sell submenu but don't confirm it.\nOpen this menu and click one of the below buttons.");
if (ImGui::Button("Set Car Sell Value at 25 million"))
{
features::functions::set_car_sell_value((int)25e6);
}
if (ImGui::Button("Set Car Sell Value at INT_MAX (2.1 billion)"))
{
features::functions::set_car_sell_value(INT_MAX);
}
if (ImGui::Button("Reset Vehicle Sell Stats"))
{
QUEUE_JOB_BEGIN_CLAUSE()
{
features::functions::reset_vehicle_sell_stats();
}QUEUE_JOB_END_CLAUSE
}
ImGui::TreePop();
}
ImGui::Separator();
if (ImGui::TreeNode("Spoofing"))
{
if (ImGui::Checkbox("Spoof Online Rank", g_settings.options["spoof_rank"].get<bool*>()))
g_settings.save();
ImGui::Text("Rank:");
if (ImGui::InputInt("##rank", (PINT)g_settings.options["rank"].get<int64_t*>(), 1, 50))
g_settings.save();
ImGui::TreePop();
}
ImGui::Separator();
if (ImGui::TreeNode("World"))
{
ImGui::Text("Time: ");
ImGui::SliderInt("Hour:", &g_temp.time.hour, 0, 23);
ImGui::SliderInt("Minutes:", &g_temp.time.minutes, 0, 59);
if (ImGui::Button("Apply"))
{
QUEUE_JOB_BEGIN_CLAUSE(= )
{
NETWORK::NETWORK_OVERRIDE_CLOCK_TIME(g_temp.time.hour, g_temp.time.minutes, 0);
g_pointers->m_sync_local_time(1, 0);
}QUEUE_JOB_END_CLAUSE
}
ImGui::TreePop();
}
ImGui::EndTabItem();
}
}
}

View File

@ -27,10 +27,8 @@ namespace big
ImGui::Separator();
if (ImGui::Checkbox("God Mode", g_settings.options["god_mode"].get<bool*>())
|| ImGui::Checkbox("No Ragdoll", g_settings.options["ragdoll"].get<bool*>())
|| ImGui::Checkbox("Off-Radar", g_settings.options["off_radar"].get<bool*>())
) g_settings.save();
if (ImGui::Checkbox("God Mode", g_settings.options["god_mode"].get<bool*>()) || ImGui::Checkbox("No Ragdoll", g_settings.options["ragdoll"].get<bool*>()))
g_settings.save();
ImGui::Separator();

View File

@ -11,16 +11,6 @@ namespace big
if (ImGui::Checkbox("No Idle Kick", g_settings.options["no_idle_kick"].get<bool*>()))
g_settings.save();
if (ImGui::Button("Set Car Sell Value at 25 million"))
{
*script_global(99007).at(970).as<int*>() = 25000000;
}
if (ImGui::Button("Set Car Sell Value at INT_MAX (2.1 billion)"))
{
*script_global(99007).at(970).as<int*>() = INT_MAX;
}
ImGui::EndTabItem();
}
}

View File

@ -35,7 +35,8 @@ namespace big
{
QUEUE_JOB_BEGIN_CLAUSE(=)
{
MISC::SET_WEATHER_TYPE_NOW(weather_types[g_temp.weather_type]);
MISC::SET_OVERRIDE_WEATHER(weather_types[g_temp.weather_type]);
MISC::SET_WEATHER_TYPE_NOW_PERSIST(weather_types[g_temp.weather_type]);
}QUEUE_JOB_END_CLAUSE
}

View File

@ -10,6 +10,8 @@ namespace big
struct temp
{
int character_slot = 0;
int set_level = 0;
int spoofed_rank = 0;
game_time time = game_time{};
int wanted_level = 0;