Jump to content

Again, little problem with GUI.


Dreft

Recommended Posts

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
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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...