protected override PulldownItem SetupPulldownItem(GameObject itemObject) { ElementDropdownItem elementDropdownItem = (ElementDropdownItem)itemObject.GetComponent <ElementDropdownItem>(); if (Object.op_Equality((Object)elementDropdownItem, (Object)null)) { elementDropdownItem = (ElementDropdownItem)itemObject.AddComponent <ElementDropdownItem>(); } return((PulldownItem)elementDropdownItem); }
public PulldownItem AddItem(string label, Sprite sprite, int value) { PulldownItem pulldownItem = this.AddItem(label, value); ElementDropdownItem elementDropdownItem = pulldownItem as ElementDropdownItem; if (Object.op_Inequality((Object)elementDropdownItem, (Object)null)) { elementDropdownItem.IconImage.set_sprite(sprite); } return(pulldownItem); }
protected override void UpdateSelection() { if (!Object.op_Inequality((Object)this.ElementIcon, (Object)null)) { return; } ElementDropdownItem currentSelection = this.GetCurrentSelection() as ElementDropdownItem; if (!Object.op_Inequality((Object)currentSelection, (Object)null)) { return; } this.ElementIcon.set_sprite(currentSelection.IconImage.get_sprite()); }