Popup list
We will now learn how to create the popup list, see its parameters, and create a difficulty selector for our game.
Select the Panel GameObject and create a new child with Alt + Shift + N.
Rename that new child as
Difficulty
. It's our difficulty box container.Navigate to NGUI | Open | Widget Wizard and perform the following steps:
Select Popup List as Template
Select Dark as Foreground.
Select Dark as Background.
Select the Highlight sprite as Highlight.
With our Difficulty GameObject selected, click on the Add To button.
Parameters
A Popup List GameObject has just been created. Let's look at its parameters:
Atlas: This is the atlas used for the popup list's sprites.
Font: This is the font used for the popup list's options.
Text Label: This is the label to update when Popup List changes selection.
Options: This is the list of options that will pop up—one per line.
Default: This is the option selected at start.
Position: You may force the list of options to appear
Above
orBelow
the Popup...