diff options
| author | 2021-03-06 07:36:41 -0600 | |
|---|---|---|
| committer | 2021-03-06 07:36:41 -0600 | |
| commit | 4bcc5bacffb21e1f6c2859ba26faf865aaea8855 (patch) | |
| tree | 4936e7d90509e8ec699ea8f4813c874025836c39 | |
| parent | Enable button toggle for keyboard in the modifier button (diff) | |
| download | yuzu-4bcc5bacffb21e1f6c2859ba26faf865aaea8855.tar.gz yuzu-4bcc5bacffb21e1f6c2859ba26faf865aaea8855.tar.xz yuzu-4bcc5bacffb21e1f6c2859ba26faf865aaea8855.zip | |
Add toggle button option for normal buttons
| -rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index e297eeffd..bd53f2cde 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp | |||
| @@ -302,6 +302,11 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 302 | buttons_param[button_id].Clear(); | 302 | buttons_param[button_id].Clear(); |
| 303 | button_map[button_id]->setText(tr("[not set]")); | 303 | button_map[button_id]->setText(tr("[not set]")); |
| 304 | }); | 304 | }); |
| 305 | context_menu.addAction(tr("Toggle button"), [&] { | ||
| 306 | const bool toggle_value = !buttons_param[button_id].Get("toggle", false); | ||
| 307 | buttons_param[button_id].Set("toggle", toggle_value); | ||
| 308 | button_map[button_id]->setText(ButtonToText(buttons_param[button_id])); | ||
| 309 | }); | ||
| 305 | context_menu.exec(button_map[button_id]->mapToGlobal(menu_location)); | 310 | context_menu.exec(button_map[button_id]->mapToGlobal(menu_location)); |
| 306 | ui->controllerFrame->SetPlayerInput(player_index, buttons_param, analogs_param); | 311 | ui->controllerFrame->SetPlayerInput(player_index, buttons_param, analogs_param); |
| 307 | }); | 312 | }); |