feat(CTX MENU): Added ctx menu toggle (#265)
This commit is contained in:
parent
8f545c4856
commit
4e091eb851
@ -261,6 +261,11 @@ namespace big
|
||||
bool switched_view = true;
|
||||
};
|
||||
|
||||
struct context_menu
|
||||
{
|
||||
bool enabled = true;
|
||||
};
|
||||
|
||||
struct esp
|
||||
{
|
||||
bool enabled = true;
|
||||
@ -304,6 +309,7 @@ namespace big
|
||||
vehicle vehicle{};
|
||||
weapons weapons{};
|
||||
window window{};
|
||||
context_menu context_menu{};
|
||||
esp esp{};
|
||||
|
||||
menu_settings(file save_file)
|
||||
@ -517,6 +523,8 @@ namespace big
|
||||
this->window.main = j["window"]["main"];
|
||||
this->window.users = j["window"]["users"];
|
||||
|
||||
this->context_menu.enabled = j["context_menu"]["enabled"];
|
||||
|
||||
this->esp.enabled = j["esp"]["enabled"];
|
||||
this->esp.hide_self = j["esp"]["hide_self"];
|
||||
this->esp.enemy_color = j["esp"]["enemy_color"];
|
||||
@ -768,6 +776,11 @@ namespace big
|
||||
{ "users", this->window.users }
|
||||
}
|
||||
},
|
||||
{
|
||||
"context_menu", {
|
||||
{"enabled", this->context_menu.enabled}
|
||||
}
|
||||
},
|
||||
{
|
||||
"esp", {
|
||||
{ "enabled", this->esp.enabled },
|
||||
|
@ -142,6 +142,13 @@ namespace big
|
||||
{
|
||||
while (g_running)
|
||||
{
|
||||
if (!g->context_menu.enabled) {
|
||||
g_context_menu_service->enabled = false;
|
||||
|
||||
script::get_current()->yield();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (PAD::IS_DISABLED_CONTROL_JUST_RELEASED(0, (int)ControllerInputs::INPUT_VEH_DUCK))
|
||||
{
|
||||
g_context_menu_service->enabled = !g_context_menu_service->enabled;
|
||||
@ -179,7 +186,7 @@ namespace big
|
||||
PAD::IS_DISABLED_CONTROL_JUST_PRESSED(0, (int)ControllerInputs::INPUT_SPECIAL_ABILITY))
|
||||
{
|
||||
if (!g_context_menu_service->m_pointer)
|
||||
return;
|
||||
continue;
|
||||
cm->options.at(cm->current_option).command();
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ namespace big
|
||||
{
|
||||
enum class tabs {
|
||||
ESP_SETTINGS,
|
||||
CONTEXT_MENU_SETTINGS,
|
||||
GUI_SETTINGS,
|
||||
HANDLING_SEARCH,
|
||||
HANDLING_SAVED_PROFILE,
|
||||
@ -60,6 +61,7 @@ namespace big
|
||||
{ tabs::SESSION, { "Session", view::session }},
|
||||
}}},
|
||||
{tabs::SETTINGS, { "Settings", view::settings, {
|
||||
{ tabs::CONTEXT_MENU_SETTINGS, { "Context Menu", view::context_menu_settings}},
|
||||
{ tabs::ESP_SETTINGS, { "ESP", view::esp_settings}},
|
||||
{ tabs::GUI_SETTINGS, { "GUI", view::gui_settings}},
|
||||
{ tabs::NOTIFICATION_SETTINGS, { "Notifications", view::notification_settings}},
|
||||
|
@ -0,0 +1,9 @@
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::context_menu_settings()
|
||||
{
|
||||
ImGui::Checkbox("Context Menu Enabled", &g->context_menu.enabled);
|
||||
}
|
||||
}
|
@ -20,6 +20,7 @@ namespace big
|
||||
static void active_view();
|
||||
static void debug();
|
||||
static void esp_settings();
|
||||
static void context_menu_settings();
|
||||
static void gui_settings();
|
||||
static void handling_current_profile();
|
||||
static void handling_my_profiles();
|
||||
|
Reference in New Issue
Block a user