yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
sheet_browser_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_SHEET_BROWSER_PANEL_H
2#define YAZE_APP_EDITOR_GRAPHICS_SHEET_BROWSER_PANEL_H
3
4#include "absl/status/status.h"
10
11namespace yaze {
12namespace editor {
13
21 public:
22 explicit SheetBrowserPanel(GraphicsEditorState* state) : state_(state) {}
23
24 // ==========================================================================
25 // EditorPanel Identity
26 // ==========================================================================
27
28 std::string GetId() const override { return "graphics.sheet_browser_v2"; }
29 std::string GetDisplayName() const override { return "Sheet Browser"; }
30 std::string GetIcon() const override { return ICON_MD_VIEW_LIST; }
31 std::string GetEditorCategory() const override { return "Graphics"; }
32 int GetPriority() const override { return 10; }
33
34 // ==========================================================================
35 // EditorPanel Lifecycle
36 // ==========================================================================
37
41 void Initialize();
42
46 void Draw(bool* p_open) override;
47
52 absl::Status Update();
53
54 private:
58 void DrawSearchBar();
59
63 void DrawSheetGrid();
64
70 void DrawSheetThumbnail(int sheet_id, gfx::Bitmap& bitmap);
71
76
79
80 // Search/filter state
81 char search_buffer_[16] = {0};
82 int filter_min_ = 0;
83 int filter_max_ = 222;
84 bool show_only_modified_ = false;
85
86 // Grid layout
87 float thumbnail_scale_ = 2.0f;
88 int columns_ = 2;
89};
90
91} // namespace editor
92} // namespace yaze
93
94#endif // YAZE_APP_EDITOR_GRAPHICS_SHEET_BROWSER_PANEL_H
Base interface for all logical panel components.
Shared state between GraphicsEditor panel components.
EditorPanel for browsing and selecting graphics sheets.
void DrawBatchOperations()
Draw batch operation buttons.
int GetPriority() const override
Get display priority for menu ordering.
std::string GetIcon() const override
Material Design icon for this panel.
void Draw(bool *p_open) override
Draw the sheet browser UI.
std::string GetId() const override
Unique identifier for this panel.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
SheetBrowserPanel(GraphicsEditorState *state)
void DrawSearchBar()
Draw the search/filter bar.
void Initialize()
Initialize the panel.
void DrawSheetThumbnail(int sheet_id, gfx::Bitmap &bitmap)
Draw a single sheet thumbnail.
void DrawSheetGrid()
Draw the sheet grid view.
absl::Status Update()
Legacy Update method for backward compatibility.
Represents a bitmap image optimized for SNES ROM hacking.
Definition bitmap.h:67
Modern, robust canvas for drawing and manipulating graphics.
Definition canvas.h:150
#define ICON_MD_VIEW_LIST
Definition icons.h:2092