Jump to content

Gui resolution


botanist

Recommended Posts

  • Moderators
Posted (edited)

you must code 'manual relative' as I call it

get GUI size, and set some absolute amount of pixels from it.

example:

local x, y = guiGetScreenSize () 
    windowX, windowY = (x / 2) - (windowWidth / 2), (y / 2) - (windowHeight / 2) 

will center a window.

You should code a GUI absolutely and then move the window. The stuff will stay because it is child of window, and so it will look alike and can be placed alike on all resolutions.

edit: parentheses fail :P

Edited by Guest
Posted

use absolutes rather than relatives - they looks the same on all resolutions, but remember that some ppl are using 640x480 res, so bigger windows = fail on this res.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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