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. | |
| std::string | GetWorkflowGroup () const override |
| Optional workflow group for hack-centric actions. | |
| float | GetPreferredWidth () const override |
| Get preferred width for this panel (optional) | |
| void | SetRoomIntentCallback (std::function< void(int, RoomSelectionIntent)> callback) |
| void | SetRenderContextCallback (std::function< void(int)> callback) |
| void | SetCensusManifestProvider (RoomMatrixCensusOverlay::ManifestProvider provider) |
| RoomMatrixCensusOverlay & | census_overlay () |
| void | DetachRuntimeContext () |
| bool | OwnsNavigationShortcutFocus () const |
| 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 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 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 | DrawMatrixHeader (Rom *rom) |
| void | DrawCensusCellMarks (ImDrawList *draw_list, int room_id, const ImVec2 &cell_min, const ImVec2 &cell_max, bool matches_filter, const AgentUITheme &theme) 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) const |
Static Private Member Functions | |
| static std::string | NormalizeForSearch (const std::string &value) |
| static ImU32 | BlendRoomColor (ImU32 source, ImU32 target, float blend) |
Private Attributes | |
| std::function< void(int)> | prepare_render_context_ |
| 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_ |
| RoomCompositeOutput | tooltip_composite_output_ |
| RoomMatrixCensusOverlay | census_ |
| bool | navigation_shortcut_focus_ = false |
| int | navigation_shortcut_last_draw_frame_ = -1 |
| 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 49 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 58 of file room_matrix_content.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 72 of file room_matrix_content.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 73 of file room_matrix_content.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 74 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 75 of file room_matrix_content.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::WindowContent.
Definition at line 76 of file room_matrix_content.h.
|
inlineoverridevirtual |
Optional workflow group for hack-centric actions.
Reimplemented from yaze::editor::WindowContent.
Definition at line 77 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 78 of file room_matrix_content.h.
|
inline |
Definition at line 80 of file room_matrix_content.h.
References on_room_intent_.
|
inline |
Definition at line 85 of file room_matrix_content.h.
References prepare_render_context_.
Referenced by yaze::editor::DungeonEditorV2::Initialize().
|
inline |
Definition at line 90 of file room_matrix_content.h.
References census_, and yaze::editor::RoomMatrixCensusOverlay::SetManifestProvider().

|
inline |
Definition at line 94 of file room_matrix_content.h.
References census_.
Referenced by yaze::editor::DungeonEditorV2::InvalidateDungeonRenderContextCensus().
|
inline |
Definition at line 96 of file room_matrix_content.h.
References active_rooms_, census_, current_room_id_, navigation_shortcut_focus_, on_room_intent_, on_room_selected_, on_room_swap_, prepare_render_context_, yaze::editor::RoomMatrixCensusOverlay::SetEnabled(), yaze::editor::RoomMatrixCensusOverlay::SetManifestProvider(), and SetRooms().
Referenced by yaze::editor::DungeonEditorV2::PrepareForSessionTeardown().

|
inline |
Definition at line 108 of file room_matrix_content.h.
References navigation_shortcut_focus_, and navigation_shortcut_last_draw_frame_.
Referenced by yaze::editor::DungeonEditorV2::CanHandleDungeonNavigationShortcut().
|
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 119 of file room_matrix_content.h.
References active_rooms_, yaze::gui::AutoRegisterLastItem(), BlendRoomColor(), yaze::editor::RoomMatrixCensusOverlay::census(), census_, yaze::gui::CanvasMenuItem::Conditional(), yaze::gui::CopyToClipboardItem(), current_room_id_, DrawCensusCellMarks(), DrawMatrixHeader(), yaze::editor::RoomMatrixCensusOverlay::DrawTooltip(), yaze::editor::RoomMatrixCensusOverlay::enabled(), yaze::gfx::EnsureCompositeBitmapTextureQueued(), yaze::editor::RoomMatrixCensusOverlay::FillColor(), yaze::gfx::Arena::Get(), yaze::editor::DungeonRoomStore::GetIfLoaded(), GetRoomColor(), yaze::zelda3::GetRoomLabel(), yaze::editor::AgentUI::GetTheme(), ICON_MD_ARROW_FORWARD, ICON_MD_MY_LOCATION, ICON_MD_OPEN_IN_NEW, ICON_MD_SWAP_HORIZ, ICON_MD_TAB, yaze::gui::ItemContextMenu(), yaze::editor::kFocusInWorkbench, yaze::editor::kOpenStandalone, yaze::editor::RoomMatrixCensusOverlay::MatchesChips(), MatchesSearchFilter(), navigation_shortcut_focus_, navigation_shortcut_last_draw_frame_, on_room_intent_, on_room_selected_, on_room_swap_, prepare_render_context_, yaze::editor::PrepareCanonicalRoomComposite(), yaze::gfx::Arena::ProcessTextureQueue(), yaze::editor::DungeonRoomStore::rom(), rooms_, tooltip_composite_output_, and yaze::editor::RoomMatrixCensusOverlay::Update().
Referenced by yaze::editor::DungeonWorkbenchContent::DrawSidebarContent().
|
inline |
Definition at line 376 of file room_matrix_content.h.
References census_, yaze::editor::RoomMatrixCensusOverlay::Invalidate(), yaze::editor::RoomCompositeOutput::Retire(), rooms_, and tooltip_composite_output_.
Referenced by DetachRuntimeContext().

