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:
maybegreat48
2023-03-01 21:27:15 +00:00
committed by GitHub
parent 92aea20cd6
commit 97a8c5d60b
466 changed files with 55224 additions and 35596 deletions

View File

@ -14,7 +14,7 @@ namespace big
navigation_struct* gui_service::get_selected()
{
static navigation_struct tab_none = { "", nullptr };
static navigation_struct tab_none = {"", nullptr};
if (current_tab.empty() || current_tab.at(0) == tabs::NONE)
return &tab_none;
@ -23,7 +23,8 @@ namespace big
{
for (const tabs& t : current_tab)
{
if (t == current_tab.at(0)) continue;
if (t == current_tab.at(0))
continue;
current_nav = &current_nav->sub_nav.at(t);
}
}
@ -43,7 +44,8 @@ namespace big
void gui_service::set_selected(tabs tab)
{
if (current_tab.empty()) return current_tab.push_back(tab);
if (current_tab.empty())
return current_tab.push_back(tab);
if (auto it = get_selected()->sub_nav.find(tab); it != get_selected()->sub_nav.end())
current_tab.push_back(tab);
else

View File

@ -3,7 +3,8 @@
namespace big
{
enum class tabs {
enum class tabs
{
NONE,
SELF,
@ -56,7 +57,7 @@ namespace big
struct navigation_struct
{
const char name[32] = "";
const char name[32] = "";
std::function<void()> func = nullptr;
std::map<tabs, navigation_struct> sub_nav{};
};
@ -66,53 +67,58 @@ namespace big
std::vector<tabs> current_tab{};
bool switched_view = true;
std::map<tabs, navigation_struct> nav = {
{tabs::SELF, { "Self",view::self, {
{ tabs::WEAPONS, { "Weapons", view::weapons }},
{ tabs::MOBILE, {"Mobile", view::mobile}},
{ tabs::TELEPORT, {"Teleport", view::teleport}},
}}},
{tabs::VEHICLE, { "Vehicle", view::vehicle, {
{ tabs::HANDLING, {"Handling", view::handling_current_profile, {
{ tabs::HANDLING_CURRENT_PROFILE, {"Current Profile", view::handling_current_profile } },
{ tabs::HANDLING_SAVED_PROFILE, {"Saved Profiles", view::handling_saved_profiles } },
}}},
{ tabs::LSC, { "LS Customs", view::lsc }},
{ tabs::SPAWN_VEHICLE, { "Spawn Vehicle", view::spawn_vehicle }},
{ tabs::PV, { "Personal Vehicle", view::pv }},
{ tabs::PERSIST_CAR, { "Persist Car", view::persist_car }},
{ tabs::FUN_VEHICLE, { "Fun Features", view::fun_vehicle }},
}}},
{ tabs::WORLD, { "World", nullptr, {
{ tabs::SPAWN_PED, { "Spawn Ped", view::spawn_ped }},
{ tabs::TIME_AND_WEATHER, { "Time And Weather", view::time_and_weather }},
{ tabs::CREATOR, { "Creator", view::creator }},
{ tabs::TRAIN, { "Train", view::train }},
{ tabs::WATER, { "Water", view::water }},
{ tabs::BLACKHOLE, { "Blackhole", view::blackhole }},
{ tabs::MODEL_SWAPPER, { "Model Swapper", view::model_swapper }},
{ tabs::NEARBY, { "Nearby", view::nearby }}
}}},
{tabs::NETWORK, { "Network", nullptr, {
{ tabs::SPOOFING, { "Spoofing", view::spoofing }},
{ tabs::SESSION, { "Session", view::session }},
{ tabs::MISSIONS, { "Missions", view::missions }},
{ tabs::PLAYER_DATABASE, { "Player Database", view::player_database }},
{ tabs::SESSION_BROWSER, { "Session Browser", view::session_browser }},
}}},
{tabs::SETTINGS, { "Settings", view::settings, {
{ tabs::STAT_EDITOR, { "Stat Editor", view::stat_editor}},
{ tabs::CONTEXT_MENU_SETTINGS, { "Context Menu", view::context_menu_settings}},
{ tabs::ESP_SETTINGS, { "ESP", view::esp_settings}},
{ tabs::GUI_SETTINGS, { "GUI", view::gui_settings}},
{ tabs::HOTKEY_SETTINGS, { "Hotkeys", view::hotkey_settings }},
{ tabs::REACTION_SETTINGS, { "Reactions", view::reaction_settings}},
{ tabs::PROTECTION_SETTINGS, { "Protection", view::protection_settings}},
{ tabs::TRANSLATION_SETTINGS, { "Translation", view::translation_settings}},
{ tabs::DEBUG, { "Debug", nullptr }},
}}},
{tabs::PLAYER, {"", view::view_player}}
};
std::map<tabs, navigation_struct> nav = {{tabs::SELF,
{"Self",
view::self,
{
{tabs::WEAPONS, {"Weapons", view::weapons}},
{tabs::MOBILE, {"Mobile", view::mobile}},
{tabs::TELEPORT, {"Teleport", view::teleport}},
}}},
{tabs::VEHICLE,
{"Vehicle",
view::vehicle,
{
{tabs::HANDLING,
{"Handling",
view::handling_current_profile,
{
{tabs::HANDLING_CURRENT_PROFILE, {"Current Profile", view::handling_current_profile}},
{tabs::HANDLING_SAVED_PROFILE, {"Saved Profiles", view::handling_saved_profiles}},
}}},
{tabs::LSC, {"LS Customs", view::lsc}},
{tabs::SPAWN_VEHICLE, {"Spawn Vehicle", view::spawn_vehicle}},
{tabs::PV, {"Personal Vehicle", view::pv}},
{tabs::PERSIST_CAR, {"Persist Car", view::persist_car}},
{tabs::FUN_VEHICLE, {"Fun Features", view::fun_vehicle}},
}}},
{tabs::WORLD, {"World", nullptr, {{tabs::SPAWN_PED, {"Spawn Ped", view::spawn_ped}}, {tabs::TIME_AND_WEATHER, {"Time And Weather", view::time_and_weather}}, {tabs::CREATOR, {"Creator", view::creator}}, {tabs::TRAIN, {"Train", view::train}}, {tabs::WATER, {"Water", view::water}}, {tabs::BLACKHOLE, {"Blackhole", view::blackhole}}, {tabs::MODEL_SWAPPER, {"Model Swapper", view::model_swapper}}, {tabs::NEARBY, {"Nearby", view::nearby}}}}},
{tabs::NETWORK,
{"Network",
nullptr,
{
{tabs::SPOOFING, {"Spoofing", view::spoofing}},
{tabs::SESSION, {"Session", view::session}},
{tabs::MISSIONS, {"Missions", view::missions}},
{tabs::PLAYER_DATABASE, {"Player Database", view::player_database}},
{tabs::SESSION_BROWSER, {"Session Browser", view::session_browser}},
}}},
{tabs::SETTINGS,
{"Settings",
view::settings,
{
{tabs::STAT_EDITOR, {"Stat Editor", view::stat_editor}},
{tabs::CONTEXT_MENU_SETTINGS, {"Context Menu", view::context_menu_settings}},
{tabs::ESP_SETTINGS, {"ESP", view::esp_settings}},
{tabs::GUI_SETTINGS, {"GUI", view::gui_settings}},
{tabs::HOTKEY_SETTINGS, {"Hotkeys", view::hotkey_settings}},
{tabs::REACTION_SETTINGS, {"Reactions", view::reaction_settings}},
{tabs::PROTECTION_SETTINGS, {"Protection", view::protection_settings}},
{tabs::TRANSLATION_SETTINGS, {"Translation", view::translation_settings}},
{tabs::DEBUG, {"Debug", nullptr}},
}}},
{tabs::PLAYER, {"", view::view_player}}};
public:
gui_service();
virtual ~gui_service();