Blamite Game Engine - blam!
00285.12.18.20.1411.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
BlamMenubarItemType
19
{
20
Menu
,
21
MenuItem
,
22
Label
,
23
Separator
,
24
Undefined
25
};
26
33
enum
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:223
Blam::Settings::Menubar::GetMenuBar
BLAM BlamMenubar GetMenuBar()
Definition:
menubar.cpp:274
Unimplemented
@ Unimplemented
Indicates the menu item is a placeholder item intended for future use.
Definition:
menubar.h:35
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
Command
@ Command
Indicates the menu item will execute a command upon being clicked.
Definition:
menubar.h:36
BlamMenubarItem::color
BlamColor color
The color of the label.
Definition:
menubar.h:55
MenuItem
@ MenuItem
A standard menu item.
Definition:
menubar.h:21
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
Label
@ Label
A non-clickable text label.
Definition:
menubar.h:22
BlamMenubarItem::enabled
bool enabled
Whether or not this menu item is enabled and can be clicked.
Definition:
menubar.h:53
globals.h
UndefinedVariable
@ UndefinedVariable
Fallback item type in the event no valid type is found.
Definition:
menubar.h:38
BlamMenubarItem::type
BlamMenubarItemType type
The type of this menu item.
Definition:
menubar.h:46
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
Separator
@ Separator
A separator item.
Definition:
menubar.h:23
Undefined
@ Undefined
Fallback item type in the event no valid type is found.
Definition:
menubar.h:24
BlamMenubarItem::var_type
BlamMenubarItemVariableType var_type
The type of variable the menu item uses.
Definition:
menubar.h:47
Menu
@ Menu
A submenu within the menu.
Definition:
menubar.h:20
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
Global
@ Global
Indicates the menu item will modify an engine global.
Definition:
menubar.h:37
BlamMenubarItemType
BlamMenubarItemType
Enumerator containing all possible types of menu bar items.
Definition:
menubar.h:18
BlamColor
Structure representing a color.
Definition:
globals.h:20
BlamMenubarItemVariableType
BlamMenubarItemVariableType
Enumerator containing all possible types of menu bar item variables.
Definition:
menubar.h:33
BlamMenubarItem::BlamMenubarItem
BlamMenubarItem()
Definition:
menubar.h:60
blam
components
settings
menubar
menubar.h
Generated on Fri Dec 18 2020 14:28:20 for Blamite Game Engine - blam! by
1.8.17