Game Development Community

Different gui based on screen resolution?

by James Dunlap · in RTS Starter Kit · 02/08/2006 (3:01 pm) · 2 replies

I'd like to take advantage of larger screen resolutions when designing the PlayGui but it's hard to do that when some people will be using lower resolutions. Is it possible to load a different PlayGui based on the screen resolution?

#1
02/09/2006 (11:55 am)
Okay, I think I figured out how to determine the screen resolution from script.

What I can't figure out is why the coordinates of my gui elements change when I change to a larger screen resolution. It doesn't seem to make sense. I would have expected them to remain the same.

If, for example, I set the position of something to ( 0, 520 ) and increase the screen resolution from 800x600 to 1024x768 why do the coordinates change to ( 224, 688 )?
#2
02/09/2006 (12:31 pm)
I think it has to do with the type of positioning you are doing weather you are basing it from for example
HorizSizing (right, width, left, center, or relitive)
and
VertSizing(bottom, height,top,center,relative)

looks to me if you chooce relative it will move it with each rezelution to "relativly" the same area since everything is streached out more but not the same exact pixal cords. for haveing it always exactly the same pixals over try using the other settings.. center for example mesures out from center +number move it right and - left and I "think" +is up and - is down.

diffrent combenations can hold diff results play around and i'm sure you will get the hang of it

Chris