示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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());
        }