Modern Skin: Snap Points
Creating a Modern Skin --> Intro --> Winamp 2 to Winamp 3+ --> Simple Skin Tutorial --> XML Intro --> Simple Skin Tutorial (Continued) --> Container --> Group --> Relative Positioning --> Complex Skin --> Non-Rect Player --> Layer Composition --> Alpha Channels --> Animatedlayer --> Snap Points --> Drawers --> Skin Scripting --> Drawer Scripting --> Animating a Skin --> Maki Overview --> Glossary
A snap point is a point that windows will snap on to. When you move that window close in proximity to that point, the window will "latch" on to that point. You can drag it out of that point later. Take a look at these two examples.
Snap point is a useful tool that adds more functionalities to your skin. Take a look at the Boxor example.
Default Player Example
* Snap points defined along the Main Window
* The Playlist Editor snaps to the Main Window when you move it close in proximity of the Main Window
Lets take a look at the XML code to define a snappoint. To get two components to snap together when they're close, you need to define snappoints in their XML. The XML itself is simple. The important part is the id: components with the same snappoint id will snap together whereas components with different ids will not.