I wish to position buttons by calculating the x and y coordinates based on the display size.
I did something like this:
My laptop screen pixel is 1600x900.
float x_button1 =displayWidth-displayWidth/6;
float y_button1 =displayHeight-displayHeight/10;
my manual calculation based on screen size.
the button will be at x=1333 and y=90
that is toward top right hand of the screen.
sadly, the button ends up been displayed on the top right hand instead of left.
and if i directly input x=1333 and y=90. i will get correct position.
Can someone help out?