1#ifndef YAZE_APP_EDITOR_GRAPHICS_GRAPHICS_EDITOR_STATE_H
2#define YAZE_APP_EDITOR_GRAPHICS_GRAPHICS_EDITOR_STATE_H
12#include "imgui/imgui.h"
150 void PushUndoState(uint16_t sheet_id,
const std::vector<uint8_t>& pixel_data,
156 undo_stack.push_back({sheet_id, pixel_data, palette});
239 default:
return "Unknown";
Shared state between GraphicsEditor panel components.
bool show_tile_boundaries
bool PopRedoState(PixelEditorSnapshot &out)
Pop and return the last redo state.
std::function< void(uint16_t)> on_sheet_modified
void MarkSheetModified(uint16_t sheet_id)
Mark a sheet as modified for save tracking.
static constexpr size_t kMaxUndoHistory
std::function< void()> on_tool_changed
void PushUndoState(uint16_t sheet_id, const std::vector< uint8_t > &pixel_data, const gfx::SnesPalette &palette)
Push current state to undo stack before modification.
uint8_t current_color_index
bool PopUndoState(PixelEditorSnapshot &out)
Pop and return the last undo state.
std::set< uint16_t > selected_sheets
bool show_pixel_info_tooltip
std::vector< PixelEditorSnapshot > redo_stack
bool show_transparency_grid
std::vector< PixelEditorSnapshot > undo_stack
void SetZoom(float zoom)
Set zoom level with clamping.
std::set< uint16_t > modified_sheets
std::function< void(uint16_t)> on_sheet_selected
bool show_cursor_crosshair
uint16_t current_sheet_id
std::set< uint16_t > open_sheets
const char * GetToolName() const
Get tool name for status display.
bool HasUnsavedChanges() const
Check if any sheets have unsaved changes.
void SelectSheet(uint16_t sheet_id)
Select a sheet for editing.
void CloseSheet(uint16_t sheet_id)
Close a sheet tab.
uint64_t sub_palette_index
void SetTool(PixelTool tool)
Set the current editing tool.
void ClearModifiedSheets()
Clear modification tracking (after save)
uint64_t palette_group_index
std::function< void()> on_palette_changed
Represents a palette of colors for the Super Nintendo Entertainment System (SNES).
PixelTool
Pixel editing tool types for the graphics editor.
Snapshot for undo/redo operations.
std::vector< uint8_t > pixel_data
bool operator==(const PixelEditorSnapshot &other) const
Selection data for copy/paste operations.
std::vector< uint8_t > pixel_data