feat(GUI): Added Top Bar to gui namespace
This commit is contained in:
parent
e7818b5159
commit
b917ac9905
@ -99,6 +99,9 @@ namespace big
|
||||
{
|
||||
TRY_CLAUSE
|
||||
{
|
||||
// gui/top_bar.cpp
|
||||
render_top_bar();
|
||||
|
||||
// gui/main_window.cpp
|
||||
render_main_window();
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ namespace big
|
||||
void script_on_tick();
|
||||
static void script_func();
|
||||
|
||||
void render_top_bar();
|
||||
void render_main_window();
|
||||
public:
|
||||
bool m_opened{};
|
||||
|
85
BigBaseV2/src/gui/top_bar.cpp
Normal file
85
BigBaseV2/src/gui/top_bar.cpp
Normal file
@ -0,0 +1,85 @@
|
||||
#include "common.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "imgui.h"
|
||||
#include "features.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void gui::render_top_bar()
|
||||
{
|
||||
if (ImGui::BeginMainMenuBar())
|
||||
{
|
||||
if (ImGui::BeginMenu("Info"))
|
||||
{
|
||||
ImGui::MenuItem("Logged in as:", NULL, false, false);
|
||||
ImGui::MenuItem(g_players[g_playerId].name, NULL, false, false);
|
||||
|
||||
if (ImGui::MenuItem("Am I lobby host?"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
//features::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()
|
||||
{
|
||||
//features::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()
|
||||
{
|
||||
if (CUTSCENE::IS_CUTSCENE_ACTIVE())
|
||||
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
|
||||
//else
|
||||
//features::notify_above_map("There's no cutscene active at the moment.");
|
||||
}
|
||||
QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Quit"))
|
||||
{
|
||||
if (ImGui::MenuItem("Unload Menu (may crash)"))
|
||||
{
|
||||
g_running = false;
|
||||
}
|
||||
|
||||
if (ImGui::MenuItem("Rage Quit (hard crash)"))
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user