Author Topic: Centering a resizing GUI [SOLVED]  (Read 568 times)

/title

Now if I use someone's pref for $pref::Video::resolution how would I get the variables from it, ie for me it'd be "1280 600 32 60"
I don't care about the 32 or 60 to much, just the 1280 and 600. How should I go about grabbing just the first 2 numbers?
« Last Edit: June 18, 2014, 09:12:04 AM by Thorfin25 »

%size = getWords($pref::Video::resolution, 0, 1);
Or
%x = getWord($pref::Video::resolution, 0);
%y = getWord($pref::Video::resolution, 1);

You can also do
%x = getWord(getRes(), 0);
%y = getWord(getRes(), 1);

Thanks, worked out great.