playMaker

Author Topic: Aligning smaller gui horizontally with screen ratio  (Read 1474 times)

autumnboy

  • Junior Playmaker
  • **
  • Posts: 73
Aligning smaller gui horizontally with screen ratio
« on: September 17, 2014, 04:41:22 AM »
Hi!

I've set up my big gui to be centered via:
-Position: Y screen resolution/2 - (texture width/2)
-Scale: Y screen resolution/1080   x Texture width & Texture height

 I have smaller gui that sits behind it/in it.
-Position: X screen resolution/2.6 - (texture width/2)
-Scale: Y screen resolution/1080 x Texture width & Texture height


But When the screen is in a different resolution the smaller gui is always off.
I know I'm missing something but I don't know what to fix the smaller gui's position against the y screen resolution and scaling the big gui.

Help would be awesome please.  :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Aligning smaller gui horizontally with screen ratio
« Reply #1 on: September 23, 2014, 04:12:14 AM »
Hi,

 what is 1080? if it's your screen size, then instead, you must get the current size ( or at least get it on start so that it's always the right value.

 Bye,

 Jean