My goal is to make similar dropdown scrolling frame.
I already had post where the solution was to hide dropdown’s element under it and then tween it down.
But that solution has some scaling issues as it used offset for scaling some gui elements.
I tried to use scale but using that had another issue , where scrolling frame’s clipdescendants just cutted whole dropdown frame when it was not even fully hidden.
Is there any alternatives how can I similar dropdown system? I’m so pissed off with this scrolling frame and GUI scaling stuff.
These are basically frames with an XSize set to 1 (scale) and an YSize set to an offset number, ordered within a UIListLayout inside the ScrollingFrame.
Regarding the dropdown, there are only 3 possibilities:
The dropdown frames have their YSize set to 0, making them invisible. Then, there is a hidden dropdown frame between each of these visible seed frame, and you only need to tween the dropdown frame’s Y offset size to achieve this effect.
The ‘visible’ seed frames are actually invisible, with their BackgroundTransparency set to 1. The visible content is inside these frames. When clicking, you resize the seed frame’s Y offset and tween the dropdown frame, which is inside the invisible seed frame along with other contents.
Alternatively, this could be implemented entirely without a UIListLayout. Instead, everything could be managed using a local script with math calculations, similar to how the satchel backpack GUI is handled.
Nah, only the scale value distord GUI elements. However it could be too big for mobile, so you have to change these frame size whenever a user is on mobile.
You can check if the player is on mobile using this
local IsMobile = UserInputService.TouchEnabled and Camera.ViewportSize.X < 1024
You could use scale, but it’s quite annoying because scaling can be inconsistent across different screen sizes. It’s much better and easier to create a high-quality and precise GUI by using offsets, along with a few additional lines of code to adjust sizes as needed when the user is on a mobile device.
Additionally, using scale size + scrolling frame can be a real nightmare. As soon as you increase the canvas size, all the frame sizes change as well, making it difficult to maintain or update in real time.