yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
message_editor_panels.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_MESSAGE_PANELS_MESSAGE_EDITOR_PANELS_H_
2#define YAZE_APP_EDITOR_MESSAGE_PANELS_MESSAGE_EDITOR_PANELS_H_
3
4#include <functional>
5#include <string>
6
9
10namespace yaze {
11namespace editor {
12
13// =============================================================================
14// EditorPanel wrappers for MessageEditor panels
15// =============================================================================
16
21 public:
22 using DrawCallback = std::function<void()>;
23
24 explicit MessageListPanel(DrawCallback draw_callback)
25 : draw_callback_(std::move(draw_callback)) {}
26
27 std::string GetId() const override { return "message.message_list"; }
28 std::string GetDisplayName() const override { return "Message List"; }
29 std::string GetIcon() const override { return ICON_MD_LIST; }
30 std::string GetEditorCategory() const override { return "Message"; }
31 int GetPriority() const override { return 10; }
32
33 void Draw(bool* p_open) override {
34 if (draw_callback_) {
36 }
37 }
38
39 private:
41};
42
47 public:
48 using DrawCallback = std::function<void()>;
49
50 explicit MessageEditorPanel(DrawCallback draw_callback)
51 : draw_callback_(std::move(draw_callback)) {}
52
53 std::string GetId() const override { return "message.message_editor"; }
54 std::string GetDisplayName() const override { return "Message Editor"; }
55 std::string GetIcon() const override { return ICON_MD_EDIT; }
56 std::string GetEditorCategory() const override { return "Message"; }
57 int GetPriority() const override { return 20; }
58
59 void Draw(bool* p_open) override {
60 if (draw_callback_) {
62 }
63 }
64
65 private:
67};
68
73 public:
74 using DrawCallback = std::function<void()>;
75
76 explicit FontAtlasPanel(DrawCallback draw_callback)
77 : draw_callback_(std::move(draw_callback)) {}
78
79 std::string GetId() const override { return "message.font_atlas"; }
80 std::string GetDisplayName() const override { return "Font Atlas"; }
81 std::string GetIcon() const override { return ICON_MD_FONT_DOWNLOAD; }
82 std::string GetEditorCategory() const override { return "Message"; }
83 int GetPriority() const override { return 30; }
84
85 void Draw(bool* p_open) override {
86 if (draw_callback_) {
88 }
89 }
90
91 private:
93};
94
99 public:
100 using DrawCallback = std::function<void()>;
101
102 explicit DictionaryPanel(DrawCallback draw_callback)
103 : draw_callback_(std::move(draw_callback)) {}
104
105 std::string GetId() const override { return "message.dictionary"; }
106 std::string GetDisplayName() const override { return "Dictionary"; }
107 std::string GetIcon() const override { return ICON_MD_BOOK; }
108 std::string GetEditorCategory() const override { return "Message"; }
109 int GetPriority() const override { return 40; }
110
111 void Draw(bool* p_open) override {
112 if (draw_callback_) {
114 }
115 }
116
117 private:
119};
120
121} // namespace editor
122} // namespace yaze
123
124#endif // YAZE_APP_EDITOR_MESSAGE_PANELS_MESSAGE_EDITOR_PANELS_H_
EditorPanel for Dictionary.
std::string GetId() const override
Unique identifier for this panel.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
int GetPriority() const override
Get display priority for menu ordering.
void Draw(bool *p_open) override
Draw the panel content.
std::string GetIcon() const override
Material Design icon for this panel.
DictionaryPanel(DrawCallback draw_callback)
Base interface for all logical panel components.
EditorPanel for Font Atlas.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetId() const override
Unique identifier for this panel.
void Draw(bool *p_open) override
Draw the panel content.
std::function< void()> DrawCallback
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetIcon() const override
Material Design icon for this panel.
int GetPriority() const override
Get display priority for menu ordering.
FontAtlasPanel(DrawCallback draw_callback)
EditorPanel for Message Editor.
MessageEditorPanel(DrawCallback draw_callback)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetId() const override
Unique identifier for this panel.
std::string GetIcon() const override
Material Design icon for this panel.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
int GetPriority() const override
Get display priority for menu ordering.
void Draw(bool *p_open) override
Draw the panel content.
EditorPanel for Message List.
MessageListPanel(DrawCallback draw_callback)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetId() const override
Unique identifier for this panel.
std::string GetIcon() const override
Material Design icon for this panel.
void Draw(bool *p_open) override
Draw the panel content.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
int GetPriority() const override
Get display priority for menu ordering.
#define ICON_MD_FONT_DOWNLOAD
Definition icons.h:818
#define ICON_MD_EDIT
Definition icons.h:645
#define ICON_MD_LIST
Definition icons.h:1094
#define ICON_MD_BOOK
Definition icons.h:283