hi everyone, im using fit width scale mode in my project. when i change emulator resolution, it seems [top,left] move up a bit. Is this bug of feature? How long does it change? thanks
thanks, but i want to keep my game full screen, so it seems letterbox is not good solution for me. So i try to calculate padding value to re-arrange my sprite on screen, but there is no luck i supposed our game-view is center-align:
I suppose what you don't like at letterbox is the offset, but well this is how it goes, if you do not want to stretch image to cover whole screen, then you either crop longest sides or make offsets for shorter ones.
In my projects I use "letterbox" scaling mode together with absolute positioning to fill in the blanks:
Because in "no scale" mode, logical dimensions (and hence content dimensions) are not used and therefore I need to use device dimensions to do the calculations.
anyway, mine and yours are identical for all scaling modes except "no scale".
Comments
You are probably looking for a letterbox scale mode
Likes: atilim
i supposed our game-view is center-align:
thanks a lot
In my projects I use "letterbox" scaling mode together with absolute positioning to fill in the blanks:
http://appcodingeasy.com/Gideros-Mobile/Ignore-Automatic-Screen-Scaling-when-positioning-objects
Likes: hnim, atilim
anyway, mine and yours are identical for all scaling modes except "no scale".
Likes: johnyc100
Yeah, I was thinking about compliance with no scaling, but since I'm always using letterbox mode it worked perfectly and is much shorter
and letterbox is also my favorite (and sometimes fit width/fit height)