Difference between revisions of "Modern Skin: Snap Points"

From Winamp Developer Wiki
Jump to: navigation, search
m (Unprotected "Modern Skin: Snap Points")
m (Protected "Modern Skin: Snap Points" [edit=autoconfirmed:move=autoconfirmed])
 
(No difference)

Latest revision as of 15:11, 25 September 2008

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.

Boxor Example

Snap point is a useful tool that adds more functionalities to your skin. Take a look at the Boxor example.


File:Snappoint boxor.png



Default Player Example

File:Snappoint default.png

* Snap points defined along the Main Window


File:Winamp3 mainpl.png

* The Playlist Editor snaps to the Main Window when you move it close in proximity of the Main Window



XML Example

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.


File:Snappoint xml1.png


File:Snappoint xml2.png