1#ifndef YAZE_APP_EDITOR_PALETTE_EDITOR_H
2#define YAZE_APP_EDITOR_PALETTE_EDITOR_H
8#include "absl/status/status.h"
14#include "imgui/imgui.h"
20namespace palette_internal {
31 void RecordChange(
const std::string& group_name,
size_t palette_index,
39 {group_name, palette_index, color_index, original_color, new_color});
44 size_t color_index)
const {
46 if (change.group_name == group_name &&
47 change.palette_index == palette_index &&
48 change.color_index == color_index) {
49 return change.original_color;
87 absl::Status
Update()
override;
89 absl::Status
Cut()
override {
return absl::OkStatus(); }
90 absl::Status
Copy()
override {
return absl::OkStatus(); }
91 absl::Status
Paste()
override {
return absl::OkStatus(); }
92 absl::Status
Undo()
override {
return absl::OkStatus(); }
93 absl::Status
Redo()
override {
return absl::OkStatus(); }
94 absl::Status
Find()
override {
return absl::OkStatus(); }
A class to hold a shared pointer to a Rom object.
Interface for editor classes.
Manage graphics group configurations in a Rom.
Allows the user to view and edit in game palettes.
ImVec4 saved_palette_[256]
absl::Status ResetColorToOriginal(gfx::SnesPalette &palette, int index, const gfx::SnesPalette &originalPalette)
void DisplayCategoryTable()
absl::Status Update() override
absl::Status Cut() override
absl::Status Copy() override
GfxGroupEditor gfx_group_editor_
absl::Status Redo() override
absl::Status HandleColorPopup(gfx::SnesPalette &palette, int i, int j, int n)
gfx::SnesColor current_color_
void DrawModifiedColors()
std::vector< gfx::SnesColor > custom_palette_
absl::Status Find() override
absl::Status Paste() override
absl::Status EditColorInPalette(gfx::SnesPalette &palette, int index)
absl::Status DrawPaletteGroup(int category, bool right_side=false)
absl::Status Undo() override
palette_internal::PaletteEditorHistory history_
void RecordChange(const std::string &group_name, size_t palette_index, size_t color_index, const gfx::SnesColor &original_color, const gfx::SnesColor &new_color)
gfx::SnesColor RestoreOriginalColor(const std::string &group_name, size_t palette_index, size_t color_index) const
static const size_t kMaxHistorySize
gfx::SnesColor & GetOriginalColor(size_t index)
gfx::SnesColor & GetModifiedColor(size_t index)
const std::deque< PaletteChange > & GetRecentChanges() const
std::deque< PaletteChange > recent_changes_
Represents a palette of colors for the Super Nintendo Entertainment System (SNES).
absl::Status DisplayPalette(gfx::SnesPalette &palette, bool loaded)
gfx::SnesColor original_color