yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
palette_controls_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_PALETTE_CONTROLS_PANEL_H
2#define YAZE_APP_EDITOR_GRAPHICS_PALETTE_CONTROLS_PANEL_H
3
4#include "absl/status/status.h"
8
9namespace yaze {
10namespace editor {
11
12// Shared by the pixel strip, the Palette Controls panel and the Sheet
13// Browser. kCurrentSheet previews one sheet; kAllSheets sets the browser
14// palette on every sheet.
18 GraphicsEditorState& state,
23
31 public:
32 explicit PaletteControlsPanel(GraphicsEditorState* state) : state_(state) {}
33
34 // ==========================================================================
35 // WindowContent Identity
36 // ==========================================================================
37
38 std::string GetId() const override { return "graphics.palette_controls"; }
39 std::string GetDisplayName() const override { return "Palette Controls"; }
40 std::string GetIcon() const override { return ICON_MD_PALETTE; }
41 std::string GetEditorCategory() const override { return "Graphics"; }
42 int GetPriority() const override { return 30; }
43
44 // ==========================================================================
45 // WindowContent Lifecycle
46 // ==========================================================================
47
51 void Draw(bool* p_open) override;
52
57 absl::Status Update();
58
59 private:
63 void DrawPresets();
64
69
73 void DrawPaletteDisplay();
74
78 void DrawApplyButtons();
79
81};
82
83} // namespace editor
84} // namespace yaze
85
86#endif // YAZE_APP_EDITOR_GRAPHICS_PALETTE_CONTROLS_PANEL_H
Shared state between GraphicsEditor panel components.
Panel for managing palettes applied to graphics sheets.
absl::Status Update()
Legacy Update method for backward compatibility.
void DrawPresets()
Draw quick preset buttons.
void Draw(bool *p_open) override
Draw the palette controls UI (WindowContent interface)
std::string GetIcon() const override
Material Design icon for this panel.
PaletteControlsPanel(GraphicsEditorState *state)
void DrawPaletteDisplay()
Draw the current palette display.
int GetPriority() const override
Get display priority for menu ordering.
void DrawPaletteGroupSelector()
Draw palette group selection.
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 GetEditorCategory() const override
Editor category this panel belongs to.
Base interface for all logical window content components.
#define ICON_MD_PALETTE
Definition icons.h:1370
void DrawGraphicsPreviewPaletteSelector(GraphicsEditorState &state, GraphicsPaletteSelectorLayout layout, GraphicsPaletteSelectorScope scope)