gets the normalized cursor of the animation on a node with flipbook animation * This is only useful nodes with flipbook animations. Gets the normalized cursor of the flipbook animation on a node. * * @name gui.get_flipbook_cursor * @param node [type:node] node to get the cursor for (node) * @return cursor [type:number] cursor value */
| 4543 | * @return cursor [type:number] cursor value |
| 4544 | */ |
| 4545 | static int LuaGetFlipbookCursor(lua_State* L) |
| 4546 | { |
| 4547 | DM_LUA_STACK_CHECK(L, 1); |
| 4548 | |
| 4549 | Scene* scene = GuiScriptInstance_Check(L); |
| 4550 | HNode node; |
| 4551 | LuaCheckNodeInternal(L, 1, &node); |
| 4552 | |
| 4553 | if (dmGui::GetNodeIsBone(scene, node)) |
| 4554 | { |
| 4555 | return DM_LUA_ERROR("cannot get cursor for bone"); |
| 4556 | } |
| 4557 | |
| 4558 | float cursor = dmGui::GetNodeFlipbookCursor(scene, node); |
| 4559 | lua_pushnumber(L, cursor); |
| 4560 | |
| 4561 | return 1; |
| 4562 | } |
| 4563 | |
| 4564 | /*# sets the normalized cursor of the animation on a node with flipbook animation |
| 4565 | * This is only useful nodes with flipbook animations. The cursor is normalized. |
nothing calls this directly
no test coverage detected