yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::editor::PaletteEditor Class Reference

Allows the user to view and edit in game palettes. More...

#include <palette_editor.h>

Inheritance diagram for yaze::app::editor::PaletteEditor:
Collaboration diagram for yaze::app::editor::PaletteEditor:

Public Member Functions

 PaletteEditor ()
 
absl::Status Update () override
 
absl::Status Cut () override
 
absl::Status Copy () override
 
absl::Status Paste () override
 
absl::Status Undo () override
 
absl::Status Redo () override
 
absl::Status Find () override
 
void DisplayCategoryTable ()
 
absl::Status EditColorInPalette (gfx::SnesPalette &palette, int index)
 
absl::Status ResetColorToOriginal (gfx::SnesPalette &palette, int index, const gfx::SnesPalette &originalPalette)
 
absl::Status DrawPaletteGroup (int category, bool right_side=false)
 
void DrawCustomPalette ()
 
void DrawModifiedColors ()
 
- Public Member Functions inherited from yaze::app::SharedRom
 SharedRom ()=default
 
virtual ~SharedRom ()=default
 
std::shared_ptr< Romshared_rom ()
 
auto rom ()
 
- Public Member Functions inherited from yaze::app::editor::Editor
 Editor ()=default
 
virtual ~Editor ()=default
 
EditorType type () const
 

Private Member Functions

absl::Status HandleColorPopup (gfx::SnesPalette &palette, int i, int j, int n)
 

Private Attributes

absl::Status status_
 
gfx::SnesColor current_color_
 
GfxGroupEditor gfx_group_editor_
 
std::vector< gfx::SnesColorcustom_palette_
 
ImVec4 saved_palette_ [256] = {}
 
palette_internal::PaletteEditorHistory history_
 

Additional Inherited Members

- Static Public Attributes inherited from yaze::app::SharedRom
static std::shared_ptr< Romshared_rom_ = nullptr
 
- Protected Attributes inherited from yaze::app::editor::Editor
EditorType type_
 
EditorContext context_
 

Detailed Description

Allows the user to view and edit in game palettes.

Definition at line 80 of file palette_editor.h.

Constructor & Destructor Documentation

◆ PaletteEditor()

yaze::app::editor::PaletteEditor::PaletteEditor ( )
inline

Member Function Documentation

◆ Update()

◆ Cut()

absl::Status yaze::app::editor::PaletteEditor::Cut ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 89 of file palette_editor.h.

◆ Copy()

absl::Status yaze::app::editor::PaletteEditor::Copy ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 90 of file palette_editor.h.

◆ Paste()

absl::Status yaze::app::editor::PaletteEditor::Paste ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 91 of file palette_editor.h.

◆ Undo()

absl::Status yaze::app::editor::PaletteEditor::Undo ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 92 of file palette_editor.h.

◆ Redo()

absl::Status yaze::app::editor::PaletteEditor::Redo ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 93 of file palette_editor.h.

◆ Find()

absl::Status yaze::app::editor::PaletteEditor::Find ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 94 of file palette_editor.h.

◆ DisplayCategoryTable()

◆ EditColorInPalette()

absl::Status yaze::app::editor::PaletteEditor::EditColorInPalette ( gfx::SnesPalette & palette,
int index )

Definition at line 446 of file palette_editor.cc.

References ASSIGN_OR_RETURN, yaze::app::gfx::SnesPalette::GetColor(), and yaze::app::gfx::SnesPalette::size().

Here is the call graph for this function:

◆ ResetColorToOriginal()

absl::Status yaze::app::editor::PaletteEditor::ResetColorToOriginal ( gfx::SnesPalette & palette,
int index,
const gfx::SnesPalette & originalPalette )

Definition at line 462 of file palette_editor.cc.

References ASSIGN_OR_RETURN, yaze::app::gfx::SnesPalette::GetColor(), and yaze::app::gfx::SnesPalette::size().

Here is the call graph for this function:

◆ DrawPaletteGroup()

◆ DrawCustomPalette()

void yaze::app::editor::PaletteEditor::DrawCustomPalette ( )

Definition at line 223 of file palette_editor.cc.

References custom_palette_, and yaze::app::gui::SnesColorEdit4().

Referenced by Update().

Here is the call graph for this function:

◆ DrawModifiedColors()

◆ HandleColorPopup()

absl::Status yaze::app::editor::PaletteEditor::HandleColorPopup ( gfx::SnesPalette & palette,
int i,
int j,
int n )
private

Member Data Documentation

◆ status_

absl::Status yaze::app::editor::PaletteEditor::status_
private

Definition at line 110 of file palette_editor.h.

Referenced by DisplayCategoryTable(), and Update().

◆ current_color_

gfx::SnesColor yaze::app::editor::PaletteEditor::current_color_
private

Definition at line 111 of file palette_editor.h.

Referenced by DrawPaletteGroup(), and Update().

◆ gfx_group_editor_

GfxGroupEditor yaze::app::editor::PaletteEditor::gfx_group_editor_
private

Definition at line 113 of file palette_editor.h.

Referenced by Update().

◆ custom_palette_

std::vector<gfx::SnesColor> yaze::app::editor::PaletteEditor::custom_palette_
private

Definition at line 115 of file palette_editor.h.

Referenced by DrawCustomPalette(), and PaletteEditor().

◆ saved_palette_

ImVec4 yaze::app::editor::PaletteEditor::saved_palette_[256] = {}
private

Definition at line 117 of file palette_editor.h.

◆ history_

palette_internal::PaletteEditorHistory yaze::app::editor::PaletteEditor::history_
private

Definition at line 119 of file palette_editor.h.

Referenced by DrawModifiedColors(), and HandleColorPopup().


The documentation for this class was generated from the following files: