I'm trying to come up with a generic approach, namely an event sheet that can be included in just about any Construct 2 game layout to provide Win8 snapped behavior with a minimum of additional work. I'm hoping someone can vet the approach below, since there are some unknowns (to me) with underlying implementation in Construct 2.
Right now I have set up an event sheet that I include in all the other layouts, and the event sheet looks like the following:
<img src="http://jimoneil.blob.core.windows.net/share/win8events.png" border="0" />
It seems to work, but wondering about a few things:
1. I need to know each of the layer names or at least how many layers are in a layout to generalize this. Right now I assume a "GameLayer" on each, some could have others or not use the naming convention. Is there a way to enumerate the layers in a layout?
2. I'm relying on Groups to deactivate responses to interaction when in snapped view (discovered that hiding the layer and setting time scale to 0 wasn't enough :)). Each layout now has a Group named "UnsnappedMode" - is it ok to reuse that name across layouts? The included event sheet then refers to "UnsnappedLayer" and gets the correct one from the context of the current layout.
3. I'm deactivating a group while within a group, e.g. group "SnappedMode" deactivates itself when transitioning out of snapped view. Is that ok.
4. Lastly, the transition to and from snapped mode isn't as fluid as I'd like. I'm using Letterbox Scale mode, but when going from snapped -> full landscape, you can see what looks like a transition to scaled first (IOW, I see the game screen in top left of the confines of the snapped view) for an instant before it goes to full on landscape. The reverse is true as well, seems like the game screen is cropped before the snapped view kicks in. I've tried flipping which layer I make visible/invisible first, but the flicker is still there.