WindowContent for displaying a visual 16x19 grid of all dungeon rooms. More...
#include <room_matrix_content.h>


Public Member Functions | |
| RoomMatrixContent (int *current_room_id, ImVector< int > *active_rooms, std::function< void(int)> on_room_selected, std::function< void(int, int)> on_room_swap=nullptr, DungeonRoomStore *rooms=nullptr) | |
| Construct a room matrix 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. | |
| float | GetPreferredWidth () const override |
| Get preferred width for this panel (optional) | |
| void | SetRoomIntentCallback (std::function< void(int, RoomSelectionIntent)> callback) |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
| void | SetRooms (DungeonRoomStore *rooms) |
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 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 | DrawMatrixSummary (const AgentUITheme &theme, int total_rooms) const |
| void | DrawMatrixLegend (const AgentUITheme &theme) const |
| void | DrawLegendSwatch (const ImVec4 &color, const char *label) const |
| bool | MatchesSearchFilter (int room_id) const |
| std::optional< std::pair< int, int > > | GetRoomMetadata (int room_id) const |
| ImU32 | GetRoomColor (int room_id, const AgentUITheme &theme) |
| Get color for a room from dominant preview color, with fallback. | |
Static Private Member Functions | |
| static std::string | NormalizeForSearch (const std::string &value) |
| static ImU32 | BlendRoomColor (ImU32 source, ImU32 target, float blend) |
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, int)> | on_room_swap_ |
| std::function< void(int, RoomSelectionIntent)> | on_room_intent_ |
| char | search_filter_ [64] = "" |
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 a visual 16x19 grid of all dungeon rooms.
This panel provides a compact overview of all 296 dungeon rooms in a matrix layout. Users can click on cells to select and open rooms.
Features:
Definition at line 41 of file room_matrix_content.h.
|
inline |
Construct a room matrix 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 | Optional pointer to room array for palette-based coloring |
Definition at line 50 of file room_matrix_content.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 64 of file room_matrix_content.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 65 of file room_matrix_content.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 66 of file room_matrix_content.h.
References ICON_MD_GRID_VIEW.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 67 of file room_matrix_content.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::WindowContent.
Definition at line 68 of file room_matrix_content.h.
|
inlineoverridevirtual |
Get preferred width for this panel (optional)
Override this to specify content-based sizing. For example, a tile selector with 8 tiles at 16px × 2.0 scale would return ~276px.
Reimplemented from yaze::editor::WindowContent.
Definition at line 69 of file room_matrix_content.h.
|
inline |
Definition at line 71 of file room_matrix_content.h.
References on_room_intent_.
|
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 80 of file room_matrix_content.h.
References active_rooms_, yaze::zelda3::RoomLayerManager::ApplyLayerMerging(), BlendRoomColor(), current_room_id_, DrawMatrixLegend(), DrawMatrixSummary(), yaze::editor::DungeonRoomStore::GetIfLoaded(), GetRoomColor(), yaze::zelda3::GetRoomLabel(), yaze::editor::AgentUI::GetTheme(), ICON_MD_CLOSE, ICON_MD_MY_LOCATION, ICON_MD_SEARCH, ICON_MD_TAB, yaze::editor::kFocusInWorkbench, yaze::editor::kOpenStandalone, MatchesSearchFilter(), on_room_intent_, on_room_selected_, on_room_swap_, rooms_, and search_filter_.
|
inline |
Definition at line 345 of file room_matrix_content.h.
References rooms_.
|
inlineprivate |
Definition at line 348 of file room_matrix_content.h.
References active_rooms_, current_room_id_, yaze::zelda3::GetRoomLabel(), GetRoomMetadata(), and yaze::editor::AgentUITheme::status_success.
Referenced by Draw().

|
inlineprivate |
Definition at line 371 of file room_matrix_content.h.
References DrawLegendSwatch(), yaze::editor::AgentUITheme::dungeon_grid_cell_border, yaze::editor::AgentUITheme::dungeon_grid_cell_selected, yaze::editor::AgentUITheme::dungeon_selection_primary, ICON_MD_GRID_VIEW, ICON_MD_MY_LOCATION, and ICON_MD_TAB.
Referenced by Draw().

|
inlineprivate |
Definition at line 382 of file room_matrix_content.h.
Referenced by DrawMatrixLegend().
|
inlineprivate |
Definition at line 396 of file room_matrix_content.h.
References yaze::zelda3::GetRoomLabel(), NormalizeForSearch(), and search_filter_.
Referenced by Draw().

|
inlinestaticprivate |
Definition at line 416 of file room_matrix_content.h.
Referenced by MatchesSearchFilter().
|
inlinestaticprivate |
Definition at line 425 of file room_matrix_content.h.
Referenced by Draw().
|
inlineprivate |
Definition at line 435 of file room_matrix_content.h.
References yaze::zelda3::Room::blockset(), yaze::editor::DungeonRoomStore::GetIfMaterialized(), yaze::Rom::is_loaded(), yaze::editor::DungeonRoomStore::kRoomCount, yaze::zelda3::LoadRoomHeaderFromRom(), yaze::zelda3::Room::palette(), yaze::editor::DungeonRoomStore::rom(), and rooms_.
Referenced by DrawMatrixSummary(), and GetRoomColor().
|
inlineprivate |
Get color for a room from dominant preview color, with fallback.
Definition at line 460 of file room_matrix_content.h.
References yaze::zelda3::RoomLayerManager::ApplyLayerMerging(), yaze::editor::AgentUITheme::dungeon_selection_primary, yaze::editor::DungeonRoomStore::GetIfLoaded(), GetRoomMetadata(), yaze::editor::AgentUITheme::panel_bg_color, yaze::editor::AgentUITheme::panel_bg_darker, and rooms_.
Referenced by Draw().

|
private |
Definition at line 581 of file room_matrix_content.h.
Referenced by Draw(), and DrawMatrixSummary().
|
private |
Definition at line 582 of file room_matrix_content.h.
Referenced by Draw(), and DrawMatrixSummary().
|
private |
Definition at line 583 of file room_matrix_content.h.
Referenced by Draw(), GetRoomColor(), GetRoomMetadata(), and SetRooms().
|
private |
Definition at line 584 of file room_matrix_content.h.
Referenced by Draw().
|
private |
Definition at line 585 of file room_matrix_content.h.
Referenced by Draw().
|
private |
Definition at line 586 of file room_matrix_content.h.
Referenced by Draw(), and SetRoomIntentCallback().
|
private |
Definition at line 587 of file room_matrix_content.h.
Referenced by Draw(), and MatchesSearchFilter().