I am migrating one of our projects from graphics1.0 to graphics2.0.
We have a bunch of buttons on the level select, which are actually display groups, comprising of about 10 items. They cannot be one single image because they have various components which need to update.
When a button is pressed when using g1.0, it would rotate 360 degrees around it’s center and scale up - however in g2.0 it now rotates around 0, 0 in world space which means it flies around the screen.
This is the transition code:
transition.to(buttonGroups[num], {time = 1000, rotation = 360, xScale = 5, yScale = 5, alpha = 0, onComplete = enterLevel})
Is there an easy way around this?
I have tried using containers but clearly I don’t understand them yet. My buttons are arranged in a grid which is 4 wide by 2 high and takes up most of the screen. Every time I add a button to a new container, the container masks the screen from 0, 0 in world space to the w, h values I set when I create it. Even if I move the container or the objects in the container, the mask is still applied from 0, 0 to w, h in world space. This means that all buttons except the 2 buttons in the top left disappear, because all of the others have been masked.