1_JoDev
(JoDev)
January 23, 2024, 1:27pm
#1
So, i have a car game that has a dealership (ofc), but i have a problem with my UIPageLayout inside the DealershipFrame (only for console)
function module:AddCar(IdData)
local Frame = templetes.Car_View_Templete:Clone()
Frame.Name = IdData[2]
Frame.CarImage.Image = IdData[1]
Frame.Price.Value = IdData[3][3]
Frame.Parent = dealershipFrame.Cars.ScrollingFrame
Frame.Visible = true
Frame.InfoFrame.MainFrame.NameLabel.Text = IdData[2]
Frame.InfoFrame.MainFrame.View.MouseButton1Click:Connect(function()
if dealershipFrame.Cars:FindFirstChildOfClass("Frame") then return end
local Clone = templetes.Car_Templete:Clone()
Clone.Name = IdData[2]
Clone.Parent = dealershipFrame.Cars
Clone.LayoutOrder = 1
Clone.Visible = true
local UPL: UIPageLayout = dealershipFrame.Cars.UIPageLayout
UPL:JumpToIndex(1)
Clone.CarImage.Image = IdData[1]
Clone.InfoFrame.MainFrame.NameLabel.Text = IdData[2]
for infoName, infoValue in IdData[3] do
local clone = Clone.InfoFrame.MainFrame.NameLabel:Clone()
clone.Parent = Clone.InfoFrame.MainFrame
clone.Name = "InfoLabel"
clone.Text = infoName..": "..infoValue
end
Clone.Buttons.MainFrame.Purchase.MouseButton1Click:Connect(function()
game.ReplicatedStorage.Server_Events.PurchaseTriggered:FireServer(IdData[2])
UPL:JumpToIndex(0)
task.wait(0.5)
Clone:Destroy()
end)
Clone.Buttons.MainFrame.GoBack.MouseButton1Click:Connect(function()
UPL:JumpToIndex(0)
task.wait(1)
Clone:Destroy()
end)
end)
end
so here is my code, and i tested on multiple controllers (not consoles), and all have the same result
sorry for portrait video
Try replacing MouseButton1Click
with Activated
. You’ll need to do this for all of them for it to work correctly though
Edit: @1_JoDev I wrote what I wrote above because I saw the video and I though the issue was the buttons weren’t registering. How do you have your UIPageLayout configured?
1_JoDev
(JoDev)
January 24, 2024, 1:37pm
#4
all scroll types are not enabled just that, and padding 50 x-offset
Edit: but i have the exact same module (different connections and frames) for the inventory, but the inventory one works fine?
If the module works when used in your inventory then the issue might be happening with how your new Gui is configured like you correctly suggested
If your new Gui has a ScrollingFrame they can sometimes interfere with UIPageLayouts as an example
1_JoDev
(JoDev)
January 24, 2024, 1:52pm
#6
i thought that too, but i couldn’t find the problem, i did try printing when it goes back, and connected the UIPageLayout.Stopped event, it kept printing stopping on ScrollingFrame for the dealership
1 Like
It seems as though the issue might be related to this bug:
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 disabl…
1_JoDev
(JoDev)
January 24, 2024, 2:07pm
#8
i had so many issues with UIPageLayout in the past look at my topics, il consider using a custom made one, and maybe create a open-source model, thanks for the help though. Activated event didn’t work, and i also feel they are the same
1 Like
I made the Activated
suggestion because I erroneously thought that your issue was the buttons weren’t registering gamepad input, but then I realised what you meant
I did research on topics made recently on this forum about this and it does seem like UIPageLayouts experience many issues when dealing with gamepad input unfortunately, here’s another example of a problem a different player had when using them:
So for context, our game’s main UI is in a UIPageLayout. We have a top bar that users can tap/click/use controller input to switch. Tap and clicking the button works as expected, the gamepad can select buttons or use L1 or R1 to proceed to the previous and next page respectively.
For some reason, when a new UI appears on screen, the controller input freaks out and puts me on a random page, I’m not pressing L1 or R1, Gamepad, Touch, and ScrollWheelInput are all false so it shouldn’t be scrolling…
1_JoDev
(JoDev)
January 24, 2024, 2:16pm
#10
ClipsDescandents is on in all frames, and the scrollingframe i made, anyways thank you for the response, im going to make it custom
1 Like
system
(system)
Closed
February 7, 2024, 2:16pm
#11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.