I’m trying to calculate the percentage by how many the screen size changes so I can multiply that percentage by every Button’s position to get the correct new position, This is the code.
Say I have a button at 100,100 my screen width and height increase by 10%
I would have to do 100 * 1.1; which would give me the correct new position.
Gdx.graphics.getWidth() shows the new width cause the game is fullscreen it will change size according to someones screen.
If you don’t get my idea, please tell.
Gdx.graphics.getWidth() = 1336 constants.width = 1000
And this is what should be printed out but it’s returning 1.
1336/1000 = 1.336