diff --git a/BigBaseV2/src/gui.cpp b/BigBaseV2/src/gui.cpp index 7e5122c9..4e721b04 100644 --- a/BigBaseV2/src/gui.cpp +++ b/BigBaseV2/src/gui.cpp @@ -99,6 +99,9 @@ namespace big { TRY_CLAUSE { + // gui/top_bar.cpp + render_top_bar(); + // gui/main_window.cpp render_main_window(); } diff --git a/BigBaseV2/src/gui.hpp b/BigBaseV2/src/gui.hpp index adf8a387..a6447d80 100644 --- a/BigBaseV2/src/gui.hpp +++ b/BigBaseV2/src/gui.hpp @@ -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{}; diff --git a/BigBaseV2/src/gui/top_bar.cpp b/BigBaseV2/src/gui/top_bar.cpp new file mode 100644 index 00000000..2c2caedf --- /dev/null +++ b/BigBaseV2/src/gui/top_bar.cpp @@ -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(); + } + } +} \ No newline at end of file