Blamite Game Engine - blam!
00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
menubar.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
5
#include "
components/resources/engine_globals/globals.h
"
6
7
#ifndef BLAM
8
#define BLAM
9
#endif
10
11
#define MENUBAR_FILE "menu_bar_init.xml"
12
13
18
enum class
BlamMenubarItemType
19
{
20
Menu
,
21
MenuItem
,
22
Label
,
23
Separator
,
24
Undefined
25
};
26
33
enum class
BlamMenubarItemVariableType
34
{
35
Unimplemented
,
36
Command
,
37
Global
,
38
UndefinedVariable
39
};
40
44
struct
BlamMenubarItem
45
{
46
BlamMenubarItemType
type
;
47
BlamMenubarItemVariableType
var_type
;
48
49
std::string
name
;
50
std::string
variable
;
51
std::string
shortcut
;
52
bool
has_shortcut
;
53
bool
enabled
;
54
55
BlamColor
color
;
56
bool
override_color
;
57
58
std::vector<BlamMenubarItem>
items
;
59
60
BlamMenubarItem
()
61
{
62
type
=
BlamMenubarItemType::Undefined
;
63
var_type
=
BlamMenubarItemVariableType::UndefinedVariable
;
64
65
name
=
"default"
;
66
variable
=
""
;
67
shortcut
=
""
;
68
has_shortcut
=
false
;
69
enabled
=
true
;
70
71
color
= BlamColor(255, 255, 255, 255);
72
override_color
=
false
;
73
}
74
};
75
79
struct
BlamMenubar
80
{
81
std::vector<BlamMenubarItem>
items
;
82
int
version
= -1;
83
};
84
91
namespace
Blam::Settings::Menubar
92
{
93
BLAM
void
LoadMenubarLayout
();
94
95
BLAM
BlamMenubar
GetMenuBar
();
96
}
BlamMenubarItem
Structure representing a menu bar item.
Definition:
menubar.h:44
Blam::Settings::Menubar::LoadMenubarLayout
BLAM void LoadMenubarLayout()
Definition:
menubar.cpp:224
Blam::Settings::Menubar::GetMenuBar
BLAM BlamMenubar GetMenuBar()
Definition:
menubar.cpp:282
BlamMenubarItem::override_color
bool override_color
Whether or not the label has a custom color set.
Definition:
menubar.h:56
BlamMenubarItem::variable
std::string variable
The item variable. Will either be the command to run upon clicking, or the label text.
Definition:
menubar.h:50
BlamMenubarItem::color
BlamColor color
The color of the label.
Definition:
menubar.h:55
BlamMenubar
Structure representing the menu bar.
Definition:
menubar.h:79
BLAM
#define BLAM
Definition:
menubar.h:8
BlamMenubar::version
int version
The menu file version.
Definition:
menubar.h:82
BlamMenubarItemType::Separator
@ Separator
A separator item.
BlamMenubarItemType::Menu
@ Menu
A submenu within the menu.
BlamMenubarItem::enabled
bool enabled
Whether or not this menu item is enabled and can be clicked.
Definition:
menubar.h:53
BlamCommandType::Global
@ Global
A command that is used to modify a global.
globals.h
BlamMenubarItemType::Label
@ Label
A non-clickable text label.
BlamMenubarItem::type
BlamMenubarItemType type
The type of this menu item.
Definition:
menubar.h:46
BlamMenubarItemVariableType::Unimplemented
@ Unimplemented
Indicates the menu item is a placeholder item intended for future use.
BlamShaderUniformType::Undefined
@ Undefined
BlamMenubarItem::shortcut
std::string shortcut
The menu item shortcut label. Cosmetic only.
Definition:
menubar.h:51
BlamMenubarItem::items
std::vector< BlamMenubarItem > items
List of all child items in this submenu.
Definition:
menubar.h:58
BlamMenubarItem::var_type
BlamMenubarItemVariableType var_type
The type of variable the menu item uses.
Definition:
menubar.h:47
BlamMenubarItemType::MenuItem
@ MenuItem
A standard menu item.
Blam::Settings::Menubar
Namespace for things related to the imgui menu bar.
Definition:
menubar.h:91
BlamMenubarItem::has_shortcut
bool has_shortcut
Whether or not this item has a shortcut label.
Definition:
menubar.h:52
BlamMenubar::items
std::vector< BlamMenubarItem > items
List of all items in this menu.
Definition:
menubar.h:81
BlamMenubarItem::name
std::string name
The item name.
Definition:
menubar.h:49
BlamDebugMenuItemType::Command
@ Command
Runs a console command upon activation.
BlamMenubarItemType
BlamMenubarItemType
Enumerator containing all possible types of menu bar items.
Definition:
menubar.h:18
BlamMenubarItemVariableType
BlamMenubarItemVariableType
Enumerator containing all possible types of menu bar item variables.
Definition:
menubar.h:33
BlamMenubarItemVariableType::UndefinedVariable
@ UndefinedVariable
Fallback item type in the event no valid type is found.
BlamMenubarItemType::Undefined
@ Undefined
Fallback item type in the event no valid type is found.
BlamMenubarItem::BlamMenubarItem
BlamMenubarItem()
Definition:
menubar.h:60
blam
components
settings
menubar
menubar.h
Generated on Tue Jan 12 2021 01:11:27 for Blamite Game Engine - blam! by
1.8.17