Hello! I don’t really know if this is the right place to write this but I’ve encountered an issue some guis I’m making.
Both of the issues are very similar.
The first issue a cursor I made getting offset when playing the game using the roblox client rather than studio.
In Studio:
In the Roblox Client:
The Second issue is that a crosshair for a icon selection is not sized correctly in the roblox client.
In Studio:
In the Roblox Client:
Any help will do and again I really dont know if this is the right category. xD
Thanks!
The window from Studio is not a perfect 16:9 ratio, unlike most monitors when games are in fullscreen. Whatever you forcefully align by using the UI dragging function of studio (which is garbage IMHO) to be centered in Studio will not look the same on other aspect ratios.
This is too little information for me to actually be able to give you any advice. GUI is harder than most people think it is.
One thing that I do notice is that the Pokemon icon and the selection indicator are independent of each other. In this case, parent the indicator to the Pokemon, scale it appropriately and center it using AnchorPoints. I actually made a plugin that helps with this:
I am trying this out first on the cursor in example 1, now the x position is correct, but the y axis is off? Do you know any way to make the y axis always fit the screen?
Keep in mind this presumes that all of these UI elements are cropped correctly and there is no unnecessary white space. By that, I mean:
Green is how the image should actually be cropped, red has unnecessary white space, and that space sometimes isn’t even a perfect square (not in my example), so the center of the image could be off and then… unalignment
There is no white space in the images and I designed them specifically for that reason. And also what I mean by fitting the screen is no matter the resolution of the screen the image stays in the same position, which it obviously is not judging by the screenshot. And the cursor is not parented to the button I am trying to make the cursor lay over.
I really don’t know if you need this but the green is the cursor, and the red is the frame containing the buttons I’m trying to lay the cursor over.
The cursor works perfectly now. But now the only issue is the crosshair for the icons shown in example two. And I really can’t parent the crosshair to just one icon because the crosshair functions like this:
I think I’ll just tweak the code example you gave me to work for this.