Open GoogleCodeExporter opened 9 years ago
*note, the 480x320 is a screengrab from the emulator, the droid.jpg is a
photograph of the game on my droid so it's far from pixel-perfect but you can
see that the cropped slimes on the right are now entirely visible, and you can
see far behind them. The droid_expected.jpg is a Gimp mockup.
Original comment by christia...@gmail.com
on 23 Aug 2010 at 12:48
It's going to be tweaked a little with the next update, but to achieve what
you're after:
Use a Window, give that 480x320 dimensions. Use window.centre, to position it
in the middle of what you should be looking at
Use a Sprite instead of a FixedBackground, on the bottom layer (add an extra if
necessary). FixedBackground ignores any windows.
From your twitter, you're using the trunk version?
If so;
setGameSize(width, height) adjusts for aspect ratio.
Do something like this:
float width = 480, height = 320;
setGameSize(width, height);
width = getGameWidth();
height = getGameHeight();
And you'll notice width before and after, is different.
Use window.centre(width / 2, height / 2), and it will be as you are looking for
(if you really want to chop off black bits, put a Black empty Sprite ontop or
something?)
This is how I manage it in Drop Block.
For anyone else : it's bugged if you try and do it in portrait right now
though, I think ^_^
Original comment by rtaylor205@gmail.com
on 23 Aug 2010 at 8:55
Original issue reported on code.google.com by
christia...@gmail.com
on 23 Aug 2010 at 12:44Attachments: