1#ifndef YAZE_APP_EDITOR_GRAPHICS_LINK_SPRITE_PANEL_H
2#define YAZE_APP_EDITOR_GRAPHICS_LINK_SPRITE_PANEL_H
7#include "absl/status/status.h"
51 std::string
GetId()
const override {
return "graphics.link_sprite"; }
69 void Draw(
bool* p_open)
override;
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Base interface for all logical panel components.
Shared state between GraphicsEditor panel components.
Dedicated panel for editing Link's 14 graphics sheets.
static constexpr float kThumbnailPadding
PaletteType
Link sprite palette types.
bool has_unsaved_changes_
absl::Status LoadLinkSheets()
Load Link graphics sheets from ROM.
void Draw(bool *p_open) override
Draw the panel UI (EditorPanel interface)
void Initialize()
Initialize the panel and load Link sheets.
PaletteType selected_palette_
void OpenSheetInPixelEditor()
Open selected sheet in the main pixel editor.
absl::Status Update()
Legacy Update method for backward compatibility.
std::optional< gfx::ZsprData > loaded_zspr_
void ApplySelectedPalette()
Apply the selected palette to Link sheets for display.
bool HasUnsavedChanges() const
Check if the panel has unsaved changes.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetIcon() const override
Material Design icon for this panel.
void ImportZspr()
Handle ZSPR file import.
int GetPriority() const override
Get display priority for menu ordering.
GraphicsEditorState * state_
void DrawSheetGrid()
Draw the 4x4 sheet selection grid.
static constexpr int kNumLinkSheets
void DrawPreviewCanvas()
Draw the preview canvas for selected sheet.
void DrawInfoPanel()
Draw info panel with stats.
gui::Canvas preview_canvas_
static const char * GetPaletteName(PaletteType type)
Get the name of a palette type.
void DrawPaletteSelector()
Draw the palette selector dropdown.
std::array< gfx::Bitmap, kNumLinkSheets > link_sheets_
LinkSpritePanel(GraphicsEditorState *state, Rom *rom)
void DrawToolbar()
Draw the toolbar with Import/Reset buttons.
void ResetToVanilla()
Reset Link sheets to vanilla ROM data.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
void DrawSheetThumbnail(int sheet_index)
Draw a single Link sheet thumbnail.
static constexpr float kThumbnailSize
std::string GetId() const override
Unique identifier for this panel.
Modern, robust canvas for drawing and manipulating graphics.