Closed vikingsc2007 closed 5 years ago
需要加入选中时icon的赋值
GComboBox.prototype.onClickItem2 = function (index) { if (this.dropdown.parent instanceof fgui.GRoot) this.dropdown.parent.hidePopup(); this._selectedIndex = index; if (this._selectedIndex >= 0) { this.text = this._items[this._selectedIndex]; this.icon = (this._icons != null && this._selectedIndex < this._icons.length) ? this._icons[this._selectedIndex] : null; } else { this.text = ""; this.icon = null; } this._node.emit(fgui.Event.STATUS_CHANGED, this); };
需要加入选中时icon的赋值