MCPcopy Create free account
hub / github.com/defold/defold / MyAnimationComplete

Function MyAnimationComplete

engine/gui/src/test/test_gui.cpp:1196–1207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1194
1195uint32_t MyAnimationCompleteCount = 0;
1196void MyAnimationComplete(dmGui::HScene scene,
1197 dmGui::HNode node,
1198 bool finished,
1199 void* userdata1,
1200 void* userdata2)
1201{
1202 MyAnimationCompleteCount++;
1203 dmhash_t property = dmGui::GetPropertyHash(dmGui::PROPERTY_POSITION);
1204 dmGui::AnimateNodeHash(scene, node, property, Vector4(2,0,0,0), dmEasing::Curve(dmEasing::TYPE_LINEAR), dmGui::PLAYBACK_ONCE_FORWARD, 1.0f, 0, 0, 0, 0);
1205 // Check that we reached target position
1206 *(Point3*)userdata2 = dmGui::GetNodePosition(scene, node);
1207}
1208
1209TEST_F(dmGuiTest, AnimateComplete)
1210{

Callers

nothing calls this directly

Calls 5

CurveClass · 0.85
GetPropertyHashFunction · 0.50
AnimateNodeHashFunction · 0.50
Vector4Class · 0.50
GetNodePositionFunction · 0.50

Tested by

no test coverage detected