1#ifndef YAZE_APP_EDITOR_DUNGEON_PANELS_OBJECT_TILE_EDITOR_PANEL_H_
2#define YAZE_APP_EDITOR_DUNGEON_PANELS_OBJECT_TILE_EDITOR_PANEL_H_
36 std::string
GetId()
const override {
return "dungeon.object_tile_editor"; }
43 void Draw(
bool* p_open)
override;
46 std::array<zelda3::Room, 0x128>* rooms);
48 int16_t object_id,
int room_id,
49 std::array<zelda3::Room, 0x128>* rooms);
57 std::function<
void(
int,
const std::string&)> cb) {
106 std::array<zelda3::Room, 0x128>*
rooms_ =
nullptr;
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.
Panel for editing the tile8 composition of dungeon objects.
void OpenForNewObject(int width, int height, const std::string &filename, int16_t object_id, int room_id, std::array< zelda3::Room, 0x128 > *rooms)
void ApplyChanges(bool confirm_shared=true)
void DrawTileProperties()
void SetCurrentPaletteGroup(const gfx::PaletteGroup &group)
int GetPriority() const override
Get display priority for menu ordering.
ObjectTileEditorPanel(gfx::IRenderer *renderer, Rom *rom)
gfx::PaletteGroup current_palette_group_
void SetObjectCreatedCallback(std::function< void(int, const std::string &)> cb)
std::unique_ptr< zelda3::ObjectTileEditor > tile_editor_
std::function< void(int, const std::string &) on_object_created_)
void RenderObjectPreview()
int16_t current_object_id_
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
gfx::Bitmap object_preview_bmp_
std::array< zelda3::Room, 0x128 > * rooms_
void HandleKeyboardShortcuts()
zelda3::ObjectTileLayout current_layout_
std::string GetIcon() const override
Material Design icon for this panel.
gfx::IRenderer * renderer_
int selected_source_tile_
void Draw(bool *p_open) override
Draw the panel content.
bool show_shared_confirm_
void OpenForObject(int16_t object_id, int room_id, std::array< zelda3::Room, 0x128 > *rooms)
gfx::Bitmap tile8_atlas_bmp_
gui::Canvas tile_grid_canvas_
gui::Canvas source_sheet_canvas_
std::string GetId() const override
Unique identifier for this panel.
Represents a bitmap image optimized for SNES ROM hacking.
Defines an abstract interface for all rendering operations.
Modern, robust canvas for drawing and manipulating graphics.
Represents a group of palettes.
Editable tile8 layout captured from an object's draw trace.