This folder contains modified source files for the Scrolling Demo that allow you to move its window around while the animation is running. The resulting source code is a bit longer and more complex than the original code is, which is why this is provided separately. Advanced users who want to see how to allow the window to be moved around during an animation can take a look at this source code. To use it, first move the original Scrolling Demo.c and Scrolling Demo.h files out of the Scrolling Demo folder, then replace them with the files in this folder. Make sure to save the original files, so you can go back to the original version of the Scrolling Demo if you wish.
Note: If you use WindowShade to "roll up" the window while the modified version of the Scrolling Demo is running, the fps result given at the end of the demo will be incorrect, since the demo is timed even while the window is rolled up, although the animation stops. For more information about WindowShade, and about the Mouse Sprite trick, see the ReadMe file for the Large Background Scrolling Demo, available in the SpriteWorld 2.1 Demos package, which contains additional demos for SpriteWorld 2.1. Also keep in mind that since WaitNextEvent is used to get events, the demo will run slower than it would if WaitNextEvent was not used.
Take a look at the HandleMouseDown function to see how to keep the window aligned to long word boundaries when the user moves the window around. Also see the "inGrow" section of this function for a demonstration of the SWChangeWorldRect function. Even though the window doesn't show a grow box, you can still change the window's size while the program is running by clicking where the grow box normally would be and dragging.