[][src]Struct kurinji::Kurinji

pub struct Kurinji { /* fields omitted */ }

Resource to access all Kurinji APIs

Implementations

impl Kurinji[src]

impl Kurinji[src]

pub fn push(&mut self, bindings: Bindings)[src]

Push bindings to stack

pub fn push_additive(&mut self, bindings: Bindings)[src]

Clones current bindings and pushes it with the new changes

pub fn pop(&mut self)[src]

Pop the current binding from stack

impl Kurinji[src]

pub fn get_bindings(&self) -> Bindings[src]

pub fn set_bindings(&mut self, bindings: Bindings)[src]

impl Kurinji[src]

pub const MAX_PLAYER_HANDLES: usize[src]

Max number of players that can be connected using gamepads

impl Kurinji[src]

pub fn get_event_phase(&self, action: &str) -> &EventPhase[src]

Returns in which event phase this action active will be true

pub fn set_event_phase(
    &mut self,
    action: &str,
    phase: EventPhase
) -> &mut Kurinji
[src]

Set on which event phase should action will be true. By default will be Phase::OnProgress

impl Kurinji[src]

pub fn get_action_strength(&self, action: &str) -> f32[src]

Provides strength of action in range 0.0 - 1.0. Useful when working actions that mapped to analog input eg. joystick

pub fn is_action_active(&self, action: &str) -> bool[src]

Is this action happening. Note* this depends on action event phase

pub fn set_dead_zone(&mut self, action: &str, value: f32) -> &mut Kurinji[src]

Set a dead zone threshold i.e. strenght will be 0.0 until threshold is met. The strength range 0.0 - 1.0 is now mapped to min_threshold - 1.0

Note* meaningful only for analog inputs like joystick, mouse move delta...etc

pub fn set_strength_curve_function(
    &mut self,
    action: &str,
    function: fn(_: f32) -> f32
) -> &mut Kurinji
[src]

Set a custom curve function that will be applied to actions strength.

impl Kurinji[src]

pub fn bind_gamepad_button_pressed(
    &mut self,
    pad_button: GamepadButtonType,
    action: &str
) -> &mut Kurinji
[src]

pub fn bind_gamepad_button_pressed_for_player(
    &mut self,
    player: usize,
    pad_button: GamepadButtonType,
    action: &str
) -> &mut Kurinji
[src]

pub fn unbind_gamepad_button_pressed(
    &mut self,
    pad_button: GamepadButtonType
) -> &mut Kurinji
[src]

pub fn unbind_gamepad_button_pressed_for_player(
    &mut self,
    player: usize,
    pad_button: GamepadButtonType
) -> &mut Kurinji
[src]

pub fn bind_gamepad_axis(
    &mut self,
    axis: GamepadAxis,
    action: &str
) -> &mut Kurinji
[src]

pub fn bind_gamepad_axis_for_player(
    &mut self,
    player: usize,
    axis: GamepadAxis,
    action: &str
) -> &mut Kurinji
[src]

pub fn unbind_gamepad_axis(&mut self, pad_axis: GamepadAxis) -> &mut Kurinji[src]

pub fn unbind_gamepad_axis_for_player(
    &mut self,
    player: usize,
    axis: GamepadAxis
) -> &mut Kurinji
[src]

impl Kurinji[src]

pub fn bind_keyboard_pressed(
    &mut self,
    code: KeyCode,
    action: &str
) -> &mut Kurinji
[src]

pub fn unbind_keyboard_pressed(&mut self, code: KeyCode) -> &mut Kurinji[src]

impl Kurinji[src]

pub fn bind_mouse_button_pressed(
    &mut self,
    code: MouseButton,
    action: &str
) -> &mut Kurinji
[src]

pub fn unbind_mouse_button_pressed(
    &mut self,
    button: MouseButton
) -> &mut Kurinji
[src]

pub fn bind_mouse_motion(
    &mut self,
    axis: MouseAxis,
    action: &str
) -> &mut Kurinji
[src]

pub fn unbind_mouse_motion(&mut self, axis: MouseAxis) -> &mut Kurinji[src]

impl Kurinji[src]

pub fn get_bindings_as_ron(&self) -> Result<String, String>[src]

pub fn set_bindings_with_ron(&mut self, ron: &str) -> &mut Kurinji[src]

pub fn get_bindings_as_json(&self) -> Result<String, String>[src]

pub fn set_bindings_with_json(&mut self, json: &str) -> &mut Kurinji[src]

Trait Implementations

impl Clone for Kurinji[src]

impl Default for Kurinji[src]

Auto Trait Implementations

impl RefUnwindSafe for Kurinji

impl Send for Kurinji

impl Sync for Kurinji

impl Unpin for Kurinji

impl UnwindSafe for Kurinji

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T> FromResources for T where
    T: Default

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: 'static + Send + Sync

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,