ftxui::AnimatedColorOption
cpp
#include <ftxui/component/component_options.hpp>Option about a potentially animated color.
Summary
| Symbol | Description |
|---|---|
enabled | |
inactive | |
active | |
duration | |
function | |
Set | A color option that can be animated. |
Public Attributes
enabled
cpp
bool enabled = false;Examples: component/menu_entries_animated
inactive
cpp
Color inactive;Examples: component/menu_entries_animated
active
cpp
Color active;Examples: component/menu_entries_animated
duration
cpp
animation::Duration duration = std::chrono::milliseconds(250);function
cpp
animation::easing::Function function = animation::easing::QuadraticInOut;Public Member Functions
Set
cpp
void Set(Color inactive, Color active, animation::Duration duration = std::chrono::milliseconds(250), animation::easing::Function function = animation::easing::QuadraticInOut);A color option that can be animated.
Parameters:
_inactive: The color when the component is inactive._active: The color when the component is active._duration: The duration of the animation._function: The easing function of the animation.