WindowContent for displaying multiple rooms in a spatial dungeon layout. More...
#include <dungeon_map_panel.h>


Public Member Functions | |
| DungeonMapPanel (int *current_room_id, ImVector< int > *active_rooms, std::function< void(int)> on_room_selected, DungeonRoomStore *rooms=nullptr) | |
| Construct a dungeon map panel. | |
| 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 | 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 | SetRoomIntentCallback (std::function< void(int, RoomSelectionIntent)> callback) |
| void | SetDungeonRooms (const std::vector< int > &room_ids) |
| Set which rooms to display in this dungeon map. | |
| void | AddRoom (int room_id) |
| Add a single room to the dungeon map. | |
| void | ClearRooms () |
| Clear all rooms from the dungeon map. | |
| void | SetRoomPosition (int room_id, int grid_x, int grid_y) |
| Manually set a room's position in the grid. | |
| void | SetRooms (DungeonRoomStore *rooms) |
| void | SetHackManifest (const core::HackManifest *manifest) |
| Set the hack manifest for project registry access. | |
| void | LoadFromDungeonEntry (const core::DungeonEntry &dungeon) |
| Load rooms and connections from a project registry dungeon entry. | |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
Public Member Functions inherited from yaze::editor::WindowContent | |
| virtual | ~WindowContent ()=default |
| virtual void | OnFirstDraw () |
| Called once before the first Draw() in a session. | |
| virtual bool | RequiresLazyInit () const |
| Whether this panel uses lazy initialization. | |
| void | InvalidateLazyInit () |
| Reset lazy init state so OnFirstDraw() runs again. | |
| 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 WindowLifecycle | GetWindowLifecycle () const |
| Get the lifecycle category for this window. | |
| virtual WindowContextScope | GetContextScope () const |
| Optional context binding for this window (room/selection/etc) | |
| virtual WindowScope | GetScope () const |
| Get the registration scope for this window. | |
| 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 std::string | GetWorkflowGroup () const |
| Optional workflow group for hack-centric actions. | |
| virtual std::string | GetWorkflowLabel () const |
| Optional workflow label for menus/command palette. | |
| virtual std::string | GetWorkflowDescription () const |
| Optional workflow description for menus/command palette. | |
| virtual int | GetWorkflowPriority () const |
| Optional workflow ordering priority (lower sorts first). | |
| virtual float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| virtual bool | PreferAutoHideTabBar () const |
| Whether the dock node hosting this panel should auto-hide its tab bar. | |
| 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. | |
| void | DrawWithLazyInit (bool *p_open) |
| Execute lazy initialization if needed, then call Draw() | |
Private Member Functions | |
| void | AutoLayoutRooms () |
| Auto-layout rooms in a grid based on their IDs. | |
| void | DrawDungeonSelector () |
| Draw dungeon preset selector — uses project registry if available, falls back to vanilla ALTTP presets. | |
| void | DrawRegistrySelector () |
| Selector using project registry area overviews. | |
| void | DrawVanillaPresetSelector () |
| Fallback selector using vanilla ALTTP dungeon presets. | |
Static Private Member Functions | |
| static void | DrawDashedLine (ImDrawList *dl, ImVec2 from, ImVec2 to, ImU32 color, float thickness, float dash_len) |
| Draw a dashed line between two points. | |
| static void | DrawArrowhead (ImDrawList *dl, ImVec2 from, ImVec2 to, ImU32 color, float size) |
| Draw a small triangle arrowhead at the 'to' end of a line. | |
Private Attributes | |
| int * | current_room_id_ = nullptr |
| ImVector< int > * | active_rooms_ = nullptr |
| DungeonRoomStore * | rooms_ = nullptr |
| std::function< void(int)> | on_room_selected_ |
| std::function< void(int, RoomSelectionIntent)> | on_room_intent_ |
| std::vector< int > | dungeon_room_ids_ |
| std::map< int, ImVec2 > | room_positions_ |
| std::map< int, std::string > | room_types_ |
| int | selected_preset_ = -1 |
| const core::HackManifest * | hack_manifest_ = nullptr |
| std::vector< core::DungeonConnection > | stair_connections_ |
| std::vector< core::DungeonConnection > | holewarp_connections_ |
| std::string | current_dungeon_name_ = "Select Dungeon..." |
Additional Inherited Members | |
Protected Member Functions inherited from yaze::editor::WindowContent | |
| void | InvalidateCache () |
| Invalidate all cached computations. | |
| template<typename T > | |
| T & | GetCached (const std::string &key, std::function< T()> compute) |
| Get or compute a cached value. | |
| bool | IsCacheValid () const |
| Check if cache has been invalidated. | |
| void | ClearCache () |
| Clear all cached values (more aggressive than InvalidateCache) | |
WindowContent for displaying multiple rooms in a spatial dungeon layout.
This panel provides an overview of multiple dungeon rooms arranged spatially, allowing users to see room connections and navigate between rooms quickly. Unlike the 16x19 Room Matrix which shows ALL rooms, this panel shows a focused subset of rooms that belong to a specific dungeon or user selection.
Features:
Definition at line 45 of file dungeon_map_panel.h.
|
inline |
Construct a dungeon map panel.
| current_room_id | Pointer to the current room ID (for highlighting) |
| active_rooms | Pointer to list of currently open rooms |
| on_room_selected | Callback when a room is clicked |
| rooms | Pointer to room data array |
Definition at line 54 of file dungeon_map_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 66 of file dungeon_map_panel.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 67 of file dungeon_map_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 68 of file dungeon_map_panel.h.
References ICON_MD_MAP.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 69 of file dungeon_map_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::WindowContent.
Definition at line 70 of file dungeon_map_panel.h.
|
inline |
Definition at line 72 of file dungeon_map_panel.h.
References on_room_intent_.
|
inline |
Set which rooms to display in this dungeon map.
| room_ids | Vector of room IDs to include |
Definition at line 85 of file dungeon_map_panel.h.
References AutoLayoutRooms(), and dungeon_room_ids_.

