info ℹ️
- What do you want to achieve? Keep it simple and clear!
I will make my game optional for the console with it I fully redesign the ui
- What is the issue? Include screenshots / videos if possible!
I use the select API
from Gui service
but it not correct select items I have above buttons and a frame I will in that frame you can select items with the joystick
and the dpad
and the buttons above with button l2 and R2
so
Button y
to toggle the buttons button X
for settings open or close by default there also the same Select as the button bar and with L1 and L2
qeucq switch to frame
I can use the whole frame with select API
but that not what I want
- What solutions have you tried so far? Did you look for solutions on the Developer Hub? Research the Dev forum and docks
scripts
local UIS = game:GetService("UserInputService")
local GS = game:GetService("GuiService")
local frames = script.Parent.Parent.Parent.Parent.frames
local buttons = script.Parent.Parent.Parent.Parent.atop.btopitems
script.Parent.MouseButton1Click:Connect(function()
if UIS.GamepadEnabled then
UIS.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Gamepad1 then
if input.KeyCode == Enum.KeyCode.ButtonR2 then
for i,v in frames:GetChildren() do
if v:IsA("ImageLabel") then
v.Visible = false
frames.ui.Visible = true
end
end
GS:Select(frames.ui)
GS:Select(script.Parent.Parent.Parent.Parent.Parent.backframe.buttons)
for i,v in buttons:GetChildren() do
if v:IsA("TextButton") then
v.Visible = false
buttons.bhome.Visible = true
buttons.usounds.Visible = true
end
end
end
end
end)
else
for i,v in frames:GetChildren() do
if v:IsA("ImageLabel") then
v.Visible = false
frames.ui.Visible = true
end
end
for i,v in buttons:GetChildren() do
if v:IsA("TextButton") then
v.Visible = false
buttons.bhome.Visible = true
buttons.usounds.Visible = true
end
end
end
end)
local buttons = script.Parent.Parent.Parent.Parent.buttons
local enabled = true
local pading = script.Parent.Parent.Parent.Parent.frames.padding
local UIS = game:GetService("UserInputService")
script.Parent.MouseButton1Click:Connect(function()
if UIS.GamepadEnabled then
UIS.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Gamepad1 then
if input.KeyCode == Enum.KeyCode.ButtonY then
if enabled == true then
buttons.Visible = false
pading.PaddingBottom = UDim.new(0, 0)
enabled = false
elseif enabled == false then
buttons.Visible = true
pading.PaddingBottom = UDim.new(0.2, 0)
enabled = true
end
end
end
end)
else
if enabled == true then
buttons.Visible = false
pading.PaddingBottom = UDim.new(0, 0)
enabled = false
elseif enabled == false then
buttons.Visible = true
pading.PaddingBottom = UDim.new(0.2, 0)
enabled = true
end
end
end)