Files
rive-cpp/include/rive/custom_property_trigger.hpp
philter 27e81b2a43 Support for Triggers in Custom property groups (#10322) 9af6af0361
Adds support for Triggers in Custom Property Groups. This will allow triggers to be keyframed, which can also be bound to ViewModel triggers. Currently an event has to be fired on the timeline in order to fire a ViewModel trigger via a listener.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-08 01:49:24 +00:00

21 lines
536 B
C++

#ifndef _RIVE_CUSTOM_PROPERTY_TRIGGER_HPP_
#define _RIVE_CUSTOM_PROPERTY_TRIGGER_HPP_
#include "rive/generated/custom_property_trigger_base.hpp"
#include "rive/resetting_component.hpp"
#include <stdio.h>
namespace rive
{
class CustomPropertyTrigger : public CustomPropertyTriggerBase,
public ResettingComponent
{
public:
void fire(const CallbackData& value) override
{
propertyValue(propertyValue() + 1);
}
void reset() override { propertyValue(0); }
};
} // namespace rive
#endif