fix(UAT): listener with triggers work correctly (#10614) c42858eb74

Co-authored-by: hernan <hernan@rive.app>
This commit is contained in:
bodymovin
2025-09-18 01:39:15 +00:00
parent fcf74b0b1e
commit 37adde5d6b
3 changed files with 6 additions and 5 deletions

View File

@@ -1 +1 @@
665b84f01d5a9d6a940b37f62103c059e0958f22
c42858eb742d798ad6eec6004d9a94220aea796a

View File

@@ -13,10 +13,10 @@ private:
public:
DataValueInteger(uint32_t value) : m_value(value) {};
DataValueInteger() {};
static const DataType typeKey = DataType::trigger;
static const DataType typeKey = DataType::integer;
bool isTypeOf(DataType typeKey) const override
{
return typeKey == DataType::trigger;
return typeKey == DataType::integer;
}
uint32_t value() { return m_value; };
void value(uint32_t value) { m_value = value; };

View File

@@ -1,14 +1,15 @@
#include "rive/math/math_types.hpp"
#include "rive/data_bind/converters/data_converter_trigger.hpp"
#include "rive/data_bind/data_values/data_value_trigger.hpp"
#include "rive/data_bind/data_values/data_value_integer.hpp"
using namespace rive;
DataValue* DataConverterTrigger::convert(DataValue* input, DataBind* dataBind)
{
if (input->is<DataValueTrigger>())
if (input->is<DataValueInteger>())
{
uint32_t inputValue = input->as<DataValueTrigger>()->value();
uint32_t inputValue = input->as<DataValueInteger>()->value();
m_output.value(inputValue + 1);
}
else