 |
Blamite Game Engine - blam!
00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
6 #define DEBUG_MENU_FILE "debug_menu_init"
103 std::vector<std::string>
commands = std::vector<std::string>();
164 std::vector<BlamDebugMenuItem*>
items = std::vector<BlamDebugMenuItem*>();
176 std::vector<BlamDebugMenuItem*>
items = std::vector<BlamDebugMenuItem*>();
@ SDLK_BACKSPACE
Definition: SdlEmulationLayer.h:387
std::map< std::string, BlamConsoleCommand * > command_list
The list of all loaded console commands.
Definition: console.cpp:51
@ DebugMenu
Special widget. Used for the in-game debug menu.
Class for the version command.
Definition: version.hpp:18
BLAM void UnregisterCommand(std::string name)
Unregisters the console command with the specified name.
Definition: console.cpp:227
BLAM void RegisterBuiltinCommands()
Registers all hard-coded engine commands.
Definition: console.cpp:365
Class for the history command.
Definition: history.hpp:13
BlamColor GetColor()
Returns the evaluated color data.
Definition: ColorTransition.h:170
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
@ DataRoot
The root of all game engine data. Defaults to ./
Class for the nou command.
Definition: nou.hpp:13
@ String
Represents a std::string.
Definition: globals.h:29
@ SDLK_HOME
Definition: SdlEmulationLayer.h:477
Class for the screenshot command.
Definition: screenshot.hpp:13
BlamDebugMenuItem_Command()
Definition: BlamDebugMenuItem_Command.cpp:6
BLAM BlamGlobalUpdateResult UpdateGlobal(std::string name, std::string new_value)
Updates the value of a String global.
Definition: globals.cpp:574
Class for the win32_dialog_test command.
Definition: win32_dialog_test.hpp:14
Class representing a command debug menu item.
Definition: debug_menu.h:78
@ Unknown
Indicates the font package has an unknown type. Should generally be considered an error.
void Initialize(BlamColor _c1, BlamColor _c2, float fade_duration, bool _loop)
Prepares data needed for the animation.
Definition: ColorTransition.h:132
@ InvalidArgs
The provided arguments were invalid.
std::string name
The name of the global.
Definition: globals.h:47
Class used to represent a console command.
Definition: console.h:33
Class for the cls command.
Definition: cls.hpp:16
BLAM float * GetGlobalAsFloat(std::string name)
Retrieves a global's value as a float.
Definition: globals.cpp:403
Class for the listener_bug_check command.
Definition: listener_bug_check.hpp:17
void SetHidden(bool new_hidden) override
Sets the hidden state of the widget.
Definition: text.cpp:452
BlamDebugMenuItem_CommandSequence()
Definition: BlamDebugMenuItem_CommandSequence.cpp:6
@ SDLK_UP
Definition: SdlEmulationLayer.h:485
Class for the crash command.
Definition: crash.hpp:14
@ OutOfBounds
The provided value was too small or too large for the globals' data type.
#define USER_DATA_PATH(path)
Macro to quickly access a user data folder.
Definition: config.h:41
Class for the h2print command.
Definition: h2print.hpp:14
Class for the show_stats command.
Definition: show_stats.hpp:16
@ InvalidType
The provided value was of an invalid type.
BLAM BlamConsoleCommand * GetCommand(std::string name)
Retrieves a command with the specified name.
Definition: console.cpp:237
Class for the classify command.
Definition: classify.hpp:13
Class for the debug_menu_how_to command.
Definition: debug_menu_how_to.hpp:15
Class for the h2help command.
Definition: h2help.hpp:18
BlamGlobalUpdateResult
Enumerator for the result of a global update attempt.
Definition: globals.h:9
Class for the toggle_imgui_window command.
Definition: toggle_imgui_window.hpp:12
virtual BlamResult Execute(std::vector< std::string > arguments)
Called upon command execution.
Definition: console.h:49
@ SDLK_RETURN
Definition: SdlEmulationLayer.h:385
Class for the quit command.
Definition: quit.hpp:13
BlamGlobalType type
The type of the global.
Definition: globals.h:46
IMGUI_API bool CollapsingHeader(const char *label, ImGuiTreeNodeFlags flags=0)
Definition: imgui_widgets.cpp:5422
Class for the tag_load_force command.
Definition: tag_load_force.hpp:17
Class for the drop command.
Definition: drop.hpp:17
BLAM void RunInitCommands()
Attempts to read init.txt and runs any commands added to it.
Definition: console.cpp:406
void Draw() override
Draws the widget on-screen.
Definition: text.cpp:52
@ TopLeft
The widget will be placed at the top-left of the screen.
int current_exec_index
The index of the next item to run within the command sequence.
Definition: debug_menu.h:104
@ GlobalIsProtected
The specified global is protected and cannot be modified during runtime.
#define ENGINE_CFG
Macro to allow quicker access to the main configuration file.
Definition: config.h:20
BlamColor color
The text foreground color.
Definition: ui.h:524
@ SDLK_PAGEUP
Definition: SdlEmulationLayer.h:478
Class for the log command.
Definition: log.hpp:13
@ DebugMenuItem
Special widget. Represents an item within the debug menu.
@ SDLK_RIGHT
Definition: SdlEmulationLayer.h:482
void Activate() override
Called when the menu item is active and the enter key is pressed.
Definition: BlamDebugMenuItem_CommandSequence.cpp:12
#define ENGINE_DATA_PATH(path)
Macro to quickly access a game engine data folder.
Definition: config.h:34
Class for the explore command.
Definition: explore.hpp:18
Class for the abort command.
Definition: abort.hpp:12
Class for the tag_field_sizes command.
Definition: tag_field_sizes.hpp:15
Class for the debug_menu_rebuild command.
Definition: debug_menu_rebuild.hpp:16
Class for the generate_plugins command.
Definition: generate_plugins.hpp:14
void console_update_global(std::string global_name, std::vector< std::string > arguments)
Function to handle updating an engine global from the console.
Definition: console.cpp:179
Structure containing data for a game engine global.
Definition: globals.h:44
BLAM std::string ParseFolderPlaceholders(std::string string)
Parses any engine/user data folder placeholders within a string.
Definition: paths.cpp:388
std::string name
The name of the console command.
Definition: console.h:35
Class for the map_name command.
Definition: map_name.hpp:18
Class for the list_colors command.
Definition: list_colors.hpp:15
@ DefaultConfigs
Directory containing default configuration files. Defaults to ./content/blam/default_configs/
BLAM std::map< std::string, BlamConsoleCommand * > GetCommandList()
Retrieves the list of all loaded console commands.
Definition: console.cpp:232
BLAM std::string GetGlobalTypeLabel(BlamGlobalType type)
Retrieves a string representation of a global's type, for use in UI.
Definition: globals.cpp:40
BLAM BlamEngineGlobal * GetGlobal(std::string name)
Retrieves a global with the specified ID.
Definition: globals.cpp:189
@ SDLK_LEFT
Definition: SdlEmulationLayer.h:483
BLAM BlamResult RunCommandLine(std::string command_line)
Executed the provided string as a console command.
Definition: console.cpp:264
Class representing a command debug menu item.
Definition: debug_menu.h:100
@ SDLK_DOWN
Definition: SdlEmulationLayer.h:484
Class for the script_doc command.
Definition: script_doc.hpp:14
std::vector< std::string > commands
The command sequence to run upon activation.
Definition: debug_menu.h:103
A command to test Sentry functionality.
Definition: sentry_test.hpp:12
Class for the list_levels command.
Definition: list_levels.hpp:17
Class for the print command.
Definition: print.hpp:18
std::string text
The text to display within this text widget.
Definition: ui.h:528
@ UnknownGlobal
The specified global does not exist.
@ SDLK_TAB
Definition: SdlEmulationLayer.h:388
void Start()
Instructs the listener to start animating.
Definition: ColorTransition.h:156
#define ENGINE_TEXT(string_id)
Definition: engine_text.h:7
std::string command
The command to run upon activation.
Definition: debug_menu.h:81
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:262
@ Ok
The global was updated successfully.
Class for the screenres command.
Definition: resolution.hpp:15
BlamWidgetType
Enumerator listing possible UI widget types.
Definition: ui.h:60
@ DataRoot
The root of all user data. Defaults to BlamStrings::Utils::IO::GetEngineDataRoot().
void display_global_update_message(BlamGlobalUpdateResult error_code, BlamEngineGlobal *global)
Displays an error message to inform the user why a global variable failed to update.
Definition: console.cpp:103
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:38
Class for the cls command.
Definition: reload_material_datablocks.hpp:17
Class for the init_world_state command.
Definition: init_world_state.hpp:14
void DisplayCommandError(BlamResult error_code, BlamConsoleCommand *command)
Displays an error message to inform the user why a command failed to run.
Definition: console.cpp:59
BLAM BlamGlobalUpdateResult UpdateGlobalWrap(std::string name, std::string new_value)
Updates a global's raw value.
Definition: globals.cpp:431
Class for the create_cmd_obj command.
Definition: create_cmd_obj.hpp:17
Class for the open_web_url command.
Definition: open_web_url.hpp:15
Namespace for things relating to the debug console.
Definition: abort.hpp:5
BLAM void Cleanup()
Cleans up all console command data.
Definition: console.cpp:355
std::string value_raw
The raw value of the global as a string.
Definition: globals.h:49
Class for the help command.
Definition: help.hpp:16
Class representing a Text widget.
Definition: ui.h:485
Class for the set_project_root command.
Definition: set_project_root.hpp:17
void Activate() override
Called when the menu item is active and the enter key is pressed.
Definition: BlamDebugMenuItem_Command.cpp:11
Class for the open_game_dir command.
Definition: open_game_dir.hpp:13
BLAM std::string RegisterCommand(BlamConsoleCommand *command)
Register a new command object.
Definition: console.cpp:220