yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
sprite_editor_panels.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_SPRITE_PANELS_SPRITE_EDITOR_PANELS_H_
2#define YAZE_APP_EDITOR_SPRITE_PANELS_SPRITE_EDITOR_PANELS_H_
3
4#include <functional>
5#include <string>
6
9
10namespace yaze {
11namespace editor {
12
13// =============================================================================
14// EditorPanel wrappers for SpriteEditor panels
15// =============================================================================
16
24 public:
25 using DrawCallback = std::function<void()>;
26
27 explicit VanillaSpriteEditorPanel(DrawCallback draw_callback)
28 : draw_callback_(std::move(draw_callback)) {}
29
30 std::string GetId() const override { return "sprite.vanilla_editor"; }
31 std::string GetDisplayName() const override { return "Vanilla Sprites"; }
32 std::string GetIcon() const override { return ICON_MD_SMART_TOY; }
33 std::string GetEditorCategory() const override { return "Sprite"; }
34 int GetPriority() const override { return 10; }
35 bool IsVisibleByDefault() const override { return true; }
36 float GetPreferredWidth() const override { return 900.0f; }
37
38 void Draw(bool* p_open) override {
39 if (draw_callback_) {
41 }
42 }
43
44 private:
46};
47
55 public:
56 using DrawCallback = std::function<void()>;
57
58 explicit CustomSpriteEditorPanel(DrawCallback draw_callback)
59 : draw_callback_(std::move(draw_callback)) {}
60
61 std::string GetId() const override { return "sprite.custom_editor"; }
62 std::string GetDisplayName() const override { return "Custom Sprites"; }
63 std::string GetIcon() const override { return ICON_MD_ADD_CIRCLE; }
64 std::string GetEditorCategory() const override { return "Sprite"; }
65 int GetPriority() const override { return 20; }
66 float GetPreferredWidth() const override { return 1000.0f; }
67
68 void Draw(bool* p_open) override {
69 if (draw_callback_) {
71 }
72 }
73
74 private:
76};
77
78} // namespace editor
79} // namespace yaze
80
81#endif // YAZE_APP_EDITOR_SPRITE_PANELS_SPRITE_EDITOR_PANELS_H_
EditorPanel for Custom Sprite Editor (ZSM format)
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
int GetPriority() const override
Get display priority for menu ordering.
std::string GetIcon() const override
Material Design icon for this panel.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
void Draw(bool *p_open) override
Draw the panel content.
std::string GetId() const override
Unique identifier for this panel.
CustomSpriteEditorPanel(DrawCallback draw_callback)
Base interface for all logical panel components.
EditorPanel for Vanilla Sprite Editor.
VanillaSpriteEditorPanel(DrawCallback draw_callback)
void Draw(bool *p_open) override
Draw the panel content.
std::string GetId() const override
Unique identifier for this panel.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
bool IsVisibleByDefault() const override
Whether this panel should be visible by default.
std::string GetIcon() const override
Material Design icon for this panel.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
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_ADD_CIRCLE
Definition icons.h:95
#define ICON_MD_SMART_TOY
Definition icons.h:1781