ResourcePanel for editing individual dungeon rooms. More...
#include <dungeon_room_panel.h>


Public Member Functions | |
| DungeonRoomPanel (size_t session_id, int room_id, zelda3::Room *room, DungeonCanvasViewer *canvas_viewer, DungeonRoomLoader *room_loader) | |
| Construct a room panel. | |
| int | GetResourceId () const override |
| The numeric ID of the resource. | |
| std::string | GetResourceType () const override |
| The resource type name. | |
| std::string | GetResourceName () const override |
| Human-readable resource name. | |
| std::string | GetIcon () const override |
| Material Design icon for this panel. | |
| 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. | |
| void | OnResourceModified () override |
| Called when resource data changes externally. | |
| zelda3::Room * | room () const |
| int | room_id () const |
Public Member Functions inherited from yaze::editor::ResourcePanel | |
| virtual | ~ResourcePanel ()=default |
| std::string | GetId () const override |
| Generated panel ID from resource type and ID. | |
| std::string | GetDisplayName () const override |
| Generated display name from resource name. | |
| PanelCategory | GetPanelCategory () const override |
| Resource panels use CrossEditor category for opt-in persistence. | |
| virtual bool | AllowMultipleInstances () const |
| Whether multiple instances of this resource type can be open. | |
| virtual size_t | GetSessionId () const |
| Get the session ID this resource belongs to. | |
| void | SetSessionId (size_t session_id) |
| Set the session ID for this resource panel. | |
| virtual void | OnResourceDeleted () |
| Called when resource is deleted from ROM. | |
Public Member Functions inherited from yaze::editor::EditorPanel | |
| virtual | ~EditorPanel ()=default |
| virtual void | OnOpen () |
| Called when panel becomes visible. | |
| virtual void | OnClose () |
| Called when panel is hidden. | |
| virtual void | OnFocus () |
| Called when panel receives focus. | |
| virtual bool | IsEnabled () const |
| Check if this panel is currently enabled. | |
| virtual std::string | GetDisabledTooltip () const |
| Get tooltip text when panel is disabled. | |
| virtual std::string | GetShortcutHint () const |
| Get keyboard shortcut hint for display. | |
| virtual float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| virtual bool | IsVisibleByDefault () const |
| Whether this panel should be visible by default. | |
| virtual std::string | GetParentPanelId () const |
| Get parent panel ID for cascade behavior. | |
| virtual bool | CascadeCloseChildren () const |
| Whether closing this panel should close child panels. | |
Private Attributes | |
| int | room_id_ = 0 |
| zelda3::Room * | room_ = nullptr |
| DungeonCanvasViewer * | canvas_viewer_ = nullptr |
| DungeonRoomLoader * | room_loader_ = nullptr |
Additional Inherited Members | |
Protected Attributes inherited from yaze::editor::ResourcePanel | |
| size_t | session_id_ = 0 |
| Session ID for multi-ROM editing (0 = single session) | |
ResourcePanel for editing individual dungeon rooms.
This panel provides a tabbed view for editing a specific dungeon room. Multiple rooms can be open simultaneously (up to kMaxRoomPanels). Each panel shows the room canvas with objects, sprites, and layers.
Definition at line 37 of file dungeon_room_panel.h.
|
inline |
Construct a room panel.
| session_id | The session this room belongs to |
| room_id | The room ID (0-295) |
| room | Pointer to the room data (must outlive panel) |
| canvas_viewer | Pointer to canvas viewer for rendering |
| room_loader | Pointer to room loader for lazy loading |
Definition at line 47 of file dungeon_room_panel.h.
References yaze::editor::ResourcePanel::session_id_.
|
inlineoverridevirtual |
The numeric ID of the resource.
This is the primary key for the resource within its type.
Implements yaze::editor::ResourcePanel.
Definition at line 61 of file dungeon_room_panel.h.
References room_id_.
|
inlineoverridevirtual |
The resource type name.
Used in panel ID generation and display.
Implements yaze::editor::ResourcePanel.
Definition at line 62 of file dungeon_room_panel.h.
|
inlineoverridevirtual |
Human-readable resource name.
Default implementation returns "{type} {id}". Override to provide game-specific names from ROM data.
Reimplemented from yaze::editor::ResourcePanel.
Definition at line 64 of file dungeon_room_panel.h.
References yaze::zelda3::GetRoomLabel(), and room_id_.

|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::EditorPanel.
Definition at line 70 of file dungeon_room_panel.h.
References ICON_MD_GRID_ON.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::EditorPanel.
Definition at line 71 of file dungeon_room_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::EditorPanel.
Definition at line 72 of file dungeon_room_panel.h.
References room_id_.
|
inlineoverridevirtual |
Draw the panel content.
| p_open | Pointer to visibility flag (nullptr if not closable) |
Called by PanelManager when the panel is visible. Do NOT call ImGui::Begin/End - the PanelWindow wrapper handles that. Just draw your content directly.
Implements yaze::editor::EditorPanel.
Definition at line 78 of file dungeon_room_panel.h.
References yaze::zelda3::Room::bg1_buffer(), yaze::zelda3::Room::blocks(), yaze::zelda3::Room::blockset, canvas_viewer_, yaze::zelda3::Room::ClearTileObjects(), yaze::editor::DungeonCanvasViewer::DrawDungeonCanvas(), yaze::zelda3::Room::floor1(), yaze::zelda3::Room::floor2(), yaze::zelda3::Room::GetTileObjects(), ICON_MD_CHECK, ICON_MD_CLEANING_SERVICES, ICON_MD_PENDING, ICON_MD_REFRESH, yaze::zelda3::Room::IsLoaded(), yaze::zelda3::Room::LoadObjects(), yaze::editor::DungeonRoomLoader::LoadRoom(), yaze::zelda3::Room::LoadRoomGraphics(), yaze::zelda3::Room::RenderRoomGraphics(), yaze::zelda3::Room::rom(), room_, room_id_, room_loader_, yaze::zelda3::Room::set_floor1(), and yaze::zelda3::Room::set_floor2().
|
inlineoverridevirtual |
Called when resource data changes externally.
Override to refresh panel state when the underlying ROM data is modified by another editor or operation.
Reimplemented from yaze::editor::ResourcePanel.
Definition at line 173 of file dungeon_room_panel.h.
References yaze::zelda3::Room::IsLoaded(), yaze::zelda3::Room::RenderRoomGraphics(), and room_.

|
inline |
Definition at line 184 of file dungeon_room_panel.h.
References room_.
|
inline |
Definition at line 185 of file dungeon_room_panel.h.
References room_id_.
|
private |
Definition at line 188 of file dungeon_room_panel.h.
Referenced by Draw(), GetPriority(), GetResourceId(), GetResourceName(), and room_id().
|
private |
Definition at line 189 of file dungeon_room_panel.h.
Referenced by Draw(), OnResourceModified(), and room().
|
private |
Definition at line 190 of file dungeon_room_panel.h.
Referenced by Draw().
|
private |
Definition at line 191 of file dungeon_room_panel.h.
Referenced by Draw().