'LinKin Posted February 17, 2014 Share Posted February 17, 2014 Hello, I'm using this resource to make a GUI. But I've one question; Is the position of the elements 'global' for all resolutions? I've taken a look at the code and it doesn't seem like if the position was calculated according to the resolution. How can I calculate it so that the GUI's elements position is the same for every resolution? Thanks Link to comment
MTA Team 0xCiBeR Posted February 17, 2014 MTA Team Share Posted February 17, 2014 No sure if it calculates that, but if it doesn't then use: Use: guiGetScreenSize() And use math equations. Link to comment
'LinKin Posted February 18, 2014 Author Share Posted February 18, 2014 For instance, The things that I create inside a window are relative to it right? So I'd just have to position the Window using those maths formulas with guiGetScreenSize Link to comment
Moderators Citizen Posted February 18, 2014 Moderators Share Posted February 18, 2014 To make ur gui 'global' for all resolutions, you have to use relative positions/sizes only. By default only the children of another gui elements are in relative. You can change that in gui editor with a right click anywhere on ur screen (but not on a gui element) and click on "Rel/Abs screen" or something similar (there are two items like this one, and it's the 1st one. And check the chat to be sure they are both to relative). As you already closed ur gui editor, just give me the line codes of the guis that are in absolute and the graphic resolution of your game when you created them. I'll be able to "translate" it in relative (nothing complicated though). 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