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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.