Dreft Posted May 6, 2010 Share Posted May 6, 2010 Here is the code: http://pastebin.com/0BuP3Xbs http://pics.lt/images/mta-screen%202010 ... -11-11.png (1024x768 screen) http://pics.lt/images/mta-screen%202010 ... -12-36.png (1152x864 screen) http://pics.lt/images/mta-screen%202010 ... -17-08.png (1280x1024 screen) Look at all screen size pictures, as you can see everything is going of it's places. For example look at radio buttons at 1024x768 and 1280x1024, big difference right?.. All GUI created with GUIeditor on 1024x768 screen, everything is relative position's) Is it possible to do something that GUI won't be so different on different screen sizes?(I thought that relative positions for all elements would do the work, but difference still exists ) Link to comment
Remp Posted May 6, 2010 Share Posted May 6, 2010 use absolute values, relative will always be a percentage of the parent size (so in this case, a percentage of the screen size) absolute will be the same pixel size across all resolutions Link to comment
Dreft Posted May 6, 2010 Author Share Posted May 6, 2010 use absolute values, relative will always be a percentage of the parent size (so in this case, a percentage of the screen size)absolute will be the same pixel size across all resolutions Absolute for all? Even GUI window ? o_O When one time before I used absolute values, they fit just to that screen, on which I created dialog. On others it was totally different and messed up. Link to comment
Nich Posted May 6, 2010 Share Posted May 6, 2010 How to create a centered window for all resolutions: sx, sy = getScreenSize() function createGui() width = --insert your value for width height = --insert your value for height guiCreateWindow(sx-width/2, sy-height/2, width, height, "My Window", false) end Link to comment
Dreft Posted May 6, 2010 Author Share Posted May 6, 2010 I don't have problems with center position.. But with others it's hard.. :\ Link to comment
50p Posted May 8, 2010 Share Posted May 8, 2010 I don't have problems with center position.. But with others it's hard.. :\ It just requires more thinking. This is all basic math.. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now