Manage graphics group configurations in a Rom. More...
#include <gfx_group_editor.h>

Public Member Functions | |
| absl::Status | Update () |
| void | DrawBlocksetViewer (bool sheet_only=false) |
| void | DrawRoomsetViewer () |
| void | DrawSpritesetViewer (bool sheet_only=false) |
| void | DrawPaletteControls () |
| void | SetSelectedBlockset (uint8_t blockset) |
| void | SetSelectedRoomset (uint8_t roomset) |
| void | SetSelectedSpriteset (uint8_t spriteset) |
| void | SetRom (Rom *rom) |
| Rom * | rom () const |
| void | SetGameData (zelda3::GameData *data) |
| zelda3::GameData * | game_data () const |
| void | SetWorkspaceState (GfxGroupWorkspaceState *state) |
| void | SetHostSurfaceHint (std::string hint) |
| const GfxGroupWorkspaceState & | workspace_state () const |
Private Member Functions | |
| void | UpdateCurrentPalette () |
| GfxGroupWorkspaceState & | Ws () |
| const GfxGroupWorkspaceState & | Ws () const |
Private Attributes | |
| GfxGroupWorkspaceState * | workspace_ = nullptr |
| GfxGroupWorkspaceState | fallback_ {} |
| std::array< gui::Canvas, 8 > | blockset_canvases_ |
| std::array< gui::Canvas, 4 > | roomset_canvases_ |
| std::array< gui::Canvas, 4 > | spriteset_canvases_ |
| Rom * | rom_ = nullptr |
| zelda3::GameData * | game_data_ = nullptr |
| gfx::SnesPalette * | current_palette_ = nullptr |
| std::string | host_surface_hint_ |
Manage graphics group configurations in a Rom.
Provides a UI for viewing and editing:
Features palette preview controls for viewing sheets with different palettes.
When SetWorkspaceState is set (typically from EditorSet), selection and preview palette UI fields are shared with other GfxGroupEditor instances for the same ROM session. Canvases remain per-instance.
Definition at line 32 of file gfx_group_editor.h.
| absl::Status yaze::editor::GfxGroupEditor::Update | ( | ) |
Definition at line 83 of file gfx_group_editor.cc.
References yaze::gui::BeginThemedTabBar(), DrawBlocksetViewer(), DrawPaletteControls(), DrawRoomsetViewer(), DrawSpritesetViewer(), yaze::gui::EndThemedTabBar(), host_surface_hint_, yaze::gui::InputHexByte(), yaze::Rom::resource_label(), rom(), yaze::project::ResourceLabelManager::SelectableLabelWithNameEdit(), and Ws().
Referenced by yaze::editor::OverworldCanvasRenderer::DrawOverworldProperties(), and yaze::editor::OverworldEditor::UpdateGfxGroupEditor().
| void yaze::editor::GfxGroupEditor::DrawBlocksetViewer | ( | bool | sheet_only = false | ) |
Definition at line 130 of file gfx_group_editor.cc.
References blockset_canvases_, current_palette_, game_data(), yaze::gfx::Arena::Get(), yaze::gui::LayoutHelpers::GetSliderWidth(), yaze::gui::InputHexByte(), yaze::zelda3::GameData::main_blockset_ids, yaze::gfx::Arena::mutable_gfx_sheets(), yaze::gfx::Arena::NotifySheetModified(), and Ws().
Referenced by Update().
| void yaze::editor::GfxGroupEditor::DrawRoomsetViewer | ( | ) |
Definition at line 187 of file gfx_group_editor.cc.
References current_palette_, game_data(), yaze::gfx::Arena::Get(), yaze::gui::LayoutHelpers::GetSliderWidth(), yaze::gui::InputHexByte(), yaze::gfx::Arena::mutable_gfx_sheets(), yaze::gfx::Arena::NotifySheetModified(), yaze::zelda3::GameData::room_blockset_ids, roomset_canvases_, and Ws().
Referenced by Update().
| void yaze::editor::GfxGroupEditor::DrawSpritesetViewer | ( | bool | sheet_only = false | ) |
Definition at line 260 of file gfx_group_editor.cc.
References current_palette_, game_data(), yaze::gfx::Arena::Get(), yaze::gui::LayoutHelpers::GetSliderWidth(), yaze::gui::InputHexByte(), yaze::gfx::Arena::mutable_gfx_sheets(), yaze::gfx::Arena::NotifySheetModified(), spriteset_canvases_, yaze::zelda3::GameData::spriteset_ids, and Ws().
Referenced by Update().
| void yaze::editor::GfxGroupEditor::DrawPaletteControls | ( | ) |
Definition at line 342 of file gfx_group_editor.cc.
References current_palette_, yaze::gfx::SnesPalette::empty(), game_data(), yaze::gui::LayoutHelpers::GetComboWidth(), yaze::gui::LayoutHelpers::GetHexInputWidth(), yaze::gui::LayoutHelpers::GetSliderWidth(), ICON_MD_PALETTE, ICON_MD_ZOOM_IN, yaze::gui::InputHexByte(), UpdateCurrentPalette(), and Ws().
Referenced by Update().
|
inline |
Definition at line 41 of file gfx_group_editor.h.
References yaze::editor::GfxGroupWorkspaceState::selected_blockset, and Ws().

