refactor(TabBar): Renamed all files

This commit is contained in:
Yimura 2021-01-16 13:19:20 +01:00
parent 0b9837777e
commit 761227344d
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78
15 changed files with 24 additions and 17 deletions

View File

@ -23,6 +23,8 @@ namespace big
static void render_misc(); static void render_misc();
static void render_spawn(); static void render_spawn();
static void render_settings(); static void render_settings();
static void player_info();
}; };
} }

View File

@ -58,7 +58,7 @@ namespace big
if (ImGui::Button("Send Event")) if (ImGui::Button("Send Event"))
{ {
QUEUE_JOB_BEGIN_CLAUSE(=) QUEUE_JOB_BEGIN_CLAUSE(= )
{ {
int64_t* event_args = new int64_t[arg_count]; int64_t* event_args = new int64_t[arg_count];
@ -81,7 +81,7 @@ namespace big
if (ImGui::TreeNode("Protections")) if (ImGui::TreeNode("Protections"))
{ {
auto &protections = g_settings.options["settings"]["protections"]; auto& protections = g_settings.options["settings"]["protections"];
if ( if (
ImGui::Checkbox("Bounty", protections["bounty"].get<bool*>()) || ImGui::Checkbox("Bounty", protections["bounty"].get<bool*>()) ||
@ -103,7 +103,9 @@ namespace big
ImGui::Checkbox("Force Teleport", protections["force_teleport"].get<bool*>()) || ImGui::Checkbox("Force Teleport", protections["force_teleport"].get<bool*>()) ||
ImGui::Checkbox("Transaction Error", protections["transaction_error"].get<bool*>()) || ImGui::Checkbox("Transaction Error", protections["transaction_error"].get<bool*>()) ||
ImGui::Checkbox("Vehicle Kick", protections["vehicle_kick"].get<bool*>()) ImGui::Checkbox("Vehicle Kick", protections["vehicle_kick"].get<bool*>())
) { g_settings.save(); } ) {
g_settings.save();
}
if (ImGui::Button("Enable All")) if (ImGui::Button("Enable All"))
features::functions::toggle_protections(true); features::functions::toggle_protections(true);

View File

@ -12,7 +12,7 @@ namespace big
if ( if (
ImGui::InputText("Model Name", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue) || ImGui::InputText("Model Name", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue) ||
ImGui::Button("Spawn") ImGui::Button("Spawn")
) )
{ {
QUEUE_JOB_BEGIN_CLAUSE(= ) QUEUE_JOB_BEGIN_CLAUSE(= )
{ {

View File

@ -45,7 +45,7 @@ namespace big
case 4: case 4:
ImGui::Text("Set the vehicle model to spawn."); ImGui::Text("Set the vehicle model to spawn.");
break; break;
} }

View File

@ -33,7 +33,7 @@ namespace big
} }
if (ImGui::Button("Set Weather")) if (ImGui::Button("Set Weather"))
{ {
QUEUE_JOB_BEGIN_CLAUSE(=) QUEUE_JOB_BEGIN_CLAUSE(= )
{ {
MISC::SET_OVERRIDE_WEATHER(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]); MISC::SET_WEATHER_TYPE_NOW_PERSIST(weather_types[g_temp.weather_type]);

View File

@ -1,5 +1,5 @@
#include "window.hpp" #include "gui/window.hpp"
#include "tab_bar/tab_bar.hpp" #include "gui/tab_bar.hpp"
namespace big namespace big
{ {

View File

@ -1,4 +1,5 @@
#include "window.hpp" #include "gui/window.hpp"
#include "gui/tab_bar.hpp"
#include "features.hpp" #include "features.hpp"
#include "pointers.hpp" #include "pointers.hpp"
@ -8,19 +9,21 @@ namespace big
{ {
if (g_selectedPlayer.id != g_selectedPlayerId || !g_selectedPlayer.is_online) return; if (g_selectedPlayer.id != g_selectedPlayerId || !g_selectedPlayer.is_online) return;
if (ImGui::Begin("Player Options")) char title[64];
strcpy(title, "Player Options: ");
strcat(title, g_selectedPlayer.name);
if (ImGui::Begin(title))
{ {
ImGui::Text("Selected player:");
ImGui::SameLine(); ImGui::TextColored({ 25,180,38,255 }, g_selectedPlayer.name);
if (ImGui::Button("Close")) if (ImGui::Button("Close"))
{ {
g_selectedPlayerId = -2; g_selectedPlayerId = -2;
} }
ImGui::Separator(); ImGui::BeginTabBar("tabbar_player");
ImGui::Checkbox("Spectate Player", &g_temp.spectate_player); ImGui::EndTabBar();
ImGui::Separator();
ImGui::Separator(); ImGui::Separator();

View File

@ -1,4 +1,4 @@
#include "window.hpp" #include "gui/window.hpp"
#include "features.hpp" #include "features.hpp"
#include "natives.hpp" #include "natives.hpp"
#include "script.hpp" #include "script.hpp"

View File

@ -1,4 +1,4 @@
#include "window.hpp" #include "gui/window.hpp"
#include "features.hpp" #include "features.hpp"
namespace big namespace big