1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#ifndef PORTMENU_H
#define PORTMENU_H
#include <libultraship/libultraship.h>
#include "UIWidgets.h"
#include "Menu.h"
#include "Fast3D/backends/gfx_rendering_api.h"
namespace GameUI {
static const std::unordered_map<int32_t, const char*> menuThemeOptions = {
{ UIWidgets::Colors::Red, "Red" },
{ UIWidgets::Colors::DarkRed, "Dark Red" },
{ UIWidgets::Colors::Orange, "Orange" },
{ UIWidgets::Colors::Green, "Green" },
{ UIWidgets::Colors::DarkGreen, "Dark Green" },
{ UIWidgets::Colors::LightBlue, "Light Blue" },
{ UIWidgets::Colors::Blue, "Blue" },
{ UIWidgets::Colors::DarkBlue, "Dark Blue" },
{ UIWidgets::Colors::Indigo, "Indigo" },
{ UIWidgets::Colors::Violet, "Violet" },
{ UIWidgets::Colors::Purple, "Purple" },
{ UIWidgets::Colors::Brown, "Brown" },
{ UIWidgets::Colors::Gray, "Gray" },
{ UIWidgets::Colors::DarkGray, "Dark Gray" },
};
static const std::unordered_map<int32_t, const char*> textureFilteringMap = {
{ Fast::FilteringMode::FILTER_THREE_POINT, "Three-Point" },
{ Fast::FilteringMode::FILTER_LINEAR, "Linear" },
{ Fast::FilteringMode::FILTER_NONE, "None" },
};
static const std::unordered_map<int32_t, const char*> motionBlurOptions = {
{ MOTION_BLUR_DYNAMIC, "Dynamic (default)" },
{ MOTION_BLUR_ALWAYS_OFF, "Always Off" },
{ MOTION_BLUR_ALWAYS_ON, "Always On" },
};
static const std::unordered_map<int32_t, const char*> logLevels = {
{ DEBUG_LOG_TRACE, "Trace" }, { DEBUG_LOG_DEBUG, "Debug" }, { DEBUG_LOG_INFO, "Info" },
{ DEBUG_LOG_WARN, "Warn" }, { DEBUG_LOG_ERROR, "Error" }, { DEBUG_LOG_CRITICAL, "Critical" },
{ DEBUG_LOG_OFF, "Off" },
};
class PortMenu : public Ship::Menu {
public:
PortMenu(const std::string& consoleVariable, const std::string& name);
~PortMenu() {}
void InitElement() override;
void DrawElement() override;
void UpdateElement() override;
void Draw() override;
void AddSidebarEntry(std::string sectionName, std::string sidbarName, uint32_t columnCount);
WidgetInfo& AddWidget(WidgetPath& pathInfo, std::string widgetName, WidgetType widgetType);
void AddSettings();
void AddEnhancements();
void AddDevTools();
};
} // namespace BenGui
#endif // PORTMENU_H
|