|
inline |
Definition at line 44 of file gfx_group_editor.h.
References yaze::editor::GfxGroupWorkspaceState::selected_roomset, and Ws().

|
inline |
Definition at line 45 of file gfx_group_editor.h.
References yaze::editor::GfxGroupWorkspaceState::selected_spriteset, and Ws().

|
inline |
Definition at line 48 of file gfx_group_editor.h.
Referenced by yaze::editor::OverworldEditor::OverworldEditor().

|
inline |
Definition at line 49 of file gfx_group_editor.h.
References rom_.
|
inline |
Definition at line 50 of file gfx_group_editor.h.
References game_data_.
Referenced by yaze::editor::OverworldEditor::SetGameData().
|
inline |
Definition at line 51 of file gfx_group_editor.h.
References game_data_.
Referenced by DrawBlocksetViewer(), DrawPaletteControls(), DrawRoomsetViewer(), DrawSpritesetViewer(), and UpdateCurrentPalette().
|
inline |
Definition at line 53 of file gfx_group_editor.h.
References workspace_.
Referenced by yaze::editor::OverworldEditor::SetDependencies().
|
inline |
Subdued line at top of the panel (per-surface messaging).
Definition at line 56 of file gfx_group_editor.h.
References host_surface_hint_.
Referenced by yaze::editor::OverworldEditor::Initialize().
|
inline |
Definition at line 60 of file gfx_group_editor.h.
References Ws().

|
private |
Definition at line 401 of file gfx_group_editor.cc.
References current_palette_, game_data(), yaze::zelda3::GameData::palette_groups, and Ws().
Referenced by DrawPaletteControls().

|
inlineprivate |
Definition at line 65 of file gfx_group_editor.h.
References fallback_, and workspace_.
Referenced by DrawBlocksetViewer(), DrawPaletteControls(), DrawRoomsetViewer(), DrawSpritesetViewer(), SetSelectedBlockset(), SetSelectedRoomset(), SetSelectedSpriteset(), Update(), UpdateCurrentPalette(), and workspace_state().
|
inlineprivate |
Definition at line 66 of file gfx_group_editor.h.
References fallback_, and workspace_.
|
private |
Definition at line 70 of file gfx_group_editor.h.
Referenced by SetWorkspaceState(), Ws(), and Ws().
|
private |
Definition at line 71 of file gfx_group_editor.h.
|
private |
Definition at line 74 of file gfx_group_editor.h.
Referenced by DrawBlocksetViewer().
|
private |
Definition at line 75 of file gfx_group_editor.h.
Referenced by DrawRoomsetViewer().
|
private |
Definition at line 76 of file gfx_group_editor.h.
Referenced by DrawSpritesetViewer().
|
private |
Definition at line 78 of file gfx_group_editor.h.
|
private |
Definition at line 79 of file gfx_group_editor.h.
Referenced by game_data(), and SetGameData().
|
private |
Definition at line 80 of file gfx_group_editor.h.
Referenced by DrawBlocksetViewer(), DrawPaletteControls(), DrawRoomsetViewer(), DrawSpritesetViewer(), and UpdateCurrentPalette().
|
private |
Definition at line 81 of file gfx_group_editor.h.
Referenced by SetHostSurfaceHint(), and Update().