|
inlineprivate |
Definition at line 386 of file room_matrix_content.h.
References active_rooms_, yaze::gui::AutoRegisterLastItem(), census_, current_room_id_, yaze::editor::RoomMatrixCensusOverlay::DrawControls(), yaze::zelda3::GetRoomLabel(), GetRoomMetadata(), ICON_MD_CLOSE, ICON_MD_MORE_HORIZ, yaze::editor::DungeonRoomStore::LoadedCount(), rooms_, and search_filter_.
Referenced by Draw().
|
inlineprivate |
Definition at line 446 of file room_matrix_content.h.
References BlendRoomColor(), yaze::editor::RoomMatrixCensusOverlay::BlockHaloColor(), census_, yaze::editor::RoomMatrixCensusOverlay::InLargestFreeBlock(), yaze::editor::RoomMatrixCensusOverlay::IsOrphan(), yaze::editor::RoomMatrixCensusOverlay::OrphanMarkColor(), yaze::editor::AgentUITheme::panel_bg_darker, and yaze::editor::RoomMatrixCensusOverlay::StatusOutline().
Referenced by Draw().
|
inlineprivate |
Definition at line 481 of file room_matrix_content.h.
References yaze::zelda3::GetRoomLabel(), NormalizeForSearch(), and search_filter_.
Referenced by Draw().

|
inlinestaticprivate |
Definition at line 501 of file room_matrix_content.h.
Referenced by MatchesSearchFilter().
|
inlinestaticprivate |
Definition at line 510 of file room_matrix_content.h.
Referenced by Draw(), and DrawCensusCellMarks().
|
inlineprivate |
Definition at line 520 of file room_matrix_content.h.
References yaze::zelda3::Room::blockset(), yaze::editor::DungeonRoomStore::GetIfLoaded(), yaze::Rom::is_loaded(), yaze::editor::DungeonRoomStore::kRoomCount, yaze::zelda3::LoadRoomHeaderFromRom(), yaze::zelda3::Room::palette(), yaze::editor::DungeonRoomStore::rom(), and rooms_.
Referenced by DrawMatrixHeader().
|
inlineprivate |
Definition at line 546 of file room_matrix_content.h.
References yaze::gfx::PaletteGroupMap::dungeon_main, yaze::editor::DungeonRoomStore::game_data(), yaze::editor::DungeonRoomStore::GetIfLoaded(), yaze::Rom::is_loaded(), yaze::editor::DungeonRoomStore::kRoomCount, yaze::zelda3::LoadRoomHeaderFromRom(), yaze::zelda3::GameData::palette_groups, yaze::editor::AgentUITheme::panel_bg_color, yaze::editor::DungeonRoomStore::rom(), and rooms_.
Referenced by Draw().
|
private |
Definition at line 385 of file room_matrix_content.h.
Referenced by DetachRuntimeContext(), Draw(), and SetRenderContextCallback().
|
private |
Definition at line 570 of file room_matrix_content.h.
Referenced by DetachRuntimeContext(), Draw(), and DrawMatrixHeader().
|
private |
Definition at line 571 of file room_matrix_content.h.
Referenced by DetachRuntimeContext(), Draw(), and DrawMatrixHeader().
|
private |
Definition at line 572 of file room_matrix_content.h.
Referenced by Draw(), DrawMatrixHeader(), GetRoomColor(), GetRoomMetadata(), and SetRooms().
|
private |
Definition at line 573 of file room_matrix_content.h.
Referenced by DetachRuntimeContext(), and Draw().
|
private |
Definition at line 574 of file room_matrix_content.h.
Referenced by DetachRuntimeContext(), and Draw().
|
private |
Definition at line 575 of file room_matrix_content.h.
Referenced by DetachRuntimeContext(), Draw(), and SetRoomIntentCallback().
|
private |
Definition at line 576 of file room_matrix_content.h.
Referenced by Draw(), and SetRooms().
|
private |
Definition at line 577 of file room_matrix_content.h.
Referenced by census_overlay(), DetachRuntimeContext(), Draw(), DrawCensusCellMarks(), DrawMatrixHeader(), SetCensusManifestProvider(), and SetRooms().
|
private |
Definition at line 578 of file room_matrix_content.h.
Referenced by DetachRuntimeContext(), Draw(), and OwnsNavigationShortcutFocus().
|
private |
Definition at line 579 of file room_matrix_content.h.
Referenced by Draw(), and OwnsNavigationShortcutFocus().
|
private |
Definition at line 580 of file room_matrix_content.h.
Referenced by DrawMatrixHeader(), and MatchesSearchFilter().