[size:17pt]App Screen Panning Widget[/size]
This is a widget that was designed to allow you to jump between screens within an application, giving it a more organic layout.
There are 5 modes:
- Mode 0 - Scrolling disabled: (for using your own integrated scrolling)
- Mode 1 - Screen Snap: Jump to another screen by a command.
- Mode 2 - Slide: Slide the screen by clicking and dragging on it. (works very similarly to how iPhone scrolls applications)
- Mode 3 - Slide & Snap: Slide the screen by dragging. It will Snap to the closest screen.
- Mode 4 - Gesture Snap: Click and drag, making a small gesture up, down, left, or right. It will move the screen in that direction.
It only uses one active object, and is easily disabled by setting MODE to 0.
The code is also simple and easy to read. Just drag 'n' drop the object in your frame.
These "screen sliding" and "gesturing" techniques are designed with touch screen capability in mind, and would be perfect for an iOS game/app.
There was one feature I wanted to implement, but couldn't get it working right. With the slide methods, I wanted an option to be able to "throw" the screen. That is, when you let go of your click while moving the cursor, the screen would continue off at that angle/speed, until it slowly decelerated to a stop. I just couldn't really get it to work.
If anyone can figure it out, please do! I would love to see a "Screen Panning Widget v2.0" with more features.