|
inline |
Add a single room to the dungeon map.
Definition at line 93 of file dungeon_map_panel.h.
References AutoLayoutRooms(), and dungeon_room_ids_.
Referenced by DrawDungeonSelector().

|
inline |
Clear all rooms from the dungeon map.
Definition at line 106 of file dungeon_map_panel.h.
References dungeon_room_ids_, and room_positions_.
Referenced by DrawDungeonSelector(), and LoadFromDungeonEntry().
|
inline |
Manually set a room's position in the grid.
Definition at line 114 of file dungeon_map_panel.h.
References room_positions_.
|
inline |
Definition at line 119 of file dungeon_map_panel.h.
References rooms_.
|
inline |
Set the hack manifest for project registry access.
Definition at line 124 of file dungeon_map_panel.h.
References hack_manifest_.
|
inline |
Load rooms and connections from a project registry dungeon entry.
Definition at line 131 of file dungeon_map_panel.h.
References ClearRooms(), current_dungeon_name_, dungeon_room_ids_, holewarp_connections_, yaze::core::DungeonEntry::holewarps, yaze::core::DungeonEntry::name, room_positions_, room_types_, yaze::core::DungeonEntry::rooms, stair_connections_, and yaze::core::DungeonEntry::stairs.
Referenced by DrawRegistrySelector().

