Tramway SDK
painis
tram-sdk
src
extensions
menu
debug.h
Go to the documentation of this file.
1
// TRAMWAY DRIFT AND DUNGEON EXPLORATION SIMULATOR 2022
2
// All rights reserved.
3
4
#ifndef TRAM_SDK_EXTENSIONS_MENU_DEBUG_H
5
#define TRAM_SDK_EXTENSIONS_MENU_DEBUG_H
6
7
#include <
extensions/menu/menu.h
>
8
9
#include <functional>
10
11
namespace
tram
{
12
class
WorldCell;
13
}
14
15
namespace
tram::Ext::Menu
{
16
17
void
InitCallbacks
();
18
void
UpdateCallbacks
();
19
20
class
InterceptMenu;
21
class
StatisticsMenu;
22
23
class
DebugMenu
:
public
Menu
{
24
public
:
25
void
Display
();
26
uint32_t
Layer
() {
return
0; }
27
~DebugMenu
() =
default
;
28
protected
:
29
static
bool
intercept_enabled
;
30
static
bool
statistics_enabled
;
31
static
InterceptMenu
*
intercept_menu
;
32
static
StatisticsMenu
*
statistics_menu
;
33
};
34
35
class
EntityProperties
:
public
Menu
{
36
public
:
37
void
SetPicked
(
id_t
entity
);
38
uint32_t
Layer
() {
return
1; }
39
void
Display
();
40
~EntityProperties
() =
default
;
41
protected
:
42
id_t
entity
= 0;
43
};
44
45
class
EntityPicker
:
public
Menu
{
46
public
:
47
EntityPicker
(std::function<
void
(
id_t
)>
callback
);
48
uint32_t
Layer
() {
return
1; }
49
void
Display
();
50
~EntityPicker
() =
default
;
51
protected
:
52
std::function<void(
id_t
)>
callback
;
53
};
54
55
class
ListSelection
:
public
Menu
{
56
public
:
57
ListSelection
(std::function<
void
(uint32_t)>
callback
, std::vector<std::string>
list
);
58
uint32_t
Layer
() {
return
2; }
59
void
Display
();
60
~ListSelection
() =
default
;
61
protected
:
62
std::function<void(uint32_t)>
callback
;
63
std::vector<std::string>
list
;
64
};
65
66
class
MessageSend
:
public
Menu
{
67
public
:
68
void
SetEntity
(
id_t
entity);
69
void
SetMessageType
(uint32_t type);
70
uint32_t
Layer
() {
return
1; }
71
void
Display
();
72
~MessageSend
() =
default
;
73
protected
:
74
uint32_t
parameter_type
= 0;
75
id_t
entity_id
= 0;
76
uint32_t
message_type
= 0;
77
char
parameter_string
[32] =
""
;
78
};
79
80
class
InterceptMenu
:
public
Menu
{
81
public
:
82
void
Display
();
83
uint32_t
Layer
() {
return
0; }
84
inline
void
SetOffset
(uint32_t
offset
) { this->offset =
offset
; }
85
~InterceptMenu
() =
default
;
86
protected
:
87
uint32_t
offset
= 0;
88
};
89
90
class
WorldCellProperties
:
public
Menu
{
91
public
:
92
void
SetPicked
(
WorldCell
*
cell
);
93
uint32_t
Layer
() {
return
1; }
94
void
Display
();
95
~WorldCellProperties
() =
default
;
96
protected
:
97
WorldCell
*
cell
=
nullptr
;
98
};
99
100
class
StatisticsMenu
:
public
Menu
{
101
public
:
102
void
Display
();
103
uint32_t
Layer
() {
return
0; }
104
~StatisticsMenu
() =
default
;
105
};
106
107
class
EventEmit
:
public
Menu
{
108
public
:
109
void
SetEventType
(uint32_t type) {
event_type
= type; }
110
uint32_t
Layer
() {
return
1; }
111
void
Display
();
112
~EventEmit
() =
default
;
113
protected
:
114
uint16_t
subtype
= 0;
115
uint32_t
parameter_type
= 0;
116
uint32_t
event_type
= 0;
117
char
subtype_string
[8] =
"0"
;
118
char
parameter_string
[32] =
""
;
119
};
120
121
class
SignalMenu
:
public
Menu
{
122
public
:
123
void
SetEntity
(
id_t
entity) {
entity_id
= entity; }
124
void
Display
();
125
uint32_t
Layer
() {
return
2; }
126
~SignalMenu
() =
default
;
127
protected
:
128
id_t
entity_id
= 0;
129
};
130
131
}
132
133
#endif
tram::Ext::Menu::DebugMenu
Definition:
debug.h:23
tram::Ext::Menu::DebugMenu::statistics_menu
static StatisticsMenu * statistics_menu
Definition:
debug.h:32
tram::Ext::Menu::DebugMenu::Display
void Display()
Definition:
debug.cpp:242
tram::Ext::Menu::DebugMenu::intercept_menu
static InterceptMenu * intercept_menu
Definition:
debug.h:31
tram::Ext::Menu::DebugMenu::~DebugMenu
~DebugMenu()=default
tram::Ext::Menu::DebugMenu::intercept_enabled
static bool intercept_enabled
Definition:
debug.h:29
tram::Ext::Menu::DebugMenu::Layer
uint32_t Layer()
Definition:
debug.h:26
tram::Ext::Menu::DebugMenu::statistics_enabled
static bool statistics_enabled
Definition:
debug.h:30
tram::Ext::Menu::EntityPicker
Definition:
debug.h:45
tram::Ext::Menu::EntityPicker::Layer
uint32_t Layer()
Definition:
debug.h:48
tram::Ext::Menu::EntityPicker::callback
std::function< void(id_t)> callback
Definition:
debug.h:52
tram::Ext::Menu::EntityPicker::EntityPicker
EntityPicker(std::function< void(id_t)> callback)
Definition:
debug.cpp:360
tram::Ext::Menu::EntityPicker::Display
void Display()
Definition:
debug.cpp:364
tram::Ext::Menu::EntityPicker::~EntityPicker
~EntityPicker()=default
tram::Ext::Menu::EntityProperties
Definition:
debug.h:35
tram::Ext::Menu::EntityProperties::SetPicked
void SetPicked(id_t entity)
Definition:
debug.cpp:309
tram::Ext::Menu::EntityProperties::Layer
uint32_t Layer()
Definition:
debug.h:38
tram::Ext::Menu::EntityProperties::~EntityProperties
~EntityProperties()=default
tram::Ext::Menu::EntityProperties::entity
id_t entity
Definition:
debug.h:42
tram::Ext::Menu::EntityProperties::Display
void Display()
Definition:
debug.cpp:313
tram::Ext::Menu::EventEmit
Definition:
debug.h:107
tram::Ext::Menu::EventEmit::parameter_string
char parameter_string[32]
Definition:
debug.h:118
tram::Ext::Menu::EventEmit::event_type
uint32_t event_type
Definition:
debug.h:116
tram::Ext::Menu::EventEmit::Layer
uint32_t Layer()
Definition:
debug.h:110
tram::Ext::Menu::EventEmit::Display
void Display()
Definition:
debug.cpp:677
tram::Ext::Menu::EventEmit::~EventEmit
~EventEmit()=default
tram::Ext::Menu::EventEmit::subtype_string
char subtype_string[8]
Definition:
debug.h:117
tram::Ext::Menu::EventEmit::SetEventType
void SetEventType(uint32_t type)
Definition:
debug.h:109
tram::Ext::Menu::EventEmit::parameter_type
uint32_t parameter_type
Definition:
debug.h:115
tram::Ext::Menu::EventEmit::subtype
uint16_t subtype
Definition:
debug.h:114
tram::Ext::Menu::InterceptMenu
Definition:
debug.h:80
tram::Ext::Menu::InterceptMenu::offset
uint32_t offset
Definition:
debug.h:87
tram::Ext::Menu::InterceptMenu::Layer
uint32_t Layer()
Definition:
debug.h:83
tram::Ext::Menu::InterceptMenu::SetOffset
void SetOffset(uint32_t offset)
Definition:
debug.h:84
tram::Ext::Menu::InterceptMenu::~InterceptMenu
~InterceptMenu()=default
tram::Ext::Menu::InterceptMenu::Display
void Display()
Definition:
debug.cpp:513
tram::Ext::Menu::ListSelection
Definition:
debug.h:55
tram::Ext::Menu::ListSelection::list
std::vector< std::string > list
Definition:
debug.h:63
tram::Ext::Menu::ListSelection::Layer
uint32_t Layer()
Definition:
debug.h:58
tram::Ext::Menu::ListSelection::ListSelection
ListSelection(std::function< void(uint32_t)> callback, std::vector< std::string > list)
Definition:
debug.cpp:416
tram::Ext::Menu::ListSelection::callback
std::function< void(uint32_t)> callback
Definition:
debug.h:62
tram::Ext::Menu::ListSelection::Display
void Display()
Definition:
debug.cpp:421
tram::Ext::Menu::ListSelection::~ListSelection
~ListSelection()=default
tram::Ext::Menu::Menu
Definition:
menu.h:20
tram::Ext::Menu::MessageSend
Definition:
debug.h:66
tram::Ext::Menu::MessageSend::SetEntity
void SetEntity(id_t entity)
Definition:
debug.cpp:448
tram::Ext::Menu::MessageSend::Layer
uint32_t Layer()
Definition:
debug.h:70
tram::Ext::Menu::MessageSend::~MessageSend
~MessageSend()=default
tram::Ext::Menu::MessageSend::SetMessageType
void SetMessageType(uint32_t type)
Definition:
debug.cpp:452
tram::Ext::Menu::MessageSend::entity_id
id_t entity_id
Definition:
debug.h:75
tram::Ext::Menu::MessageSend::Display
void Display()
Definition:
debug.cpp:456
tram::Ext::Menu::MessageSend::parameter_type
uint32_t parameter_type
Definition:
debug.h:74
tram::Ext::Menu::MessageSend::parameter_string
char parameter_string[32]
Definition:
debug.h:77
tram::Ext::Menu::MessageSend::message_type
uint32_t message_type
Definition:
debug.h:76
tram::Ext::Menu::SignalMenu
Definition:
debug.h:121
tram::Ext::Menu::SignalMenu::Layer
uint32_t Layer()
Definition:
debug.h:125
tram::Ext::Menu::SignalMenu::entity_id
id_t entity_id
Definition:
debug.h:128
tram::Ext::Menu::SignalMenu::~SignalMenu
~SignalMenu()=default
tram::Ext::Menu::SignalMenu::Display
void Display()
Definition:
debug.cpp:734
tram::Ext::Menu::SignalMenu::SetEntity
void SetEntity(id_t entity)
Definition:
debug.h:123
tram::Ext::Menu::StatisticsMenu
Definition:
debug.h:100
tram::Ext::Menu::StatisticsMenu::Layer
uint32_t Layer()
Definition:
debug.h:103
tram::Ext::Menu::StatisticsMenu::Display
void Display()
Definition:
debug.cpp:627
tram::Ext::Menu::StatisticsMenu::~StatisticsMenu
~StatisticsMenu()=default
tram::Ext::Menu::WorldCellProperties
Definition:
debug.h:90
tram::Ext::Menu::WorldCellProperties::Display
void Display()
Definition:
debug.cpp:540
tram::Ext::Menu::WorldCellProperties::Layer
uint32_t Layer()
Definition:
debug.h:93
tram::Ext::Menu::WorldCellProperties::SetPicked
void SetPicked(WorldCell *cell)
Definition:
debug.cpp:536
tram::Ext::Menu::WorldCellProperties::cell
WorldCell * cell
Definition:
debug.h:97
tram::Ext::Menu::WorldCellProperties::~WorldCellProperties
~WorldCellProperties()=default
tram::WorldCell
Definition:
worldcell.h:18
menu.h
tram::Ext::Menu
Definition:
debug.cpp:14
tram::Ext::Menu::UpdateCallbacks
void UpdateCallbacks()
Definition:
debug.cpp:185
tram::Ext::Menu::InitCallbacks
void InitCallbacks()
Definition:
debug.cpp:135
tram
Definition:
api.h:9
tram::id_t
uint32_t id_t
Definition:
core.h:11
Generated by
1.9.2