mirror of
https://github.com/rive-app/rive-cpp.git
synced 2026-01-18 21:21:17 +01:00
fix(UAT): listener with triggers work correctly (#10614) c42858eb74
Co-authored-by: hernan <hernan@rive.app>
This commit is contained in:
@@ -1 +1 @@
|
||||
665b84f01d5a9d6a940b37f62103c059e0958f22
|
||||
c42858eb742d798ad6eec6004d9a94220aea796a
|
||||
|
||||
@@ -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; };
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user