|
psychic-ui 0.0.0
|
#include <Properties.hpp>
Public Member Functions | |
| Transition (std::initializer_list< Property > properties, Timing timing) | |
| Transition & | add (const PropertyMask &properties, const Timing &timing) |
| const Timing * | timing (Property property) const |
| PropertyMask | properties () const |
| bool | empty () const |
| bool | operator== (const Transition &) const =default |
Static Public Attributes | |
| static constexpr std::size_t | capacity = 4 |
The transition style property: which properties blend from their old value to their new one when it changes, and with what timing, like CSS's transition. A few timings, each for a set of properties:
manager->style("Button")
.transition({Property::backgroundColor, Property::borderColor}, Timing{100ms})
.transition(Property::outlineColor, Timing{150ms, Ease::Out});
Like CSS's, it cascades as a whole: the rule that wins sets every transition of the div, the others' don't add to it. Only animatable properties (see PSYCHIC_UI_STYLE_PROPERTIES) blend; the others change at once.
| Transition & psychic_ui::Transition::add | ( | const PropertyMask & | properties, |
| const Timing & | timing ) |
These properties blend with this timing (replacing their earlier timing). Throws std::length_error past capacity timings.
|
nodiscard |
The properties with a timing
The timing of a property, nullptr when it doesn't transition
|
staticconstexpr |
How many different timings one transition holds