pub trait TInputManagerServiceSyncClient {
// Required methods
fn get_connected_gamepads(&mut self) -> Result<Vec<GamepadInfo>>;
fn set_gamepad_vibration(
&mut self,
device_id: String,
motor1_value: i8,
motor1_time: i8,
motor2_value: i8,
motor2_time: i8,
) -> Result<bool>;
fn set_gamepad_light(
&mut self,
device_id: String,
r_value: i8,
g_value: i8,
b_value: i8,
) -> Result<bool>;
fn set_ruyi_controller_status(
&mut self,
channel: i8,
enable_r: bool,
enable_g: bool,
enable_b: bool,
enable_motor1: bool,
enable_motor2: bool,
shutdown: bool,
r_value: i8,
g_value: i8,
b_value: i8,
motor1_value: i8,
motor1_time: i8,
motor2_value: i8,
motor2_time: i8,
) -> Result<bool>;
}Required Methods§
Sourcefn get_connected_gamepads(&mut self) -> Result<Vec<GamepadInfo>>
fn get_connected_gamepads(&mut self) -> Result<Vec<GamepadInfo>>
Get the gamepads that are connected corrently
Sourcefn set_gamepad_vibration(
&mut self,
device_id: String,
motor1_value: i8,
motor1_time: i8,
motor2_value: i8,
motor2_time: i8,
) -> Result<bool>
fn set_gamepad_vibration( &mut self, device_id: String, motor1_value: i8, motor1_time: i8, motor2_value: i8, motor2_time: i8, ) -> Result<bool>
Activate the vibration of gamepad
Sourcefn set_gamepad_light(
&mut self,
device_id: String,
r_value: i8,
g_value: i8,
b_value: i8,
) -> Result<bool>
fn set_gamepad_light( &mut self, device_id: String, r_value: i8, g_value: i8, b_value: i8, ) -> Result<bool>
Change the light of gamepad (for ruyi controller only)
Sourcefn set_ruyi_controller_status(
&mut self,
channel: i8,
enable_r: bool,
enable_g: bool,
enable_b: bool,
enable_motor1: bool,
enable_motor2: bool,
shutdown: bool,
r_value: i8,
g_value: i8,
b_value: i8,
motor1_value: i8,
motor1_time: i8,
motor2_value: i8,
motor2_time: i8,
) -> Result<bool>
fn set_ruyi_controller_status( &mut self, channel: i8, enable_r: bool, enable_g: bool, enable_b: bool, enable_motor1: bool, enable_motor2: bool, shutdown: bool, r_value: i8, g_value: i8, b_value: i8, motor1_value: i8, motor1_time: i8, motor2_value: i8, motor2_time: i8, ) -> Result<bool>
Obsolete. Temporary api the change the ruyi controller’s state, will be removed later.