botanist Posted November 22, 2010 Posted November 22, 2010 How to prevent my gui from being f*cked up in different resolutions? I'm already using relative values, but like the admin resource: It will look in every resolution the same. How to do that? Handling editor | Modloader
Static-X Posted November 22, 2010 Posted November 22, 2010 You can get screen size by using guiGetScreenSize, see details here https://wiki.multitheftauto.com/wiki/GuiGetScreenSize P/S: Offtopic: last part of our names match
botanist Posted November 22, 2010 Author Posted November 22, 2010 How to prevent my gui from being f*cked up in different resolutions? ... Not how to get screen size. @ Name: Well, this one is old Using SilentStrike way, way more. Handling editor | Modloader
Moderators Zango Posted November 22, 2010 Moderators Posted November 22, 2010 (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 Edited November 22, 2010 by Guest
Static-X Posted November 22, 2010 Posted November 22, 2010 [put what zango said here] This would help getting the values https://wiki.multitheftauto.com/wiki/Gui ... nSize#Tips
botanist Posted November 22, 2010 Author Posted November 22, 2010 @ Zango: Oh tnx, good to know that I don't need to create a whole new gui ( GUIEditor ftw <3 ) Handling editor | Modloader
dzek (varez) Posted November 22, 2010 Posted November 22, 2010 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)!
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