yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
paletteset_editor_view.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_PALETTESET_EDITOR_VIEW_H_
2#define YAZE_APP_EDITOR_GRAPHICS_PALETTESET_EDITOR_VIEW_H_
3
4#include <cstdint>
5
6#include "absl/status/status.h"
10#include "rom/rom.h"
11#include "zelda3/game_data.h"
12
13namespace yaze {
14namespace editor {
15
28 public:
29 std::string GetId() const override { return "graphics.paletteset_editor"; }
30 std::string GetDisplayName() const override { return "Palettesets"; }
31 std::string GetIcon() const override { return ICON_MD_COLOR_LENS; }
32 std::string GetEditorCategory() const override { return "Graphics"; }
33 int GetPriority() const override { return 45; }
34 float GetPreferredWidth() const override { return 500.0f; }
35 void Draw(bool* p_open) override;
36 absl::Status Update();
37
38 void SetRom(Rom* rom) { rom_ = rom; }
39 Rom* rom() const { return rom_; }
40 void SetGameData(zelda3::GameData* data) { game_data_ = data; }
42
43 private:
44 void DrawPalettesetList();
46 void DrawPalettePreview(gfx::SnesPalette& palette, const char* label);
47 void DrawPaletteGrid(gfx::SnesPalette& palette, bool editable = false);
48
50 bool show_all_colors_ = false;
51
52 Rom* rom_ = nullptr;
54};
55
56} // namespace editor
57} // namespace yaze
58
59#endif // YAZE_APP_EDITOR_GRAPHICS_PALETTESET_EDITOR_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
Dedicated view for editing dungeon palette sets.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetIcon() const override
Material Design icon for this panel.
void DrawPaletteGrid(gfx::SnesPalette &palette, bool editable=false)
void SetGameData(zelda3::GameData *data)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetId() const override
Unique identifier for this panel.
int GetPriority() const override
Get display priority for menu ordering.
void Draw(bool *p_open) override
Draw the panel content.
void DrawPalettePreview(gfx::SnesPalette &palette, const char *label)
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
Base interface for all logical window content components.
Represents a palette of colors for the Super Nintendo Entertainment System (SNES).
#define ICON_MD_COLOR_LENS
Definition icons.h:440