Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
debug_menu_rebuild.hpp
Go to the documentation of this file.
1 #include "../console.h"
2 
7 
9 {
17  {
18  public:
20  {
21  name = "debug_menu_rebuild";
22  description = "Reloads debug_menu_init.xml and rebuilds the debug menu contents";
23  aliases = { "regenerate_debug_menu", "regendebugmenu", "reloadmenu", "rdm" };
24 
26  }
27 
28  BlamResult Execute(std::vector<std::string> arguments)
29  {
31 
33 
34  if (debug_menu)
35  {
36  debug_menu->SetHidden(true);
37  debug_menu->LoadMenuRootPage();
38  Blam::Logger::LogEventForce("debug menu reloaded, please re-open the menu", WSV_NONE);
39  }
40  else
41  {
42  Blam::Logger::LogEventForce("failed to locate debug menu item from ui root, could not regenerate menu", WSV_ERROR);
43  }
44 
45  return BlamResult::Success_OK;
46  }
47  };
48 }
ui.h
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.
BlamConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:34
logger.h
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:31
Blam::UI::GetDebugMenuWidget
BLAM BlamUIWidget_DebugMenu * GetDebugMenuWidget()
Retrieves the built-in debug menu widget.
Definition: ui.cpp:295
debug_menu.h
BlamUIWidget_DebugMenu::LoadMenuRootPage
void LoadMenuRootPage()
Loads the default menu root page.
Definition: debug_menu.cpp:389
Blam::Resources::Console::RegenDebugMenuCommand
Class for the debug_menu_rebuild command.
Definition: debug_menu_rebuild.hpp:16
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:33
Blam::Resources::Console::RegenDebugMenuCommand::Execute
BlamResult Execute(std::vector< std::string > arguments)
Called upon command execution.
Definition: debug_menu_rebuild.hpp:28
Blam::Resources::DebugMenu::ReloadDebugMenu
BLAM void ReloadDebugMenu()
Clears all existing data for the debug menu and reloads it from the file.
Definition: debug_menu.cpp:405
debug_menu.h
BlamUIWidget_DebugMenu
Class used for the Debug Menu UI.
Definition: debug_menu.h:119
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:38
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:262
Blam::Resources::Console::RegenDebugMenuCommand::RegenDebugMenuCommand
RegenDebugMenuCommand()
Definition: debug_menu_rebuild.hpp:19
BlamUIWidget_DebugMenu::SetHidden
void SetHidden(bool new_hidden) override
Sets the hidden state of the widget.
Definition: debug_menu.cpp:532
BlamConsoleCommand::aliases
std::vector< std::string > aliases
A list of aliases for the command. Executing any of these instead of the command name will behave the...
Definition: console.h:36
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5