robod Posted March 4, 2018 Share Posted March 4, 2018 Hi how can I make perfect square on all resolutions? Is there better way than store positions in array? Link to comment
darhal Posted March 4, 2018 Share Posted March 4, 2018 Of course there is ! Use absolute coordinates system which is the ratio bsed on 1! Link to comment
MisterQuestions Posted March 8, 2018 Share Posted March 8, 2018 If you are talking about UI you can use guiGetScreenSize() then multiply by a relative value on height so you get same proportion Link to comment
Overkillz Posted March 8, 2018 Share Posted March 8, 2018 As MisterQuestions said you can follow his way, however, if u are going to draw text over the rectangle. Probabilly you will need to conver the size of the font on different resolutions. So, I recomend you to create a scaleConverter function. In my opinion is the best option because you only will need to muliply the sizes by the scale that returns your custom function. Regards. Link to comment
robod Posted March 17, 2018 Author Share Posted March 17, 2018 this doesnt make perfect square. sometimes its rectangle Link to comment
Scripting Moderators thisdp Posted March 17, 2018 Scripting Moderators Share Posted March 17, 2018 scW,scH = guiGetScreenSize() ratio = scW/scH width,height = 200,200*ratio Link to comment
Storm-Hanma Posted March 17, 2018 Share Posted March 17, 2018 If you r looking for creating GUI window related things use guieditor from community best way to create it !! 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