yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
sheet_browser_view.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_SHEET_BROWSER_VIEW_H
2#define YAZE_APP_EDITOR_GRAPHICS_SHEET_BROWSER_VIEW_H
3
4#include "absl/status/status.h"
10
11namespace yaze {
12namespace editor {
13
21 public:
22 explicit SheetBrowserView(GraphicsEditorState* state) : state_(state) {}
23
24 // ==========================================================================
25 // WindowContent 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 bool IsVisibleByDefault() const override { return true; }
34 float GetPreferredWidth() const override { return 350.0f; }
35
36 // ==========================================================================
37 // WindowContent Lifecycle
38 // ==========================================================================
39
43 void Initialize();
44
48 void Draw(bool* p_open) override;
49
54 absl::Status Update();
55
56 private:
60 void DrawSearchBar();
61
65 void DrawSheetGrid();
66
72 void DrawSheetThumbnail(int sheet_id, gfx::Bitmap& bitmap);
73
78
81
82 // Search/filter state
83 char search_buffer_[16] = {0};
84 int filter_min_ = 0;
85 int filter_max_ = 222;
86 bool show_only_modified_ = false;
87
88 // Grid layout
89 float thumbnail_scale_ = 2.0f;
90 int columns_ = 2;
91};
92
93} // namespace editor
94} // namespace yaze
95
96#endif // YAZE_APP_EDITOR_GRAPHICS_SHEET_BROWSER_VIEW_H
Shared state between GraphicsEditor panel components.
WindowContent for browsing and selecting graphics sheets.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
absl::Status Update()
Legacy Update method for backward compatibility.
std::string GetIcon() const override
Material Design icon for this panel.
void Initialize()
Initialize the view.
SheetBrowserView(GraphicsEditorState *state)
int GetPriority() const override
Get display priority for menu ordering.
void Draw(bool *p_open) override
Draw the sheet browser UI.
void DrawBatchOperations()
Draw batch operation buttons.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
bool IsVisibleByDefault() const override
Whether this panel should be visible by default.
void DrawSheetGrid()
Draw the sheet grid view.
void DrawSheetThumbnail(int sheet_id, gfx::Bitmap &bitmap)
Draw a single sheet thumbnail.
std::string GetId() const override
Unique identifier for this panel.
void DrawSearchBar()
Draw the search/filter bar.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
Base interface for all logical window content components.
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