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. | |
| std::string | GetWorkflowGroup () const override |
| Optional workflow group for hack-centric actions. | |
| 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 | SetRenderContextCallback (std::function< void(int)> callback) |
| 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 WindowPresentationPolicy | GetPresentationPolicy () const |
| How this content is hosted and advertised by workspace chrome. | |
| 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 | 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 | HasExactPreferredWidth () const |
| Whether GetPreferredWidth() is an exact content width. | |
| virtual float | GetPreferredHeight () const |
| Get preferred height for this panel (optional) | |
| virtual bool | PrefersFloating () const |
| 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)> | prepare_render_context_ |
| 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_ |
| std::map< int, std::unique_ptr< RoomCompositeOutput > > | room_composite_outputs_ |
| 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..." |
Friends | |
| class | DungeonMapPanelTestPeer |
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 49 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 58 of file dungeon_map_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 70 of file dungeon_map_panel.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 71 of file dungeon_map_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 72 of file dungeon_map_panel.h.
References ICON_MD_MAP.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 73 of file dungeon_map_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::WindowContent.
Definition at line 74 of file dungeon_map_panel.h.
|
inlineoverridevirtual |
Optional workflow group for hack-centric actions.
Reimplemented from yaze::editor::WindowContent.
Definition at line 75 of file dungeon_map_panel.h.
|
inline |
Definition at line 77 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 90 of file dungeon_map_panel.h.
References AutoLayoutRooms(), dungeon_room_ids_, and room_composite_outputs_.

|
inline |
Add a single room to the dungeon map.
Definition at line 99 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 112 of file dungeon_map_panel.h.
References dungeon_room_ids_, holewarp_connections_, room_composite_outputs_, room_positions_, room_types_, and stair_connections_.
Referenced by DrawDungeonSelector(), DrawVanillaPresetSelector(), and LoadFromDungeonEntry().
|
inline |
Manually set a room's position in the grid.
Definition at line 124 of file dungeon_map_panel.h.
References room_positions_.
|
inline |
Definition at line 129 of file dungeon_map_panel.h.
References prepare_render_context_.
|
inline |
Definition at line 133 of file dungeon_map_panel.h.
References room_composite_outputs_, and rooms_.
|
inline |
Set the hack manifest for project registry access.
Definition at line 143 of file dungeon_map_panel.h.
References hack_manifest_.
|
inline |
Load rooms and connections from a project registry dungeon entry.
Definition at line 150 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 167 of file dungeon_map_panel.h.
References active_rooms_, current_room_id_, DrawArrowhead(), DrawDashedLine(), DrawDungeonSelector(), dungeon_room_ids_, yaze::gfx::EnsureCompositeBitmapTextureQueued(), 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_, prepare_render_context_, yaze::editor::PrepareCanonicalRoomComposite(), yaze::gfx::Arena::ProcessTextureQueue(), room_composite_outputs_, room_positions_, room_types_, rooms_, and stair_connections_.
|
inlineprivate |
Auto-layout rooms in a grid based on their IDs.
Definition at line 459 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 479 of file dungeon_map_panel.h.
References AddRoom(), ClearRooms(), current_dungeon_name_, current_room_id_, DrawRegistrySelector(), DrawVanillaPresetSelector(), hack_manifest_, yaze::core::HackManifest::HasProjectRegistry(), ICON_MD_ADD, ICON_MD_CLEAR, and selected_preset_.
Referenced by Draw().
|
inlineprivate |
Selector using project registry area overviews.
Definition at line 509 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 538 of file dungeon_map_panel.h.
References AutoLayoutRooms(), ClearRooms(), dungeon_room_ids_, and selected_preset_.
Referenced by DrawDungeonSelector().

|
inlinestaticprivate |
Draw a dashed line between two points.
Definition at line 581 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 608 of file dungeon_map_panel.h.
Referenced by Draw().
|
friend |
Definition at line 454 of file dungeon_map_panel.h.
|
private |
Definition at line 629 of file dungeon_map_panel.h.
Referenced by Draw(), and DrawDungeonSelector().
|
private |
Definition at line 630 of file dungeon_map_panel.h.
Referenced by Draw().
|
private |
Definition at line 631 of file dungeon_map_panel.h.
Referenced by Draw(), and SetRooms().
|
private |
Definition at line 632 of file dungeon_map_panel.h.
Referenced by Draw(), and SetRenderContextCallback().
|
private |
Definition at line 633 of file dungeon_map_panel.h.
Referenced by Draw().
|
private |
Definition at line 634 of file dungeon_map_panel.h.
Referenced by Draw(), and SetRoomIntentCallback().
|
private |
Definition at line 637 of file dungeon_map_panel.h.
Referenced by AddRoom(), AutoLayoutRooms(), ClearRooms(), Draw(), DrawVanillaPresetSelector(), LoadFromDungeonEntry(), and SetDungeonRooms().
|
private |
Definition at line 638 of file dungeon_map_panel.h.
Referenced by AutoLayoutRooms(), ClearRooms(), Draw(), LoadFromDungeonEntry(), and SetRoomPosition().
|
private |
Definition at line 639 of file dungeon_map_panel.h.
Referenced by ClearRooms(), Draw(), and LoadFromDungeonEntry().
|
private |
Definition at line 642 of file dungeon_map_panel.h.
Referenced by ClearRooms(), Draw(), SetDungeonRooms(), and SetRooms().
|
private |
Definition at line 643 of file dungeon_map_panel.h.
Referenced by DrawDungeonSelector(), DrawRegistrySelector(), and DrawVanillaPresetSelector().
|
private |
Definition at line 646 of file dungeon_map_panel.h.
Referenced by DrawDungeonSelector(), DrawRegistrySelector(), and SetHackManifest().
|
private |
Definition at line 647 of file dungeon_map_panel.h.
Referenced by ClearRooms(), Draw(), and LoadFromDungeonEntry().
|
private |
Definition at line 648 of file dungeon_map_panel.h.
Referenced by ClearRooms(), Draw(), and LoadFromDungeonEntry().
|
private |
Definition at line 649 of file dungeon_map_panel.h.
Referenced by DrawDungeonSelector(), DrawRegistrySelector(), and LoadFromDungeonEntry().