1 #ifndef _RIVE_EVENT_INPUT_CHANGE_BASE_HPP_
2 #define _RIVE_EVENT_INPUT_CHANGE_BASE_HPP_
3 #include "rive/core.hpp"
4 #include "rive/core/field_types/core_uint_type.hpp"
6 class EventInputChangeBase : public Core {
11 static const uint16_t typeKey = 116;
13 /// Helper to quickly determine if a core object extends another without RTTI
15 bool isTypeOf(uint16_t typeKey) const override {
17 case EventInputChangeBase::typeKey:
24 uint16_t coreType() const override { return typeKey; }
26 static const uint16_t inputIdPropertyKey = 227;
29 uint32_t m_InputId = -1;
32 inline uint32_t inputId() const { return m_InputId; }
33 void inputId(uint32_t value) {
34 if (m_InputId == value) {
41 void copy(const EventInputChangeBase& object) { m_InputId = object.m_InputId; }
43 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override {
44 switch (propertyKey) {
45 case inputIdPropertyKey:
46 m_InputId = CoreUintType::deserialize(reader);
53 virtual void inputIdChanged() {}