diff --git a/src/app/editor/sprite_editor.cc b/src/app/editor/sprite_editor.cc index 1bb51325..0bbad94b 100644 --- a/src/app/editor/sprite_editor.cc +++ b/src/app/editor/sprite_editor.cc @@ -86,9 +86,7 @@ void SpriteEditor::DrawSpriteCanvas() { static bool flip_x = false; static bool flip_y = false; if (ImGui::BeginChild(gui::GetID("##SpriteCanvas"), - ImGui::GetContentRegionAvail(), true, - ImGuiWindowFlags_AlwaysVerticalScrollbar | - ImGuiWindowFlags_AlwaysHorizontalScrollbar)) { + ImGui::GetContentRegionAvail(), true)) { sprite_canvas_.DrawBackground(); sprite_canvas_.DrawContextMenu(); // sprite_canvas_.DrawBitmap(oam_bitmap_, 2, 2); @@ -137,6 +135,8 @@ void SpriteEditor::DrawSpriteCanvas() { ImGui::EndTable(); } + DrawAnimationFrames(); + ImGui::EndChild(); } } @@ -185,6 +185,15 @@ void SpriteEditor::DrawSpritesList() { } } +void SpriteEditor::DrawAnimationFrames() { + if (ImGui::Button("Add Frame")) { + // Add a new frame + } + if (ImGui::Button("Remove Frame")) { + // Remove the current frame + } +} + } // namespace editor } // namespace app } // namespace yaze \ No newline at end of file diff --git a/src/app/editor/sprite_editor.h b/src/app/editor/sprite_editor.h index ef5badfa..110c38aa 100644 --- a/src/app/editor/sprite_editor.h +++ b/src/app/editor/sprite_editor.h @@ -9,8 +9,6 @@ namespace yaze { namespace app { namespace editor { - - constexpr ImGuiTabItemFlags kSpriteTabFlags = ImGuiTabItemFlags_Trailing | ImGuiTabItemFlags_NoTooltip; @@ -56,6 +54,11 @@ class SpriteEditor : public SharedRom { */ void DrawCurrentSheets(); + /** + * @brief Draws the animation frames manager. + */ + void DrawAnimationFrames(); + ImVector active_sprites_; /**< Active sprites. */ int current_sprite_id_; /**< Current sprite ID. */