I recently noticed that the gamepad virtual cursor has some weird behavior with UIPageLayouts.
It seems like hovering over buttons that are affected by a UIPageLayout blocks you from changing the page. However, when not hovering over them, it works like normal.
I already have GamepadInputEnabled set to false on the page layout. I would also like to point out that if VirtualCursorMode is set to Disabled, pressing the button to enable gui selection also changes the page with gamepad input disabled. (I dont know if thats intended behavior)
Step 1: Enable the virtual cursor
Step 2: Hover over the green area
Step 3: Press the X button a bunch of times (as you can see, the page changes each time from green to blue and back to green, this is expected behavior)
Step 4: Hover over any of the red buttons
Step 5: Press the X button again (as you can see now, the page is always stuck on green, no matter how many times you try to change the page)
This happens in both studio and client.
It seems like the Active property being set to true on the buttons is the culprit.
As far as I know, the only workaround is to disable the Active property.
I am using an Xbox controller (PowerA Spectra Enhanced) to reproduce this bug.
Any update on this? I ran into this issue today and it makes my menus unusable for controller users
Edit: I was able to find a workaround by using this function before any PageLayout movement
local function doTempControllerVirtualCursorToggleToFixPageLayoutBug(t : number, startElement : GuiObject?)
if gps.GamepadCursorEnabled then
gps:DisableGamepadCursor()
task.delay(t, function()
gps:EnableGamepadCursor(startElement)
end)
end
end
This bug is still happening, I really thought I would have to throw UIPageLayout entirely out of the window because of this bug but I didn’t have to thanks to Pseudosuper’s workaround.
Found the issue, it looks like UIPageLayout tries to automatically switch the page whenever SelectedObject is updated. So when the page animates and the cursor selection changes, it goes right back to the page you were already on …
I’ll update here once the fix is enabled, in the meantime you can turn the “Animated” property off while GamepadCursorEnabled equals true and it should also fix your issue.