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#include "rom/rom.h"
9#include "zelda3/game_data.h"
10
11namespace yaze {
12namespace editor {
13
21 public:
23 zelda3::GameData* game_data = nullptr)
24 : state_(state), rom_(rom), game_data_(game_data) {}
25
26 void SetGameData(zelda3::GameData* game_data) { game_data_ = game_data; }
27
28 void SetRom(Rom* rom) { rom_ = rom; }
29
30 // ==========================================================================
31 // WindowContent Identity
32 // ==========================================================================
33
34 std::string GetId() const override { return "graphics.palette_controls"; }
35 std::string GetDisplayName() const override { return "Palette Controls"; }
36 std::string GetIcon() const override { return ICON_MD_PALETTE; }
37 std::string GetEditorCategory() const override { return "Graphics"; }
38 int GetPriority() const override { return 30; }
39
40 // ==========================================================================
41 // WindowContent Lifecycle
42 // ==========================================================================
43
47 void Initialize();
48
52 void Draw(bool* p_open) override;
53
58 absl::Status Update();
59
60 private:
64 void DrawPresets();
65
70
74 void DrawPaletteDisplay();
75
79 void DrawApplyButtons();
80
84 void ApplyPaletteToSheet(uint16_t sheet_id);
85
90
94};
95
96} // namespace editor
97} // namespace yaze
98
99#endif // YAZE_APP_EDITOR_GRAPHICS_PALETTE_CONTROLS_PANEL_H
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:28
Shared state between GraphicsEditor panel components.
Panel for managing palettes applied to graphics sheets.
PaletteControlsPanel(GraphicsEditorState *state, Rom *rom, zelda3::GameData *game_data=nullptr)
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.
void ApplyPaletteToSheet(uint16_t sheet_id)
Apply current palette to specified sheet.
void DrawPaletteDisplay()
Draw the current palette display.
void SetGameData(zelda3::GameData *game_data)
int GetPriority() const override
Get display priority for menu ordering.
void ApplyPaletteToAllSheets()
Apply current palette to all active sheets.
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