Book Image

Learning NGUI for Unity

By : Charles Bernardoff (EURO)
Book Image

Learning NGUI for Unity

By: Charles Bernardoff (EURO)

Overview of this book

Table of Contents (17 chapters)
Learning NGUI for Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Popup List


Let's start by creating a Popup List. We'll review its parameters and configure it to become a language selection option.

Before we continue, let's create an empty GameObject to hold the language selection:

  1. With our Options GameObject selected, hit Alt + Shift + N

  2. Rename the new empty child Language

Ok, we're now ready to create the Popup List.

Creating the Popup List

Drag the Colored Popup (1) from our Prefab Toolbar inside our Language GameObject in the Hierarchy view, as shown in the following screenshot:

A new Popup List that looks like a button with an arrow symbol appears in the scene. Hit Unity's play button and click on the new Popup List. You can select any of the three default options; it's colored and animated, as shown in the following screenshot:

As you can see in the preceding screenshot, the Popup List is composed of four elements:

  1. Control – Colored Popup List: This is the main element, with these four components:

    • UISprite: This displays the actual button's sprite

    • UIPopup...