feat(GUI): Move hotkey settings to submenu (#841)
This commit is contained in:
parent
1788bc8bf9
commit
c138aaa974
@ -39,6 +39,7 @@ namespace big
|
||||
CONTEXT_MENU_SETTINGS,
|
||||
ESP_SETTINGS,
|
||||
GUI_SETTINGS,
|
||||
HOTKEY_SETTINGS,
|
||||
REACTION_SETTINGS,
|
||||
PROTECTION_SETTINGS,
|
||||
DEBUG,
|
||||
@ -91,6 +92,7 @@ namespace big
|
||||
{ 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::HOTKEY_SETTINGS, { "Hotkeys", view::hotkey_settings }},
|
||||
{ tabs::REACTION_SETTINGS, { "Reactions", view::reaction_settings}},
|
||||
{ tabs::PROTECTION_SETTINGS, { "Protection", view::protection_settings}},
|
||||
{ tabs::DEBUG, { "Debug", nullptr }},
|
||||
|
46
src/views/settings/view_hotkey_settings.cpp
Normal file
46
src/views/settings/view_hotkey_settings.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
#include "views/view.hpp"
|
||||
#include "widgets/imgui_hotkey.hpp"
|
||||
#include "services/hotkey/hotkey_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::hotkey_settings()
|
||||
{
|
||||
ImGui::PushItemWidth(350.f);
|
||||
|
||||
if (ImGui::Hotkey("Menu Toggle", &g.settings.hotkeys.menu_toggle))
|
||||
g.settings.hotkeys.editing_menu_toggle = true; // make our menu reappear
|
||||
|
||||
if (ImGui::Hotkey("Teleport to waypoint", &g.settings.hotkeys.teleport_waypoint))
|
||||
g_hotkey_service->update_hotkey("waypoint", g.settings.hotkeys.teleport_waypoint);
|
||||
if (ImGui::Hotkey("Teleport to objective", &g.settings.hotkeys.teleport_objective))
|
||||
g_hotkey_service->update_hotkey("objective", g.settings.hotkeys.teleport_objective);
|
||||
|
||||
if (ImGui::Hotkey("Toggle Noclip", &g.settings.hotkeys.noclip))
|
||||
g_hotkey_service->update_hotkey("noclip", g.settings.hotkeys.noclip);
|
||||
if (ImGui::Hotkey("Bring PV", &g.settings.hotkeys.bringvehicle))
|
||||
g_hotkey_service->update_hotkey("bringpv", g.settings.hotkeys.bringvehicle);
|
||||
if (ImGui::Hotkey("Toggle invisibility", &g.settings.hotkeys.invis))
|
||||
g_hotkey_service->update_hotkey("invis", g.settings.hotkeys.invis);
|
||||
if (ImGui::Hotkey("Heal", &g.settings.hotkeys.heal))
|
||||
g_hotkey_service->update_hotkey("heal", g.settings.hotkeys.heal);
|
||||
if (ImGui::Hotkey("Fill Snacks", &g.settings.hotkeys.fill_inventory))
|
||||
g_hotkey_service->update_hotkey("fillsnacks", g.settings.hotkeys.fill_inventory);
|
||||
if (ImGui::Hotkey("Skip Cutscene", &g.settings.hotkeys.skip_cutscene))
|
||||
g_hotkey_service->update_hotkey("skipcutscene", g.settings.hotkeys.skip_cutscene);
|
||||
if (ImGui::Hotkey("Toggle Freecam", &g.settings.hotkeys.freecam))
|
||||
g_hotkey_service->update_hotkey("freecam", g.settings.hotkeys.freecam);
|
||||
if (ImGui::Hotkey("Toggle fastrun", &g.settings.hotkeys.superrun))
|
||||
g_hotkey_service->update_hotkey("fastrun", g.settings.hotkeys.superrun);
|
||||
if (ImGui::Hotkey("Toggle superjump", &g.settings.hotkeys.superjump))
|
||||
g_hotkey_service->update_hotkey("superjump", g.settings.hotkeys.superjump);
|
||||
if (ImGui::Hotkey("Toggle beastjump", &g.settings.hotkeys.beastjump))
|
||||
g_hotkey_service->update_hotkey("beastjump", g.settings.hotkeys.beastjump);
|
||||
if (ImGui::Hotkey("Toggle Vehicle Invisibility", &g.settings.hotkeys.invisveh))
|
||||
g_hotkey_service->update_hotkey("invisveh", g.settings.hotkeys.invisveh);
|
||||
if (ImGui::Hotkey("Toggle Local Veh Invisibility", &g.settings.hotkeys.localinvisveh))
|
||||
g_hotkey_service->update_hotkey("localinvisveh", g.settings.hotkeys.localinvisveh);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
}
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
#include "views/view.hpp"
|
||||
#include "widgets/imgui_hotkey.hpp"
|
||||
#include "script_mgr.hpp"
|
||||
#include "services/hotkey/hotkey_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -29,46 +27,6 @@ namespace big
|
||||
components::sub_title("Misc");
|
||||
ImGui::Checkbox("Enable Dev DLC", &g.settings.dev_dlc);
|
||||
|
||||
ImGui::Separator();
|
||||
components::sub_title("Hotkeys");
|
||||
|
||||
ImGui::PushItemWidth(350.f);
|
||||
|
||||
if (ImGui::Hotkey("Menu Toggle", &g.settings.hotkeys.menu_toggle))
|
||||
g.settings.hotkeys.editing_menu_toggle = true; // make our menu reappear
|
||||
|
||||
if (ImGui::Hotkey("Teleport to waypoint", &g.settings.hotkeys.teleport_waypoint))
|
||||
g_hotkey_service->update_hotkey("waypoint", g.settings.hotkeys.teleport_waypoint);
|
||||
if (ImGui::Hotkey("Teleport to objective", &g.settings.hotkeys.teleport_objective))
|
||||
g_hotkey_service->update_hotkey("objective", g.settings.hotkeys.teleport_objective);
|
||||
|
||||
if (ImGui::Hotkey("Toggle Noclip", &g.settings.hotkeys.noclip))
|
||||
g_hotkey_service->update_hotkey("noclip", g.settings.hotkeys.noclip);
|
||||
if (ImGui::Hotkey("Bring PV", &g.settings.hotkeys.bringvehicle))
|
||||
g_hotkey_service->update_hotkey("bringpv", g.settings.hotkeys.bringvehicle);
|
||||
if (ImGui::Hotkey("Toggle invisibility", &g.settings.hotkeys.invis))
|
||||
g_hotkey_service->update_hotkey("invis", g.settings.hotkeys.invis);
|
||||
if (ImGui::Hotkey("Heal", &g.settings.hotkeys.heal))
|
||||
g_hotkey_service->update_hotkey("heal", g.settings.hotkeys.heal);
|
||||
if (ImGui::Hotkey("Fill Snacks", &g.settings.hotkeys.fill_inventory))
|
||||
g_hotkey_service->update_hotkey("fillsnacks", g.settings.hotkeys.fill_inventory);
|
||||
if (ImGui::Hotkey("Skip Cutscene", &g.settings.hotkeys.skip_cutscene))
|
||||
g_hotkey_service->update_hotkey("skipcutscene", g.settings.hotkeys.skip_cutscene);
|
||||
if (ImGui::Hotkey("Toggle Freecam", &g.settings.hotkeys.freecam))
|
||||
g_hotkey_service->update_hotkey("freecam", g.settings.hotkeys.freecam);
|
||||
if (ImGui::Hotkey("Toggle fastrun", &g.settings.hotkeys.superrun))
|
||||
g_hotkey_service->update_hotkey("fastrun", g.settings.hotkeys.superrun);
|
||||
if (ImGui::Hotkey("Toggle superjump", &g.settings.hotkeys.superjump))
|
||||
g_hotkey_service->update_hotkey("superjump", g.settings.hotkeys.superjump);
|
||||
if (ImGui::Hotkey("Toggle beastjump", &g.settings.hotkeys.beastjump))
|
||||
g_hotkey_service->update_hotkey("beastjump", g.settings.hotkeys.beastjump);
|
||||
if (ImGui::Hotkey("Toggle Vehicle Invisibility", &g.settings.hotkeys.invisveh))
|
||||
g_hotkey_service->update_hotkey("invisveh", g.settings.hotkeys.invisveh);
|
||||
if (ImGui::Hotkey("Toggle Local Veh Invisibility", &g.settings.hotkeys.localinvisveh))
|
||||
g_hotkey_service->update_hotkey("localinvisveh", g.settings.hotkeys.localinvisveh);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Button("Manage scripts"))
|
||||
|
@ -17,6 +17,7 @@ namespace big
|
||||
static void esp_settings();
|
||||
static void context_menu_settings();
|
||||
static void gui_settings();
|
||||
static void hotkey_settings();
|
||||
static void handling_current_profile();
|
||||
static void handling_saved_profiles();
|
||||
static void reaction_settings();
|
||||
|
Reference in New Issue
Block a user