mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
refactor(GUI): Reorder code and clean up includes
This commit is contained in:
parent
9b3166f486
commit
c40395731d
@ -9,28 +9,40 @@ namespace big
|
||||
{
|
||||
g_playerId = PLAYER::PLAYER_ID();
|
||||
|
||||
// System
|
||||
update_player_structs();
|
||||
update_screen_sizes();
|
||||
|
||||
// Custom Guns
|
||||
delete_gun();
|
||||
disable_phone();
|
||||
god_mode();
|
||||
gravity_gun();
|
||||
money_gun();
|
||||
vehicle_gun();
|
||||
|
||||
// Tunable
|
||||
disable_phone();
|
||||
no_idle_kick();
|
||||
|
||||
// Self
|
||||
god_mode();
|
||||
never_wanted();
|
||||
noclip();
|
||||
no_bike_fall();
|
||||
no_idle_kick();
|
||||
no_ragdoll();
|
||||
off_radar();
|
||||
population_modifiers();
|
||||
reveal_players();
|
||||
spectate_player();
|
||||
speedo_meter();
|
||||
spoof_rank();
|
||||
sticky_tyres();
|
||||
super_sprint();
|
||||
vehicle_gun();
|
||||
spoof_rank();
|
||||
|
||||
// Vehicle
|
||||
no_bike_fall();
|
||||
speedo_meter();
|
||||
sticky_tyres();
|
||||
|
||||
// World
|
||||
population_modifiers();
|
||||
|
||||
// Util
|
||||
spectate_player();
|
||||
|
||||
}
|
||||
|
||||
void features::script_func()
|
||||
|
@ -43,7 +43,6 @@ namespace big
|
||||
void no_ragdoll();
|
||||
void off_radar();
|
||||
void population_modifiers();
|
||||
void reveal_players();
|
||||
void spectate_player();
|
||||
void speedo_meter();
|
||||
void spoof_rank();
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include "renderer.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
#include "gui/window.hpp"
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
namespace big
|
||||
@ -103,16 +105,16 @@ namespace big
|
||||
TRY_CLAUSE
|
||||
{
|
||||
// gui/top_bar.cpp
|
||||
render_top_bar();
|
||||
window::render_top_bar();
|
||||
|
||||
// gui/main_window.cpp
|
||||
render_main_window();
|
||||
window::render_main_window();
|
||||
|
||||
// gui/user_sidebar.cpp
|
||||
render_user_sidebar();
|
||||
window::render_user_sidebar();
|
||||
|
||||
// gui/player_window.cpp
|
||||
render_player_window();
|
||||
window::render_player_window();
|
||||
}
|
||||
EXCEPT_CLAUSE
|
||||
}
|
||||
|
@ -12,11 +12,6 @@ namespace big
|
||||
void script_init();
|
||||
void script_on_tick();
|
||||
static void script_func();
|
||||
|
||||
void render_top_bar();
|
||||
void render_main_window();
|
||||
void render_user_sidebar();
|
||||
void render_player_window();
|
||||
public:
|
||||
bool m_opened{};
|
||||
};
|
||||
|
@ -1,11 +1,9 @@
|
||||
#include "common.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "imgui.h"
|
||||
#include "window.hpp"
|
||||
#include "tab_bar/tab_bar.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void gui::render_main_window()
|
||||
void window::render_main_window()
|
||||
{
|
||||
if (ImGui::Begin("Yimura's Mod Menu"))
|
||||
{
|
||||
|
@ -1,11 +1,10 @@
|
||||
#include "gui.hpp"
|
||||
#include "imgui.h"
|
||||
#include "window.hpp"
|
||||
#include "features.hpp"
|
||||
#include "pointers.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void gui::render_player_window()
|
||||
void window::render_player_window()
|
||||
{
|
||||
if (g_selectedPlayer.id != g_selectedPlayerId || !g_selectedPlayer.is_online) return;
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "common.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "imgui.h"
|
||||
#include "window.hpp"
|
||||
#include "features.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
@ -10,7 +8,7 @@ namespace big
|
||||
{
|
||||
static char* player_name = "";
|
||||
|
||||
void gui::render_top_bar()
|
||||
void window::render_top_bar()
|
||||
{
|
||||
if (ImGui::BeginMainMenuBar())
|
||||
{
|
||||
@ -95,14 +93,6 @@ namespace big
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
/*if (ImGui::BeginMenu("Developer Options"))
|
||||
{
|
||||
ImGui::MenuItem("Scripted Game Event Logging (kick)", NULL, &g_bScriptedGameLogging);
|
||||
ImGui::MenuItem("Event Data Logging (other events)", NULL, &g_bScriptLogging);
|
||||
|
||||
ImGui::EndMenu();
|
||||
}*/
|
||||
|
||||
ImGui::EndMainMenuBar();
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,9 @@
|
||||
#include "imgui.h"
|
||||
#include "gui.hpp"
|
||||
#include "window.hpp"
|
||||
#include "features.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void gui::render_user_sidebar()
|
||||
void window::render_user_sidebar()
|
||||
{
|
||||
ImGui::SetNextWindowSize({ 350.f, (float)y }, ImGuiCond_Always);
|
||||
ImGui::SetNextWindowPos({ x - 350.f, 0.f }, ImGuiCond_Always);
|
||||
|
14
BigBaseV2/src/gui/window.hpp
Normal file
14
BigBaseV2/src/gui/window.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include "imgui.h"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class window
|
||||
{
|
||||
public:
|
||||
static void render_top_bar();
|
||||
static void render_main_window();
|
||||
static void render_user_sidebar();
|
||||
static void render_player_window();
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user