EditorPanel for browsing and selecting graphics sheets. More...
#include <sheet_browser_panel.h>


Public Member Functions | |
| SheetBrowserPanel (GraphicsEditorState *state) | |
| 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 | Initialize () |
| Initialize the panel. | |
| void | Draw (bool *p_open) override |
| Draw the sheet browser UI. | |
| absl::Status | Update () |
| Legacy Update method for backward compatibility. | |
Public Member Functions inherited from yaze::editor::EditorPanel | |
| virtual | ~EditorPanel ()=default |
| 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 PanelCategory | GetPanelCategory () const |
| Get the lifecycle category for this panel. | |
| 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 float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| 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. | |
Private Member Functions | |
| void | DrawSearchBar () |
| Draw the search/filter bar. | |
| void | DrawSheetGrid () |
| Draw the sheet grid view. | |
| void | DrawSheetThumbnail (int sheet_id, gfx::Bitmap &bitmap) |
| Draw a single sheet thumbnail. | |
| void | DrawBatchOperations () |
| Draw batch operation buttons. | |
Private Attributes | |
| GraphicsEditorState * | state_ |
| gui::Canvas | thumbnail_canvas_ |
| char | search_buffer_ [16] = {0} |
| int | filter_min_ = 0 |
| int | filter_max_ = 222 |
| bool | show_only_modified_ = false |
| float | thumbnail_scale_ = 2.0f |
| int | columns_ = 2 |
EditorPanel for browsing and selecting graphics sheets.
Displays a grid view of all 223 graphics sheets from the ROM. Supports single/multi-select, search/filter, and batch operations.
Definition at line 20 of file sheet_browser_panel.h.
|
inlineexplicit |
Definition at line 22 of file sheet_browser_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::EditorPanel.
Definition at line 28 of file sheet_browser_panel.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::EditorPanel.
Definition at line 29 of file sheet_browser_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::EditorPanel.
Definition at line 30 of file sheet_browser_panel.h.
References ICON_MD_VIEW_LIST.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::EditorPanel.
Definition at line 31 of file sheet_browser_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::EditorPanel.
Definition at line 32 of file sheet_browser_panel.h.
| void yaze::editor::SheetBrowserPanel::Initialize | ( | ) |
Initialize the panel.
Definition at line 15 of file sheet_browser_panel.cc.
References columns_, and thumbnail_scale_.
|
overridevirtual |
Draw the sheet browser UI.
Implements yaze::editor::EditorPanel.
Definition at line 21 of file sheet_browser_panel.cc.
References DrawBatchOperations(), DrawSearchBar(), and DrawSheetGrid().

| absl::Status yaze::editor::SheetBrowserPanel::Update | ( | ) |
Legacy Update method for backward compatibility.
Definition at line 30 of file sheet_browser_panel.cc.
References DrawBatchOperations(), DrawSearchBar(), and DrawSheetGrid().

|
private |
Draw the search/filter bar.
Definition at line 39 of file sheet_browser_panel.cc.
References filter_max_, filter_min_, HOVER_HINT, search_buffer_, yaze::editor::GraphicsEditorState::SelectSheet(), show_only_modified_, and state_.
Referenced by Draw(), and Update().

|
private |
Draw the sheet grid view.
Definition at line 91 of file sheet_browser_panel.cc.
References columns_, DrawSheetThumbnail(), filter_max_, filter_min_, yaze::gfx::Arena::Get(), yaze::gfx::Arena::gfx_sheets(), yaze::zelda3::kNumGfxSheets, yaze::editor::GraphicsEditorState::modified_sheets, show_only_modified_, state_, and thumbnail_scale_.
Referenced by Draw(), and Update().

|
private |
Draw a single sheet thumbnail.
| sheet_id | Sheet index (0-222) |
| bitmap | The bitmap to display |
Definition at line 132 of file sheet_browser_panel.cc.
References yaze::gui::Canvas::AddRectFilledAt(), yaze::gui::Canvas::AddTextAt(), yaze::gui::BeginCanvas(), yaze::gui::CanvasFrameOptions::canvas_size, yaze::gui::BitmapPreviewOptions::canvas_size, yaze::editor::GraphicsEditorState::current_sheet_id, yaze::gfx::Bitmap::depth(), 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::gui::CanvasFrameOptions::grid_step, yaze::gui::BitmapPreviewOptions::grid_step, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::editor::GraphicsEditorState::modified_sheets, yaze::editor::GraphicsEditorState::open_sheets, yaze::gui::CanvasFrameOptions::render_popups, yaze::gui::BitmapPreviewOptions::render_popups, yaze::editor::GraphicsEditorState::selected_sheets, yaze::editor::GraphicsEditorState::SelectSheet(), state_, thumbnail_canvas_, thumbnail_scale_, and yaze::gfx::Bitmap::width().
Referenced by DrawSheetGrid().
|
private |
Draw batch operation buttons.
Definition at line 69 of file sheet_browser_panel.cc.
References filter_max_, filter_min_, ICON_MD_DESELECT, ICON_MD_SELECT_ALL, yaze::editor::GraphicsEditorState::selected_sheets, state_, and thumbnail_scale_.
|
private |
Definition at line 77 of file sheet_browser_panel.h.
Referenced by DrawBatchOperations(), DrawSearchBar(), DrawSheetGrid(), and DrawSheetThumbnail().
|
private |
Definition at line 78 of file sheet_browser_panel.h.
Referenced by DrawSheetThumbnail().
|
private |
Definition at line 81 of file sheet_browser_panel.h.
Referenced by DrawSearchBar().
|
private |
Definition at line 82 of file sheet_browser_panel.h.
Referenced by DrawBatchOperations(), DrawSearchBar(), and DrawSheetGrid().
|
private |
Definition at line 83 of file sheet_browser_panel.h.
Referenced by DrawBatchOperations(), DrawSearchBar(), and DrawSheetGrid().
|
private |
Definition at line 84 of file sheet_browser_panel.h.
Referenced by DrawSearchBar(), and DrawSheetGrid().
|
private |
Definition at line 87 of file sheet_browser_panel.h.
Referenced by DrawBatchOperations(), DrawSheetGrid(), DrawSheetThumbnail(), and Initialize().
|
private |
Definition at line 88 of file sheet_browser_panel.h.
Referenced by DrawSheetGrid(), and Initialize().