ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
ZenitUI::AnimationPlayer Struct Reference

Per-node animation state and operations. More...

#include <AnimationPlayer.hpp>

Classes

struct  State

Public Member Functions

void addImperative (const std::string &name, std::shared_ptr< UIAnimation > anim)
void play (Layout &node, const std::string &name, bool reverse)
 Start (or restart) the imperative animation named name.
bool hasActive (const Layout &node) const
 true if this node or any descendant has an active animation.
bool tickImperative (Layout &node, float dt)
 Advance imperative animations by dt seconds.
void addCss (const std::string &name, double startTime)
void stopCss (const std::string &name)
bool hasCss () const noexcept
void overlayCssComputed (ComputedStyle &out, const Theme &theme) const
void syncCss (Layout &node)
 Sync css with node.style_.targetStyle.animations.
void tickCss (Layout &node, float dt)
 Advance CSS animations by dt seconds.
void applyCssToPart (Layout &node, const std::string &partName, Style &out)
 Resolve and overlay CSS animations for pseudo-element partName.
bool hasActivePartAnims () const
 true if any part is currently animating.
bool hasActiveLocal () const
 true if this node itself (not descendants) has any active animation.
bool hasActiveImperative () const
 true if any imperative animation is currently playing.

Detailed Description

Per-node animation state and operations.

Fields are public by design: Layout and Render.cpp read and write them directly in hot paths.

Member Function Documentation

◆ tickImperative()

bool ZenitUI::AnimationPlayer::tickImperative ( Layout & node,
float dt )

Advance imperative animations by dt seconds.

Returns
true if any active animation has blocksInput set.

The documentation for this struct was generated from the following file: