Update controller support for scroll window to use the keybaord for smoother scrolling

This commit is contained in:
Andrew Lanzone 2025-06-02 00:17:10 -07:00
parent 8ae193abe8
commit 6da6b9b98f

View File

@ -143,10 +143,8 @@ namespace MWGui
}
else if (arg.button == SDL_CONTROLLER_BUTTON_B)
onCloseButtonClicked(mCloseButton);
else if (arg.button == SDL_CONTROLLER_BUTTON_DPAD_UP)
onKeyButtonPressed(nullptr, MyGUI::KeyCode::ArrowUp, 0);
else if (arg.button == SDL_CONTROLLER_BUTTON_DPAD_DOWN)
onKeyButtonPressed(nullptr, MyGUI::KeyCode::ArrowDown, 0);
else if (arg.button == SDL_CONTROLLER_BUTTON_DPAD_UP || arg.button == SDL_CONTROLLER_BUTTON_DPAD_DOWN)
return false; // Fall through to keyboard
return true;
}