filled out match arms for incoming buttons
This commit is contained in:
parent
2cee2afdb2
commit
fa315fa9a3
1 changed files with 25 additions and 0 deletions
|
@ -7,6 +7,7 @@ pub enum StateUpdate {
|
|||
StreamRunning(bool),
|
||||
StreamIsMuted(bool),
|
||||
ComputerSoundIsOn(bool),
|
||||
ComputerMediaDoPause(bool),
|
||||
ChangeSceneOnChangeSlideHotkey(bool),
|
||||
SceneIsAugmented(bool),
|
||||
TimerCanRun(bool),
|
||||
|
@ -25,8 +26,32 @@ impl StateUpdate {
|
|||
"button" => {
|
||||
let value = &incoming_json["button"];
|
||||
match value.as_str().unwrap() {
|
||||
//Master Scenes
|
||||
"Scene_Camera" => {StateUpdate::Scene(Scenes::Camera)}
|
||||
"Scene_Screen" => {StateUpdate::Scene(Scenes::Screen)}
|
||||
"Augmented" => {StateUpdate::SceneIsAugmented(incoming_json["data"].as_bool().unwrap())},
|
||||
|
||||
//Slide changing behavior
|
||||
"Auto_Change_To_Camera" => {StateUpdate::TimerCanRun(incoming_json["data"].as_bool().unwrap())}
|
||||
"Change_With_Clicker" => {StateUpdate::ChangeSceneOnChangeSlideHotkey(incoming_json["data"].as_bool().unwrap())},
|
||||
|
||||
//Extra Toggles
|
||||
"Toggle_Computer_Volume" => {StateUpdate::ComputerSoundIsOn(incoming_json["data"].as_bool().unwrap())},
|
||||
"Toggle_Stream_Volume" => {StateUpdate::StreamIsMuted(incoming_json["data"].as_bool().unwrap())},
|
||||
"Media_Pause_Play" => {StateUpdate::ComputerMediaDoPause(incoming_json["data"].as_bool().unwrap())},
|
||||
|
||||
//SubScenes
|
||||
"Camera_None" => {StateUpdate::SubScene(SubScenes::CameraDefault)},
|
||||
"Camera_Top_Right" => {StateUpdate::SubScene(SubScenes::CameraWithUpperRight)},
|
||||
"Camera_Bottom_Right" => {StateUpdate::SubScene(SubScenes::CameraWithLowerRight)},
|
||||
"Camera_Bottom_Left" => {StateUpdate::SubScene(SubScenes::CameraWithLargeUpperRight)},
|
||||
"Screen_None" => {StateUpdate::SubScene(SubScenes::ScreenDefault)},
|
||||
"Screen_Top_Right" => {StateUpdate::SubScene(SubScenes::ScreenWithUpperRight)},
|
||||
"Screen_Bottom_Right" => {StateUpdate::SubScene(SubScenes::ScreenWithLowerRight)},
|
||||
|
||||
//Unimplemented
|
||||
"Next_Slide" |
|
||||
"Prev_Slide" |
|
||||
_ => {panic!("trying to use a button type I don't know!")}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue