mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-22 08:42:44 +08:00
feat(GUI): Added top bar to window
This commit is contained in:
@ -5,6 +5,8 @@ namespace big
|
||||
{
|
||||
void main_gui::draw()
|
||||
{
|
||||
window::top_bar();
|
||||
|
||||
window::main();
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ namespace big
|
||||
{
|
||||
class window {
|
||||
public:
|
||||
static void top_bar();
|
||||
static void main();
|
||||
};
|
||||
}
|
77
BigBaseV2/src/gui/window/window_top_bar.cpp
Normal file
77
BigBaseV2/src/gui/window/window_top_bar.cpp
Normal file
@ -0,0 +1,77 @@
|
||||
#include "gui/window.hpp"
|
||||
#include "imgui.h"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/notify.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void window::top_bar()
|
||||
{
|
||||
if (ImGui::BeginMainMenuBar())
|
||||
{
|
||||
if (ImGui::BeginMenu("Info"))
|
||||
{
|
||||
ImGui::MenuItem("Logged in as:", NULL, false, false);
|
||||
ImGui::MenuItem("unknown", NULL, false, false);
|
||||
|
||||
if (ImGui::MenuItem("Am I lobby host?"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
notify::above_map(NETWORK::NETWORK_IS_HOST() ? "~g~Yes you are the host." : "You aren't the host.");
|
||||
}
|
||||
QUEUE_JOB_END_CLAUSE
|
||||
|
||||
}
|
||||
|
||||
if (ImGui::MenuItem("Flagged Account?"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
notify::above_map(NETWORK::NETWORK_PLAYER_IS_BADSPORT() ? "You have been ~r~reported multiple times!" : "Your account is in good standing.");
|
||||
}
|
||||
QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Extra"))
|
||||
{
|
||||
if (ImGui::MenuItem("Skip Cutscene"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
|
||||
}
|
||||
QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Quit"))
|
||||
{
|
||||
if (ImGui::MenuItem("Unload Menu (may crash)"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(&)
|
||||
{
|
||||
notify::above_map("Thanks for using Yim's Mod Menu");
|
||||
|
||||
g_running = false;
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
if (ImGui::MenuItem("Rage Quit (hard crash)"))
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
ImGui::EndMainMenuBar();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user