yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
door_editor_content.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_INSPECTORS_DOOR_EDITOR_CONTENT_H_
2#define YAZE_APP_EDITOR_DUNGEON_INSPECTORS_DOOR_EDITOR_CONTENT_H_
3
4#include <functional>
5#include <string>
6
10#include "app/gui/core/icons.h"
12
13namespace yaze::editor {
14
16 public:
17 std::string GetId() const override { return "dungeon.door_editor"; }
18 std::string GetDisplayName() const override { return "Door Editor"; }
19 std::string GetIcon() const override { return ICON_MD_DOOR_FRONT; }
20 std::string GetEditorCategory() const override { return "Dungeon"; }
21 int GetPriority() const override { return 68; }
22 float GetPreferredWidth() const override { return 420.0f; }
23
24 void Draw(bool* p_open) override;
25 void OnClose() override;
26
27 void SetCurrentRoom(int room_id) { current_room_id_ = room_id; }
28 void SetCanvasViewerProvider(std::function<DungeonCanvasViewer*()> provider) {
29 canvas_viewer_provider_ = std::move(provider);
30 }
32 void SetRooms(DungeonRoomStore* rooms) { rooms_ = rooms; }
33
34 private:
36 void CancelPlacement();
37
44};
45
46} // namespace yaze::editor
47
48#endif // YAZE_APP_EDITOR_DUNGEON_INSPECTORS_DOOR_EDITOR_CONTENT_H_
std::string GetId() const override
Unique identifier for this panel.
int GetPriority() const override
Get display priority for menu ordering.
DungeonCanvasViewer * ResolveCanvasViewer()
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::function< DungeonCanvasViewer *()> canvas_viewer_provider_
void OnClose() override
Called when panel is hidden.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
void SetCanvasViewerProvider(std::function< DungeonCanvasViewer *()> provider)
void Draw(bool *p_open) override
Draw the panel content.
void SetRooms(DungeonRoomStore *rooms)
void SetCanvasViewer(DungeonCanvasViewer *viewer)
std::string GetIcon() const override
Material Design icon for this panel.
Base interface for all logical window content components.
#define ICON_MD_DOOR_FRONT
Definition icons.h:613
Editors are the view controllers for the application.
DoorType
Door types from ALTTP.
Definition door_types.h:33
@ NormalDoor
Normal door (upper layer)