1 #ifndef _RIVE_TRANSITION_VALUE_CONDITION_BASE_HPP_
2 #define _RIVE_TRANSITION_VALUE_CONDITION_BASE_HPP_
3 #include "animation/transition_condition.hpp"
4 #include "core/field_types/core_uint_type.hpp"
7 class TransitionValueConditionBase : public TransitionCondition
10 typedef TransitionCondition Super;
13 static const uint16_t typeKey = 69;
15 /// Helper to quickly determine if a core object extends another without
17 bool isTypeOf(uint16_t typeKey) const override
21 case TransitionValueConditionBase::typeKey:
22 case TransitionConditionBase::typeKey:
29 uint16_t coreType() const override { return typeKey; }
31 static const uint16_t opValuePropertyKey = 156;
36 inline int opValue() const { return m_OpValue; }
37 void opValue(int value)
39 if (m_OpValue == value)
47 void copy(const TransitionValueConditionBase& object)
49 m_OpValue = object.m_OpValue;
50 TransitionCondition::copy(object);
53 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
57 case opValuePropertyKey:
58 m_OpValue = CoreUintType::deserialize(reader);
61 return TransitionCondition::deserialize(propertyKey, reader);
65 virtual void opValueChanged() {}