improve animation panel

This commit is contained in:
2019-10-19 22:30:44 +02:00
parent e25de3c454
commit 27576443ca
12 changed files with 120 additions and 25 deletions

View File

@@ -238,6 +238,12 @@ bool Layer::add_frame()
return m_frames.back().create(w, h);
}
void Layer::remove_frame(int frame)
{
m_frames.erase(m_frames.begin() + frame);
m_frame_index = glm::clamp(m_frame_index, 0, (int)m_frames.size() - 1);
}
int Layer::total_duration() const noexcept
{
int duration = 0;