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_
 

Detailed Description

Allows the user to view and edit in game palettes.

Definition at line 77 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 86 of file palette_editor.h.

◆ Copy()

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

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

Definition at line 87 of file palette_editor.h.

◆ Paste()

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

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

Definition at line 88 of file palette_editor.h.

◆ Undo()

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

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

Definition at line 89 of file palette_editor.h.

◆ Redo()

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

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

Definition at line 90 of file palette_editor.h.

◆ Find()

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

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

Definition at line 91 of file palette_editor.h.

◆ DisplayCategoryTable()

◆ EditColorInPalette()

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

Definition at line 447 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 463 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 224 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 107 of file palette_editor.h.

Referenced by DisplayCategoryTable(), and Update().

◆ current_color_

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

Definition at line 108 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 110 of file palette_editor.h.

Referenced by Update().

◆ custom_palette_

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

Definition at line 112 of file palette_editor.h.

Referenced by DrawCustomPalette(), and PaletteEditor().

◆ saved_palette_

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

Definition at line 114 of file palette_editor.h.

◆ history_

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

Definition at line 116 of file palette_editor.h.

Referenced by DrawModifiedColors(), and HandleColorPopup().


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