yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::PalettesetEditorPanel Class Reference

Dedicated panel for editing dungeon palette sets. More...

#include <paletteset_editor_panel.h>

Collaboration diagram for yaze::editor::PalettesetEditorPanel:

Public Member Functions

absl::Status Update ()
 
void SetRom (Rom *rom)
 
Romrom () const
 
void SetGameData (zelda3::GameData *data)
 
zelda3::GameDatagame_data () const
 

Private Member Functions

void DrawPalettesetList ()
 
void DrawPalettesetEditor ()
 
void DrawPalettePreview (gfx::SnesPalette &palette, const char *label)
 
void DrawPaletteGrid (gfx::SnesPalette &palette, bool editable=false)
 

Private Attributes

uint8_t selected_paletteset_ = 0
 
bool show_all_colors_ = false
 
Romrom_ = nullptr
 
zelda3::GameDatagame_data_ = nullptr
 

Detailed Description

Dedicated panel for editing dungeon palette sets.

A paletteset defines which palettes are used together in a dungeon room:

  • Dungeon Main: The primary background/tileset palette
  • Sprite Aux 1-3: Three auxiliary sprite palettes for enemies/NPCs

This panel allows viewing and editing these associations, providing a better UX than the combined GfxGroupEditor tab.

Definition at line 25 of file paletteset_editor_panel.h.

Member Function Documentation

◆ Update()

absl::Status yaze::editor::PalettesetEditorPanel::Update ( )

Definition at line 37 of file paletteset_editor_panel.cc.

References DrawPalettesetEditor(), DrawPalettesetList(), game_data(), ICON_MD_PALETTE, rom(), and show_all_colors_.

Here is the call graph for this function:

◆ SetRom()

void yaze::editor::PalettesetEditorPanel::SetRom ( Rom * rom)
inline

Definition at line 29 of file paletteset_editor_panel.h.

References rom(), and rom_.

Here is the call graph for this function:

◆ rom()

Rom * yaze::editor::PalettesetEditorPanel::rom ( ) const
inline

Definition at line 30 of file paletteset_editor_panel.h.

References rom_.

Referenced by DrawPalettesetEditor(), SetRom(), and Update().

◆ SetGameData()

void yaze::editor::PalettesetEditorPanel::SetGameData ( zelda3::GameData * data)
inline

Definition at line 31 of file paletteset_editor_panel.h.

References game_data_.

◆ game_data()

zelda3::GameData * yaze::editor::PalettesetEditorPanel::game_data ( ) const
inline

Definition at line 32 of file paletteset_editor_panel.h.

References game_data_.

Referenced by DrawPalettesetEditor(), and Update().

◆ DrawPalettesetList()

void yaze::editor::PalettesetEditorPanel::DrawPalettesetList ( )
private

Definition at line 72 of file paletteset_editor_panel.cc.

References selected_paletteset_.

Referenced by Update().

◆ DrawPalettesetEditor()

◆ DrawPalettePreview()

void yaze::editor::PalettesetEditorPanel::DrawPalettePreview ( gfx::SnesPalette & palette,
const char * label )
private

Definition at line 170 of file paletteset_editor_panel.cc.

References DrawPaletteGrid().

Referenced by DrawPalettesetEditor().

Here is the call graph for this function:

◆ DrawPaletteGrid()

void yaze::editor::PalettesetEditorPanel::DrawPaletteGrid ( gfx::SnesPalette & palette,
bool editable = false )
private

Definition at line 177 of file paletteset_editor_panel.cc.

References yaze::gfx::SnesPalette::empty(), show_all_colors_, yaze::gfx::SnesPalette::size(), and yaze::gui::SnesColorButton().

Referenced by DrawPalettePreview().

Here is the call graph for this function:

Member Data Documentation

◆ selected_paletteset_

uint8_t yaze::editor::PalettesetEditorPanel::selected_paletteset_ = 0
private

Definition at line 40 of file paletteset_editor_panel.h.

Referenced by DrawPalettesetEditor(), and DrawPalettesetList().

◆ show_all_colors_

bool yaze::editor::PalettesetEditorPanel::show_all_colors_ = false
private

Definition at line 41 of file paletteset_editor_panel.h.

Referenced by DrawPaletteGrid(), and Update().

◆ rom_

Rom* yaze::editor::PalettesetEditorPanel::rom_ = nullptr
private

Definition at line 43 of file paletteset_editor_panel.h.

Referenced by rom(), and SetRom().

◆ game_data_

zelda3::GameData* yaze::editor::PalettesetEditorPanel::game_data_ = nullptr
private

Definition at line 44 of file paletteset_editor_panel.h.

Referenced by game_data(), and SetGameData().


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