MCPcopy Create free account
hub / github.com/ArthurSonzogni/FTXUI / SetAnimationTarget

Method SetAnimationTarget

src/ftxui/component/button.cpp:80–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 void SetAnimationTarget(float target) {
81 if (animated_colors.foreground.enabled) {
82 animator_foreground_ = animation::Animator(
83 &animation_foreground_, target, animated_colors.foreground.duration,
84 animated_colors.foreground.function);
85 }
86 if (animated_colors.background.enabled) {
87 animator_background_ = animation::Animator(
88 &animation_background_, target, animated_colors.background.duration,
89 animated_colors.background.function);
90 }
91 }
92
93 void OnAnimation(animation::Params& p) override {
94 animator_background_.OnAnimation(p);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected