Skip to content
You are viewing documentation for v7.0.2. Switch to latest (main).

ftxui::AnimatedColorOption ​

cpp
#include <ftxui/component/component_options.hpp>

Option about a potentially animated color.

Summary ​

SymbolDescription
enabled
inactive
active
duration
function
SetA 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.