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