pub fn map_mouse_x( &mut self, input_id: InputID, pixels: f32 )
	{
		let input = self.input_mut( input_id );
		let mm    = MouseMapX{ pixels: pixels };

		let tr    = Trigger::OnChange  ( Box::new( mm.clone() ) );
		let tr2   = Trigger::OnNoChange( Box::new( mm         ) );

		input.add_trigger( tr  );
		input.add_trigger( tr2 );
	}
/// Map an input to the mouse movement (X-axis). This is most useful with the sticks on the gamepad, but it can be used also
/// with other buttons. Using four buttons you can get all directions of the mouse. Use the pixels parameter with a negative value
/// to reverse the direction.
/// @param pixels defines how fast to move the mouse. You can consider 4.0 a default value. Adapt from there to your needs.
///
Map an input to the mouse movement (X-axis). This is most useful with the sticks on the gamepad, but it can be used also
with other buttons. Using four buttons you can get all directions of the mouse. Use the pixels parameter with a negative value
to reverse the direction.
Map an input to the mouse movement ( X - axis ) . This is most useful with the sticks on the gamepad but it can be used also with other buttons . Using four buttons you can get all directions of the mouse . Use the pixels parameter with a negative value to reverse the direction .
pub fn map_mouse_x( &mut self, input_id: InputID, pixels: f32 )
	{
		let input = self.input_mut( input_id );
		let mm    = MouseMapX{ pixels: pixels };
		let tr    = Trigger::OnChange  ( Box::new( mm.clone() ) );
		let tr2   = Trigger::OnNoChange( Box::new( mm         ) );
		input.add_trigger( tr  );
		input.add_trigger( tr2 );
	}
pub fn map_mouse_x ( & mut self , input_id : InputID , pixels : f32 ) { let input = self . input_mut ( input_id ) ; let mm = MouseMapX { pixels : pixels } ; let tr = Trigger :: OnChange ( Box :: new ( mm . clone ( ) ) ) ; let tr2 = Trigger :: OnNoChange ( Box :: new ( mm ) ) ; input . add_trigger ( tr ) ; input . add_trigger ( tr2 ) ; }
Map an input to the mouse movement (X-axis).
Map an input to the mouse movement ( X - axis ) .
&mut self
input_id
InputID
pixels
f32
&mut self
input_id
InputID
pixels
f32
defines how fast to move the mouse. You can consider 4.0 a default value. Adapt from there to your needs.
defines how fast to move the mouse . You can consider 4 . 0 a default value . Adapt from there to your needs .