add anim frames to sprite editor

This commit is contained in:
scawful
2024-07-13 11:19:14 -04:00
parent 6b50b25601
commit c589440e34
2 changed files with 17 additions and 5 deletions

View File

@@ -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