|
inlineoverridevirtual |
Draw the panel content.
| p_open | Pointer to visibility flag (nullptr if not closable) |
Called by WorkspaceWindowManager when the panel is visible. Do NOT call ImGui::Begin/End - the PanelWindow wrapper handles that. Just draw your content directly.
Implements yaze::editor::WindowContent.
Definition at line 148 of file dungeon_map_panel.h.
References active_rooms_, yaze::zelda3::RoomLayerManager::ApplyLayerMerging(), yaze::gfx::Arena::CREATE, current_room_id_, DrawArrowhead(), DrawDashedLine(), DrawDungeonSelector(), dungeon_room_ids_, yaze::gfx::Arena::Get(), yaze::editor::DungeonRoomStore::GetIfLoaded(), yaze::zelda3::GetRoomLabel(), yaze::editor::AgentUI::GetTheme(), holewarp_connections_, yaze::editor::kOpenStandalone, on_room_intent_, on_room_selected_, yaze::gfx::Arena::ProcessTextureQueue(), yaze::gfx::Arena::QueueTextureCommand(), room_positions_, room_types_, rooms_, stair_connections_, and yaze::gfx::Arena::UPDATE.
|
inlineprivate |
Auto-layout rooms in a grid based on their IDs.
Definition at line 433 of file dungeon_map_panel.h.
References dungeon_room_ids_, and room_positions_.
Referenced by AddRoom(), DrawVanillaPresetSelector(), and SetDungeonRooms().
|
inlineprivate |
Draw dungeon preset selector — uses project registry if available, falls back to vanilla ALTTP presets.
Definition at line 453 of file dungeon_map_panel.h.
References AddRoom(), ClearRooms(), current_dungeon_name_, current_room_id_, DrawRegistrySelector(), DrawVanillaPresetSelector(), hack_manifest_, yaze::core::HackManifest::HasProjectRegistry(), holewarp_connections_, ICON_MD_ADD, ICON_MD_CLEAR, room_types_, selected_preset_, and stair_connections_.
Referenced by Draw().
|
inlineprivate |
Selector using project registry area overviews.
Definition at line 486 of file dungeon_map_panel.h.
References current_dungeon_name_, yaze::core::ProjectRegistry::dungeons, hack_manifest_, LoadFromDungeonEntry(), yaze::core::HackManifest::project_registry(), and selected_preset_.
Referenced by DrawDungeonSelector().

|
inlineprivate |
Fallback selector using vanilla ALTTP dungeon presets.
Definition at line 513 of file dungeon_map_panel.h.
References AutoLayoutRooms(), dungeon_room_ids_, and selected_preset_.
Referenced by DrawDungeonSelector().

|
inlinestaticprivate |
Draw a dashed line between two points.
Definition at line 553 of file dungeon_map_panel.h.
Referenced by Draw().
|
inlinestaticprivate |
Draw a small triangle arrowhead at the 'to' end of a line.
Definition at line 580 of file dungeon_map_panel.h.
Referenced by Draw().
|
private |
Definition at line 601 of file dungeon_map_panel.h.
Referenced by Draw(), and DrawDungeonSelector().
|
private |
Definition at line 602 of file dungeon_map_panel.h.
Referenced by Draw().
|
private |
Definition at line 603 of file dungeon_map_panel.h.
Referenced by Draw(), and SetRooms().
|
private |
Definition at line 604 of file dungeon_map_panel.h.
Referenced by Draw().
|
private |
Definition at line 605 of file dungeon_map_panel.h.
Referenced by Draw(), and SetRoomIntentCallback().
|
private |
Definition at line 608 of file dungeon_map_panel.h.
Referenced by AddRoom(), AutoLayoutRooms(), ClearRooms(), Draw(), DrawVanillaPresetSelector(), LoadFromDungeonEntry(), and SetDungeonRooms().
|
private |
Definition at line 609 of file dungeon_map_panel.h.
Referenced by AutoLayoutRooms(), ClearRooms(), Draw(), LoadFromDungeonEntry(), and SetRoomPosition().
|
private |
Definition at line 610 of file dungeon_map_panel.h.
Referenced by Draw(), DrawDungeonSelector(), and LoadFromDungeonEntry().
|
private |
Definition at line 611 of file dungeon_map_panel.h.
Referenced by DrawDungeonSelector(), DrawRegistrySelector(), and DrawVanillaPresetSelector().
|
private |
Definition at line 614 of file dungeon_map_panel.h.
Referenced by DrawDungeonSelector(), DrawRegistrySelector(), and SetHackManifest().
|
private |
Definition at line 615 of file dungeon_map_panel.h.
Referenced by Draw(), DrawDungeonSelector(), and LoadFromDungeonEntry().
|
private |
Definition at line 616 of file dungeon_map_panel.h.
Referenced by Draw(), DrawDungeonSelector(), and LoadFromDungeonEntry().
|
private |
Definition at line 617 of file dungeon_map_panel.h.
Referenced by DrawDungeonSelector(), DrawRegistrySelector(), and LoadFromDungeonEntry().