Hello, this little tutorial is how to center absolutely everything, with a simple formula you can literally center everything.
This is just for people who aren't the best with math, and they cannot figure it out.
With this simple trick you can even center windows.
Here is the formula
x := Gui_Width - ( Gui_Width / 2 ) - ( Control_Width / 2 ) y := Gui_Height - ( Gui_Height / 2 ) - ( Control_Height / 2 )
Pretty simple, if you follow this you will be able to center everything.
guiW := 300 guiH := 200 controlH := 100 controlW := 50 controlX := guiW - ( guiW / 2 ) - ( controlW / 2 ) controlY := guiH - ( guiH / 2 ) - ( controlH / 2 ) Gui, Add, Button, w%controlW% h%controlH% x%controlX% y%controlY% Gui, Show, w%guiW% h%guiH%
This shows a button exactly in the middle of the GUI. You can change around the guiW / guiH and controlH / controlW variables and it will stay in the middle.
Hope this was useful