Skip to content

OGListItem

Jeppe Zapp edited this page Feb 14, 2014 · 5 revisions

List items are for multiple options

Variables

Variable Type
text string String to display
isSelected boolean Is the mouse hovering?
isTicked boolean Has the widget been clicked?
object Object Object to be contained in the list item
target GameObject Message handler
message string Message for message handler when clicked
hoverMessage string Message for message handler when hovering
argument string Argument for message handler

Example

// UnityScript
var li : OGListItem = new GameObject ( "ListItem", OGListItem ).GetComponent.<OGListItem>();

li.text = "Hello!";
li.target = this.gameObject;
li.message = "SelectItem";

li.transform.localPosition = new Vector3 ( 10, 10, 0 );
li.transform.localScale = new Vector3 ( 300, 20, 1 );

li.GetDefaultStyles ();
// C#
OGListItem li = (OGListItem) new GameObject ( "ListItem", OGListItem ).GetComponent<OGListItem>();

li.text = "Hello!";
li.target = this.gameObject;
li.message = "SelectItem";

li.transform.localPosition = new Vector3 ( 10, 10, 0 );
li.transform.localScale = new Vector3 ( 300, 20, 1 );

li.GetDefaultStyles ();