ImprovedSelectionList

By Daniel Brauer, inspired by AngryAnt

Fix: Double click fix
By Pablo Bollansée (The Oddler) Using Unity 3.4.0f5

I noticed a small bug while using this, namely that the double clicking did not work. I was able to fix this by changing a few things: I tested and for some reason when I check for MouseUp && clickCount == 2 then it never fires, yet it fires 2ce when I just check for clickCount == 2. It also fires once when I check for MouseDown && clickCount == 2. This might just be a little bug and might get fixed later, yet this fix works now.

I hope that this helps people who are having the same problem.

Description
Visualises an array of strings or GUIContents and returns the index selected by the user. A delegate can be provided to capture double-clicking list items. Important: this script depends on your current GUISkin having a custom style called "List Item" with an appropriate OnNormal look. If you don't have this in your skin, you will have to use the custom style versions of the function.

Usage
Providing a double-click delegate: