1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

Presenter: Add Presentation::has_a_[next,previous]_frame()

This commit is contained in:
Lucas CHOLLET 2023-01-15 23:09:33 -05:00 committed by Andreas Kling
parent 3ed9627f4e
commit 2372b3b8f9
2 changed files with 12 additions and 0 deletions

View file

@ -41,6 +41,16 @@ StringView Presentation::author() const
return "Unknown Author"sv;
}
bool Presentation::has_a_next_frame() const
{
return m_current_slide < u32(m_slides.size() > 1 ? m_slides.size() - 1 : 0);
}
bool Presentation::has_a_previous_frame() const
{
return m_current_slide > 0u;
}
void Presentation::next_frame()
{
m_current_frame_in_slide++;