Struct rmididings::proc::SceneSwitchOffset [−][src]
pub struct SceneSwitchOffset(pub SceneOffset);
Expand description
Change the current scene by the specified amount.
The argument is: scene_delta.
To go to the next scene, use SceneSwitchOffset(1)
,
to go to the previous scene, use SceneSwitchOffset(-1)
.
Note that the scene is only switched when there are events, so that when an event filter discards all events, the scene switch is not done. It also means that you need to generate an event when putting this in a pre, init, exit or post patch.
Examples
let generator = SceneSwitchOffset(1); let mut evs = EventStream::none(); generator.run(&mut evs); assert_eq!(evs, SceneSwitchOffsetEvent(1));
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SceneSwitchOffset
impl Send for SceneSwitchOffset
impl Sync for SceneSwitchOffset
impl Unpin for SceneSwitchOffset
impl UnwindSafe for SceneSwitchOffset