WindowContent for displaying room graphics blocks. More...
#include <room_graphics_content.h>

Classes | |
| struct | SheetPreviewMetadata |
Public Member Functions | |
| RoomGraphicsContent () | |
| RoomGraphicsContent (int *current_room_id, DungeonRoomStore *rooms, gfx::IRenderer *renderer=nullptr) | |
| void | SetCurrentPaletteGroup (const gfx::PaletteGroup &group) |
| Set the current palette group for graphics rendering. | |
| 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 | 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 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 | RefreshSheetPreviews (const zelda3::Room &room) |
Private Attributes | |
| int * | current_room_id_ = nullptr |
| DungeonRoomStore * | rooms_ = nullptr |
| gfx::IRenderer * | renderer_ = nullptr |
| gui::Canvas | room_gfx_canvas_ |
| std::array< gfx::Bitmap, 16 > | sheet_previews_ |
| std::array< SheetPreviewMetadata, 16 > | sheet_preview_metadata_ {} |
| std::array< uint8_t, 16 > | preview_block_ids_ {} |
| int | preview_room_id_ = -1 |
| bool | preview_cache_valid_ = false |
| bool | show_source_trace_ = false |
| gfx::PaletteGroup | current_palette_group_ |
| bool | palette_dirty_ = true |
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 room graphics blocks.
This panel shows the graphics blocks used by the current room, displaying a 2x8 grid of 128x32 graphics blocks.
Definition at line 32 of file room_graphics_content.h.
|
inline |
Definition at line 35 of file room_graphics_content.h.
|
inline |
Definition at line 39 of file room_graphics_content.h.
|
inline |
Set the current palette group for graphics rendering.
| group | The palette group from the current room |
Definition at line 50 of file room_graphics_content.h.
References current_palette_group_, and palette_dirty_.
Referenced by yaze::editor::DungeonEditorV2::Load(), and yaze::editor::DungeonEditorV2::OnRoomSelected().
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 59 of file room_graphics_content.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 60 of file room_graphics_content.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 61 of file room_graphics_content.h.
References ICON_MD_IMAGE.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 62 of file room_graphics_content.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::WindowContent.
Definition at line 63 of file room_graphics_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 64 of file room_graphics_content.h.
|
overridevirtual |
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 85 of file room_graphics_content.cc.
References yaze::gui::BeginCanvas(), yaze::gui::CanvasFrameOptions::canvas_size, current_room_id_, yaze::editor::CurrentDungeonWindowContext(), yaze::gui::BitmapPreviewOptions::dest_pos, yaze::gui::BitmapPreviewOptions::dest_size, yaze::gui::CanvasFrameOptions::draw_context_menu, yaze::gui::BitmapPreviewOptions::draw_context_menu, yaze::gui::CanvasFrameOptions::draw_grid, yaze::gui::BitmapPreviewOptions::draw_grid, yaze::gui::CanvasFrameOptions::draw_overlay, yaze::gui::BitmapPreviewOptions::draw_overlay, yaze::gui::DrawBitmapPreview(), yaze::gui::EndCanvas(), yaze::gui::BitmapPreviewOptions::ensure_texture, yaze::gfx::Arena::Get(), yaze::gui::GetOutlineVec4(), yaze::gui::GetTextSecondaryVec4(), yaze::gui::Canvas::global_scale(), ICON_MD_BUG_REPORT, yaze::gfx::Arena::ProcessTextureQueue(), RefreshSheetPreviews(), yaze::gui::CanvasFrameOptions::render_popups, yaze::gui::BitmapPreviewOptions::render_popups, renderer_, room_gfx_canvas_, rooms_, sheet_preview_metadata_, sheet_previews_, show_source_trace_, yaze::editor::DungeonRoomStore::size(), and yaze::gui::Canvas::zero_point().
|
private |
Definition at line 17 of file room_graphics_content.cc.
References yaze::zelda3::Room::bg1_buffer(), yaze::zelda3::Room::blocks(), yaze::zelda3::Room::get_gfx_buffer(), yaze::platform::GetSurfacePalette(), yaze::zelda3::Room::id(), yaze::gfx::kIndexed, palette_dirty_, preview_block_ids_, preview_cache_valid_, preview_room_id_, sheet_preview_metadata_, and sheet_previews_.
Referenced by Draw().
|
private |
Definition at line 87 of file room_graphics_content.h.
Referenced by Draw().
|
private |
Definition at line 88 of file room_graphics_content.h.
Referenced by Draw().
|
private |
Definition at line 89 of file room_graphics_content.h.
Referenced by Draw().
|
private |
Definition at line 90 of file room_graphics_content.h.
Referenced by Draw().
|
private |
Definition at line 91 of file room_graphics_content.h.
Referenced by Draw(), and RefreshSheetPreviews().
|
private |
Definition at line 92 of file room_graphics_content.h.
Referenced by Draw(), and RefreshSheetPreviews().
|
private |
Definition at line 93 of file room_graphics_content.h.
Referenced by RefreshSheetPreviews().
|
private |
Definition at line 94 of file room_graphics_content.h.
Referenced by RefreshSheetPreviews().
|
private |
Definition at line 95 of file room_graphics_content.h.
Referenced by RefreshSheetPreviews().
|
private |
Definition at line 96 of file room_graphics_content.h.
Referenced by Draw().
|
private |
Definition at line 99 of file room_graphics_content.h.
Referenced by SetCurrentPaletteGroup().
|
private |
Definition at line 100 of file room_graphics_content.h.
Referenced by RefreshSheetPreviews(), and SetCurrentPaletteGroup().