mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Add toggle button option for normal buttons
This commit is contained in:
parent
1f228c51ca
commit
4bcc5bacff
1 changed files with 5 additions and 0 deletions
|
@ -302,6 +302,11 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
||||||
buttons_param[button_id].Clear();
|
buttons_param[button_id].Clear();
|
||||||
button_map[button_id]->setText(tr("[not set]"));
|
button_map[button_id]->setText(tr("[not set]"));
|
||||||
});
|
});
|
||||||
|
context_menu.addAction(tr("Toggle button"), [&] {
|
||||||
|
const bool toggle_value = !buttons_param[button_id].Get("toggle", false);
|
||||||
|
buttons_param[button_id].Set("toggle", toggle_value);
|
||||||
|
button_map[button_id]->setText(ButtonToText(buttons_param[button_id]));
|
||||||
|
});
|
||||||
context_menu.exec(button_map[button_id]->mapToGlobal(menu_location));
|
context_menu.exec(button_map[button_id]->mapToGlobal(menu_location));
|
||||||
ui->controllerFrame->SetPlayerInput(player_index, buttons_param, analogs_param);
|
ui->controllerFrame->SetPlayerInput(player_index, buttons_param, analogs_param);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue