Deltanic Posted November 22, 2010 Share 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? Link to comment
Static-X Posted November 22, 2010 Share 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 Link to comment
Deltanic Posted November 22, 2010 Author Share 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. Link to comment
Discord Moderators Zango Posted November 22, 2010 Discord Moderators Share 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 Link to comment
Static-X Posted November 22, 2010 Share Posted November 22, 2010 [put what zango said here] This would help getting the values https://wiki.multitheftauto.com/wiki/Gui ... nSize#Tips Link to comment
Deltanic Posted November 22, 2010 Author Share Posted November 22, 2010 @ Zango: Oh tnx, good to know that I don't need to create a whole new gui ( GUIEditor ftw <3 ) Link to comment
dzek (varez) Posted November 22, 2010 Share 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. 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