Jump to content

square on all resolutions


robod

Recommended Posts

Posted

Of course there is !

Use absolute coordinates system which is the ratio bsed on 1!

#include <iostream>

int main() {

    std::cout << "C++ is amazing <3" << std::endl;

    return 0;

}

I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please

Posted

If you are talking about UI you can use guiGetScreenSize() then multiply by a relative value on height so you get same proportion

"El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más".

Att: -|TG|-Mister[Q]<.

Posted

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.

  • 2 weeks later...
  • Moderators
Posted

scW,scH = guiGetScreenSize()

ratio = scW/scH

width,height = 200,200*ratio

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