Convert the pause button to a normal customizable touch screen button

This commit is contained in:
Henrik Rydgård
2025-11-25 15:43:25 +01:00
parent f8ab0fab1d
commit 7a8a642aed
53 changed files with 54 additions and 85 deletions
+3 -1
View File
@@ -99,7 +99,8 @@ void TouchControlVisibilityScreen::CreateVisibilityTab(UI::LinearLayout *vert) {
toggles_.push_back({ "Right Analog Stick", &touch.touchRightAnalogStick.show, ImageID::invalid(), [=](EventParams &e) {
screenManager()->push(new RightAnalogMappingScreen(gamePath_));
}});
toggles_.push_back({ "Fast-forward", &touch.touchFastForwardKey.show, ImageID::invalid(), nullptr });
toggles_.push_back({ "Fast-forward", &touch.touchFastForwardKey.show, ImageID::invalid(), nullptr});
toggles_.push_back({ "Pause", &touch.touchPauseKey.show, ImageID("I_HAMBURGER"), nullptr});
for (int i = 0; i < TouchControlConfig::CUSTOM_BUTTON_COUNT; i++) {
char temp[256];
@@ -116,6 +117,7 @@ void TouchControlVisibilityScreen::CreateVisibilityTab(UI::LinearLayout *vert) {
CheckBox *checkbox = new CheckBox(toggle.show, "", "", new LinearLayoutParams(50, WRAP_CONTENT));
row->Add(checkbox);
Choice *choice;
if (toggle.handle) {
// Handle custom button strings differently, and hackily. But will extend to arbitrary button counts.