yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
palette_controls_view.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_PALETTE_CONTROLS_VIEW_H
2#define YAZE_APP_EDITOR_GRAPHICS_PALETTE_CONTROLS_VIEW_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 // ==========================================================================
29 // WindowContent Identity
30 // ==========================================================================
31
32 std::string GetId() const override { return "graphics.palette_controls"; }
33 std::string GetDisplayName() const override { return "Palette Controls"; }
34 std::string GetIcon() const override { return ICON_MD_PALETTE; }
35 std::string GetEditorCategory() const override { return "Graphics"; }
36 int GetPriority() const override { return 30; }
37 float GetPreferredWidth() const override { return 300.0f; }
38
39 // ==========================================================================
40 // WindowContent Lifecycle
41 // ==========================================================================
42
46 void Initialize();
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
83 void ApplyPaletteToSheet(uint16_t sheet_id);
84
89
93};
94
95} // namespace editor
96} // namespace yaze
97
98#endif // YAZE_APP_EDITOR_GRAPHICS_PALETTE_CONTROLS_VIEW_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.
View for managing palettes applied to graphics sheets.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
std::string GetId() const override
Unique identifier for this panel.
void DrawApplyButtons()
Draw apply buttons.
void ApplyPaletteToAllSheets()
Apply current palette to all active sheets.
PaletteControlsView(GraphicsEditorState *state, Rom *rom, zelda3::GameData *game_data=nullptr)
std::string GetIcon() const override
Material Design icon for this panel.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
int GetPriority() const override
Get display priority for menu ordering.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
void DrawPresets()
Draw quick preset buttons.
absl::Status Update()
Legacy Update method for backward compatibility.
void DrawPaletteDisplay()
Draw the current palette display.
void SetGameData(zelda3::GameData *game_data)
void DrawPaletteGroupSelector()
Draw palette group selection.
void ApplyPaletteToSheet(uint16_t sheet_id)
Apply current palette to specified sheet.
void Draw(bool *p_open) override
Draw the palette controls UI (WindowContent interface)
Base interface for all logical window content components.
#define ICON_MD_PALETTE
Definition icons.h:1370