I’ve been trying to get the Fishies2.5D flip demo to work with groups or containers, but i’m having no luck. Basically i’m trying to have and image flip over to show an image with buttons. Anyone know how to get this to work or is this a bug?
Images and containers don’t have a real image to manipulate - they are simply the sum of the individual items contained within them.
You can achieve what you want with snapshots, but would require a bit of setting up.
I managed to get it to sort of work using display.capture(), but it doesn’t flip all the way like their example. Trying to figure out why. Any suggestions?
In what sense does it only flip half way?
You aren’t going to be able to grab the screen you are going to via display.capture() anyway, so I’d suggest you attempt to use snapshots right away to ensure that you can do what you want.
One thing you could try to create the images is this:
Create 2 snapshots the same size as the screen.
Have your program as usual, but make sure the screens get created inside a group you can easily access.
Then when it is time to flip, move these groups (showing the current and next screens, one group for each) temporarily into the snapshots, and let them redraw (requires a 1 frame delay - ack, just realised this might cause a temporary glitch). Then move these groups back, and you have snapshots containing the before and after images.
OK, glitch not-withstanding, that might at least let you begin to get it working.
Live updates in snapshots are a bit tricky - to be honest I’ve not thought about it in this way before as if I need to manipulate the screen I just use a snapshot all the time and invalidate() it each frame.
I actually got it working with display.save(). I guess display.capture() just doesn’t work with that type of transition.
Excellent I didn’t even know of display.save()
I have another issue now. It works great, but i have it so you can flip back and forth. The issue is the second time it flips it already is transitioned so it doesn’t work. I need to find a way to reset the image path coordinates.
Images and containers don’t have a real image to manipulate - they are simply the sum of the individual items contained within them.
You can achieve what you want with snapshots, but would require a bit of setting up.
I managed to get it to sort of work using display.capture(), but it doesn’t flip all the way like their example. Trying to figure out why. Any suggestions?
In what sense does it only flip half way?
You aren’t going to be able to grab the screen you are going to via display.capture() anyway, so I’d suggest you attempt to use snapshots right away to ensure that you can do what you want.
One thing you could try to create the images is this:
Create 2 snapshots the same size as the screen.
Have your program as usual, but make sure the screens get created inside a group you can easily access.
Then when it is time to flip, move these groups (showing the current and next screens, one group for each) temporarily into the snapshots, and let them redraw (requires a 1 frame delay - ack, just realised this might cause a temporary glitch). Then move these groups back, and you have snapshots containing the before and after images.
OK, glitch not-withstanding, that might at least let you begin to get it working.
Live updates in snapshots are a bit tricky - to be honest I’ve not thought about it in this way before as if I need to manipulate the screen I just use a snapshot all the time and invalidate() it each frame.
I actually got it working with display.save(). I guess display.capture() just doesn’t work with that type of transition.
Excellent I didn’t even know of display.save()
I have another issue now. It works great, but i have it so you can flip back and forth. The issue is the second time it flips it already is transitioned so it doesn’t work. I need to find a way to reset the image path coordinates.