pub fn map_axis2button( &mut self, input_id: InputID, left: Clickable, right: Clickable, deadzone: f32 )
	{
		let input = self.input_mut( input_id );

		let act   = Axis2Button{ left: left, right: right, deadzone: deadzone };
		let trig  = Trigger::OnChange( Box::new( act ) );

		input.add_trigger( trig );
	}
// This allows to connect a thumb stick to 4 buttons, for example movement with keys adws
// We couple 2 buttons to one axis, eg. a and d on the X-axis. A will be held down while
// the stick is to the left, D will be held down when the stick is to the right.
//
//
This allows to connect a thumb stick to 4 buttons, for example movement with keys adws
We couple 2 buttons to one axis, eg. a and d on the X-axis. A will be held down while
the stick is to the left, D will be held down when the stick is to the right.
This allows to connect a thumb stick to 4 buttons for example movement with keys adws We couple 2 buttons to one axis eg . a and d on the X - axis . A will be held down while the stick is to the left D will be held down when the stick is to the right .
pub fn map_axis2button( &mut self, input_id: InputID, left: Clickable, right: Clickable, deadzone: f32 )
	{
		let input = self.input_mut( input_id );
		let act   = Axis2Button{ left: left, right: right, deadzone: deadzone };
		let trig  = Trigger::OnChange( Box::new( act ) );
		input.add_trigger( trig );
	}
pub fn map_axis2button ( & mut self , input_id : InputID , left : Clickable , right : Clickable , deadzone : f32 ) { let input = self . input_mut ( input_id ) ; let act = Axis2Button { left : left , right : right , deadzone : deadzone } ; let trig = Trigger :: OnChange ( Box :: new ( act ) ) ; input . add_trigger ( trig ) ; }
This allows to connect a thumb stick to 4 buttons, for example movement with keys adws
We couple 2 buttons to one axis, eg.
This allows to connect a thumb stick to 4 buttons for example movement with keys adws We couple 2 buttons to one axis eg .
&mut self
input_id
InputID
left
Clickable
right
Clickable
deadzone
f32
&mut self
input_id
InputID
left
Clickable
right
Clickable
deadzone
f32