public void Init(AwakeItemDetailLayer baselayer) { this.mBaseLayer = baselayer; this.mContent = GameUITools.FindGameObject("Content0", base.gameObject).GetComponent<UIGrid>(); if (this.mContent != null) { this.mContent.arrangement = UIGrid.Arrangement.Horizontal; this.mContent.cellWidth = 90f; this.mContent.maxPerLine = 0; this.mContent.animateSmoothly = false; this.mContent.keepWithinPanel = false; } }
public GUIAwakeItemListPanelItem Init(AwakeItemDetailLayer baselayer, ItemInfo info, ItemInfo parentInfo) { this.mBaseLayer = baselayer; this.mParentInfo = parentInfo; this.mItemInfo = info; this.mArrow = GameUITools.FindUISprite("Arrow", base.gameObject); this.mSelect = GameUITools.FindUISprite("Select", base.gameObject); this.mSelect.enabled = false; CommonIconItem.Create(base.gameObject, new Vector3(20f, 25f, 0f), new CommonIconItem.VoidCallBack(this.OnItemClick), true, 0.5f, null).Refresh(info, false, false, false); if (this.mParentInfo == null) { this.mArrow.enabled = false; } else { this.mArrow.enabled = true; } return this; }
public void Init(AwakeItemDetailLayer baselayer) { this.mBaseLayer = baselayer; this.mName = GameUITools.FindUILabel("Name", base.gameObject); this.mUI53 = GameUITools.FindGameObject("ui53", base.gameObject); Tools.SetParticleRQWithUIScale(this.mUI53, 5500); this.mUI53.gameObject.SetActive(false); this.mIcon = CommonIconItem.Create(base.gameObject, new Vector3(-43f, 66f, 0f), null, false, 0.9f, null); this.mTreeBG = GameUITools.FindUISprite("TreeBG", base.gameObject); this.mLeftBranch = GameUITools.FindUISprite("LeftBranch", this.mTreeBG.gameObject); this.mRightBranch = GameUITools.FindUISprite("RightBranch", this.mTreeBG.gameObject); for (int i = 0; i < 4; i++) { this.mLeafIcons.Add(CommonIconItem.Create(base.gameObject, new Vector3(0f, 0f, 0f), null, true, 0.5f, null).SetNumStyle(30)); this.mLeafIcons[i].OnItemIconClickEvent = new CommonIconItem.ItemInfoCallBack(this.OnLeafIconClick); } this.mCoseValue = GameUITools.FindUILabel("Cost/Value", base.gameObject); GameUITools.RegisterClickEvent("Create", new UIEventListener.VoidDelegate(this.OnCreateClick), base.gameObject); Globals.Instance.CliSession.Register(537, new ClientSession.MsgHandler(this.OnMsgAwakeItemCreate)); LocalPlayer expr_192 = Globals.Instance.Player; expr_192.PlayerUpdateEvent = (LocalPlayer.VoidCallback)Delegate.Combine(expr_192.PlayerUpdateEvent, new LocalPlayer.VoidCallback(this.OnPlayerUpdateEvent)); }
private void CreateObjects() { this.mInfoLayer = GameUITools.FindGameObject("Info", base.gameObject); GameUITools.RegisterClickEvent("CloseBtn", new UIEventListener.VoidDelegate(this.OnCloseClick), this.mInfoLayer); this.mName = GameUITools.FindUILabel("Name", this.mInfoLayer); this.mNumValue = GameUITools.FindUILabel("Num/Value", this.mInfoLayer); this.mAtts = GameUITools.FindUILabel("Atts", this.mInfoLayer); this.mValues = GameUITools.FindUILabel("Values", this.mInfoLayer); this.mDesc = GameUITools.FindUILabel("Desc", this.mInfoLayer); this.mOKBtn = GameUITools.RegisterClickEvent("OK", new UIEventListener.VoidDelegate(this.OnOkClick), this.mInfoLayer); this.mEquipBtn = GameUITools.RegisterClickEvent("Equip", new UIEventListener.VoidDelegate(this.OnEquipClick), this.mInfoLayer); this.mGetBtn = GameUITools.RegisterClickEvent("Get", new UIEventListener.VoidDelegate(this.OnGetClick), this.mInfoLayer); this.mCreateBtn = GameUITools.RegisterClickEvent("Create", new UIEventListener.VoidDelegate(this.OnCreateClick), this.mInfoLayer); this.mCreateBtnEffect = GameUITools.FindGameObject("Effect", this.mCreateBtn); this.mCreateBtnEffect.gameObject.SetActive(false); this.mOKBtn.SetActive(false); this.mEquipBtn.SetActive(false); this.mGetBtn.SetActive(false); this.mCreateBtn.SetActive(false); this.mDetailLayer = GameUITools.FindGameObject("Detail", base.gameObject).AddComponent<AwakeItemDetailLayer>(); this.mDetailLayer.Init(this); this.mInfoLayer.transform.localPosition = Vector3.zero; this.mDetailLayer.transform.localPosition = Vector3.zero; this.mDetailLayer.gameObject.SetActive(false); }