1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Formspec: Allow to specify frame loop for model[] (#10679)

Add the ability to specify an animation frame loop range for the model[] formspec element.
This commit is contained in:
Thomas--S 2020-12-15 19:06:36 +01:00 committed by GitHub
parent 3ed940ff13
commit d0a38f694d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 6 deletions

View file

@ -152,6 +152,15 @@ void GUIScene::setStyles(const std::array<StyleSpec, StyleSpec::NUM_STATES> &sty
setBackgroundColor(style.getColor(StyleSpec::BGCOLOR, m_bgcolor));
}
/**
* Sets the frame loop range for the mesh
*/
void GUIScene::setFrameLoop(s32 begin, s32 end)
{
if (m_mesh->getStartFrame() != begin || m_mesh->getEndFrame() != end)
m_mesh->setFrameLoop(begin, end);
}
/* Camera control functions */
inline void GUIScene::calcOptimalDistance()