Elaztek Developer Hub
Switch Project...
blam!
Editing Kit
Guerilla
Sapien
Tool
Foundry
Libraries
Keystone
Strings
Forums
Discord
Doxygen
Jenkins
Guides
Gitlab
Blamite Game Engine - blam!
00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
debug_menu.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
#include <vector>
5
6
#define MENU_ITEM_TYPE_UNKNOWN BlamDebugMenuItemType::Unknown
7
#define MENU_ITEM_TYPE_EXEC BlamDebugMenuItemType::Command
8
#define MENU_ITEM_TYPE_CATEGORY BlamDebugMenuItemType::Submenu
9
#define MENU_ITEM_TYPE_GLOBAL BlamDebugMenuItemType::Global
10
#define MENU_ITEM_TYPE_MULTIEXEC BlamDebugMenuItemType::CommandSequence
11
12
#define DEBUG_MENU_FILE "debug_menu_init"
13
14
#ifndef BLAM
15
#define BLAM
16
#endif
17
18
namespace
InternalUI
19
{
20
BLAM
void
CreateFPSCounter
();
21
BLAM
void
UpdateFPSCounter
();
22
}
23
27
enum class
BlamDebugMenuItemType
28
{
29
Command
,
30
38
CommandSequence
,
39
Global
,
40
Submenu
,
41
Unknown
42
};
43
49
class
BlamDebugMenuItem
50
{
51
public
:
52
BlamDebugMenuItemType
item_type
;
53
std::string
title
;
54
55
// Properties specific to #BlamDebugMenuItemType::Command
56
57
std::string
exec_line
=
""
;
58
59
// Properties specific to #BlamDebugMenuItemType::CommandSequence
60
61
std::vector<std::string>
exec_sequence
= std::vector<std::string>();
62
int
current_exec_index
= 0;
63
64
// Properties specific to #BlamDebugMenuItemType::Global
65
66
std::string
global_id
=
""
;
67
bool
use_bounds
=
false
;
68
double
inc
= 1;
69
double
min
= 0;
70
double
max
= 0;
71
72
// Properties specific to #BlamDebugMenuItemType::Submenu
73
std::vector<BlamDebugMenuItem>
items
;
74
78
BlamDebugMenuItem
();
79
83
void
HandleKeyEnter
();
84
88
void
HandleKeyLeft
();
89
93
void
HandleKeyRight
();
94
};
95
99
struct
BlamDebugMenu
100
{
101
std::string
title
;
102
std::vector<BlamDebugMenuItem>
items
;
103
};
104
108
namespace
Blam::Resources::DebugMenu
109
{
124
BLAM
void
InitializeDebugMenu
();
125
129
BLAM
void
ReleaseDebugMenu
();
130
134
BLAM
void
ReloadDebugMenu
();
135
141
BLAM
BlamDebugMenu
*
GetDebugMenu
();
142
}
BlamDebugMenuItem::title
std::string title
The title of the debug menu item as shown in the menu.
Definition:
debug_menu.h:53
BlamDebugMenuItem::exec_line
std::string exec_line
The command to run upon activation for an Executor menu item type.
Definition:
debug_menu.h:57
BlamDebugMenuItem::inc
double inc
How much to add or remove from the value at a time upon activation.
Definition:
debug_menu.h:68
BlamDebugMenuItem::exec_sequence
std::vector< std::string > exec_sequence
The command sequence to run upon activation for an ExecSequence menu item type.
Definition:
debug_menu.h:61
Blam::Resources::DebugMenu::GetDebugMenu
BLAM BlamDebugMenu * GetDebugMenu()
Retrieves the debug menu data.
Definition:
debug_menu.cpp:411
BlamDebugMenuItem::BlamDebugMenuItem
BlamDebugMenuItem()
Creates a new debug menu item.
Definition:
BlamDebugMenuItem.cpp:6
BlamDebugMenuItem::current_exec_index
int current_exec_index
The index of the next item to run within the execution sequence.
Definition:
debug_menu.h:62
BlamDebugMenuItem::HandleKeyLeft
void HandleKeyLeft()
Called when the menu item is active and the left arrow key is pressed.
Definition:
BlamDebugMenuItem.cpp:41
BlamDebugMenuItemType::Submenu
@ Submenu
Enters into a submenu/subscreen upon activation.
BlamDebugMenuItem::items
std::vector< BlamDebugMenuItem > items
The contents of the submenu to show upon activation.
Definition:
debug_menu.h:73
BlamCommandType::Global
@ Global
A command that is used to modify a global.
Blam::Resources::DebugMenu::InitializeDebugMenu
BLAM void InitializeDebugMenu()
Initializes the debug menu.
Definition:
debug_menu.cpp:309
Blam::Resources::DebugMenu
Namespace containing data for the engine's debug menu.
Definition:
debug_menu.h:108
BlamDebugMenuItemType
BlamDebugMenuItemType
Menu item type enumerator.
Definition:
debug_menu.h:27
InternalUI::CreateFPSCounter
BLAM void CreateFPSCounter()
BlamDebugMenuItem::HandleKeyRight
void HandleKeyRight()
Called when the menu item is active and the right arrow key is pressed.
Definition:
BlamDebugMenuItem.cpp:168
BlamDebugMenuItem::item_type
BlamDebugMenuItemType item_type
The type of menu item. See BlamDebugMenuItemType for details.
Definition:
debug_menu.h:52
BlamDebugMenuItem
Class used to store data and functions relating to an item within the engine's debug menu.
Definition:
debug_menu.h:49
BlamDebugMenu::items
std::vector< BlamDebugMenuItem > items
The list of items within the debug menu.
Definition:
debug_menu.h:102
BlamDebugMenuItem::global_id
std::string global_id
The ID of the engine global to modify upon activation.
Definition:
debug_menu.h:66
BlamDebugMenuItemType::Unknown
@ Unknown
Fallback in the event that debug_menu_init contained an invalid option.
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
Blam::Resources::DebugMenu::ReleaseDebugMenu
BLAM void ReleaseDebugMenu()
Releases all debug menu contents.
Definition:
debug_menu.cpp:393
BlamDebugMenuItem::HandleKeyEnter
void HandleKeyEnter()
Called when the menu item is active and the enter key is pressed.
Definition:
BlamDebugMenuItem.cpp:11
BlamDebugMenuItem::max
double max
The maximum value specified in debug_menu_init.
Definition:
debug_menu.h:70
BlamDebugMenuItem::use_bounds
bool use_bounds
Whether or not arbitrary bounds are specified in debug_menu_init.
Definition:
debug_menu.h:67
BlamDebugMenu::title
std::string title
The title of the main page of the debug menu. Defaults to Main.
Definition:
debug_menu.h:101
InternalUI
Namespace containing things for the engine's "internal UI", which is powered through ImGUI.
Definition:
debug_menu.h:18
BLAM
#define BLAM
Definition:
debug_menu.h:15
BlamDebugMenuItemType::CommandSequence
@ CommandSequence
Runs a sequence of console commands upon activation.
BlamDebugMenuItemType::Command
@ Command
Runs a console command upon activation.
BlamDebugMenu
Structure containing data for the root of the debug menu.
Definition:
debug_menu.h:99
InternalUI::UpdateFPSCounter
BLAM void UpdateFPSCounter()
BlamDebugMenuItem::min
double min
The minimum value specified in debug_menu_init.
Definition:
debug_menu.h:69
blam
components
resources
debug_menu
debug_menu.h
Generated on Sat Dec 11 2021 06:13:40 for Blamite Game Engine - blam! by
1.8.17