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:
parent
3ed940ff13
commit
d0a38f694d
4 changed files with 31 additions and 6 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue