[−][src]Struct kurinji::Kurinji
Resource to access all Kurinji APIs
Implementations
impl Kurinji
[src]
pub fn get_bindings_from_json_file(path: &str) -> Bindings
[src]
pub fn get_bindings_from_ron_file(path: &str) -> Bindings
[src]
pub fn get_bindings_from_json(json: &str) -> Bindings
[src]
pub fn get_bindings_from_ron(ron: &str) -> Bindings
[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]
&mut self,
action: &str,
phase: EventPhase
) -> &mut Kurinji
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]
&mut self,
action: &str,
function: fn(_: f32) -> f32
) -> &mut Kurinji
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]
&mut self,
pad_button: GamepadButtonType,
action: &str
) -> &mut Kurinji
pub fn bind_gamepad_button_pressed_for_player(
&mut self,
player: usize,
pad_button: GamepadButtonType,
action: &str
) -> &mut Kurinji
[src]
&mut self,
player: usize,
pad_button: GamepadButtonType,
action: &str
) -> &mut Kurinji
pub fn unbind_gamepad_button_pressed(
&mut self,
pad_button: GamepadButtonType
) -> &mut Kurinji
[src]
&mut self,
pad_button: GamepadButtonType
) -> &mut Kurinji
pub fn unbind_gamepad_button_pressed_for_player(
&mut self,
player: usize,
pad_button: GamepadButtonType
) -> &mut Kurinji
[src]
&mut self,
player: usize,
pad_button: GamepadButtonType
) -> &mut Kurinji
pub fn bind_gamepad_axis(
&mut self,
axis: GamepadAxis,
action: &str
) -> &mut Kurinji
[src]
&mut self,
axis: GamepadAxis,
action: &str
) -> &mut Kurinji
pub fn bind_gamepad_axis_for_player(
&mut self,
player: usize,
axis: GamepadAxis,
action: &str
) -> &mut Kurinji
[src]
&mut self,
player: usize,
axis: GamepadAxis,
action: &str
) -> &mut Kurinji
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]
&mut self,
player: usize,
axis: GamepadAxis
) -> &mut Kurinji
impl Kurinji
[src]
pub fn bind_keyboard_pressed(
&mut self,
code: KeyCode,
action: &str
) -> &mut Kurinji
[src]
&mut self,
code: KeyCode,
action: &str
) -> &mut Kurinji
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]
&mut self,
code: MouseButton,
action: &str
) -> &mut Kurinji
pub fn unbind_mouse_button_pressed(
&mut self,
button: MouseButton
) -> &mut Kurinji
[src]
&mut self,
button: MouseButton
) -> &mut Kurinji
pub fn bind_mouse_motion(
&mut self,
axis: MouseAxis,
action: &str
) -> &mut Kurinji
[src]
&mut self,
axis: MouseAxis,
action: &str
) -> &mut Kurinji
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
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]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T> FromResources for T where
T: Default,
T: Default,
pub fn from_resources(_resources: &Resources) -> T
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,