blog games developers documentation portfolio gallery

More in this category:

Configuring the listbox

When you add a Listbox to your scene you can change the appearance of the listbox by editing the underlying gameobjects.

The listbox consists of 4 parts:
- closed listbox
- opened listbox
- option
- highlighted option

Each of these parts can be configured as you see fit, but there are a few rules:
- The top level gameObject needs to contain the ListBox script
- If the closed listbox has a child called "Text", this will be used to set the title. So do not rename this.
- If the closed listbox has a child called "Image", this will be used to set the selected sprite.

- The opened listbox needs to contain the ListBoxEventCatcher script.
- The Scrollable area inside the Opened listbox defines the size of the visible part of the option list when the listbox is open.
- The Scrollable area inside the Opened listbox should have a Mask and a Image Component to obscure the options beyond the area's borders.

- Option and Highlighted option (inside Opened listbox) should have a child called "Text" if you plan to show strings
- Option and Highlighted option (inside Opened listbox) should have a child called "Image" if you plan to show sprites

The distance between Highlighted option and Option is measured upon startup and will define the spacing between the options in the listbox.







follow us