rive_rs/animation/
transition_condition.rs

1// Copyright 2021 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use crate::core::{Core, ObjectRef, OnAdded, Property};
6
7#[derive(Debug, Default)]
8pub struct TransitionCondition {
9    input_id: Property<u64>,
10}
11
12impl ObjectRef<'_, TransitionCondition> {
13    pub fn input_id(&self) -> u64 {
14        self.input_id.get()
15    }
16
17    pub fn set_input_id(&self, input_id: u64) {
18        self.input_id.set(input_id);
19    }
20}
21
22impl Core for TransitionCondition {
23    properties![(155, input_id, set_input_id)];
24}
25
26impl OnAdded for ObjectRef<'_, TransitionCondition> {
27    on_added!();
28}