How to make the White line to stay in the middle of the dark ui

Hello there :wave:,

  1. What do you want to achieve? Make the white line centered with the dark UI when i change the size of the screen.

  2. What is the issue?

Here is what i did if it helps (Check the “solution” in the link below): i did the “NO PARENT” technique“ on “The black ui” with the texts: “Coin” and “Number”

result when the screen is over sized:

The white line glides to the right side while over sizing the screen

result when the screen is the desired size:


The white line is centered

Result when the screen is shrinked:

image

the white line glides to the left side while shrinking the screen.

Note :
here, the white line is a child of the black ui.
(it can also be unparented from the black UI, it’s the same result at the end)

i prefer unparented(But whatever works)

Thank you for your help :happy2:

You should be able to get it to stay in the center if you set the

  • AnchorPoint at 0.5, 0.5
  • Position at {0.5, 0},{0.5, 0}

It’s relative to it’s Parent, so if you want it in the middle of a frame it should be placed as a child of that frame.

1 Like