public void Initialize() { UIWidget component = base.transform.parent.GetComponent <UIWidget>(); component.ResetAndUpdateAnchors(); base.ListWindowViewRect = new Rect { x = (float)component.width * -0.5f, y = (float)component.height * -0.5f, width = (float)component.width, height = (float)component.height }; BoxCollider component2 = base.GetComponent <BoxCollider>(); Vector3 size = component2.size; size.x = base.width; component2.size = size; UIWidget component3 = this.buttonOffset.GetComponent <UIWidget>(); component3.ResetAndUpdateAnchors(); base.selectParts.transform.localPosition = this.buttonOffset.transform.localPosition; GUICollider component4 = base.GetComponent <GUICollider>(); Vector3 localPosition = component4.transform.localPosition; component4.SetOriginalPos(base.selectParts.transform.localPosition); component4.transform.localPosition = localPosition; this.buttonWidth = base.selectCollider.width; base.selectParts.SetActive(false); }
private void SetCommonUI_A_Stage() { this.goSelectPanelA_StageL = GUIManager.LoadCommonGUI("SelectListPanel/SelectListPanelA_StageL", base.gameObject); this.csSelectPanelA_StageL = this.goSelectPanelA_StageL.GetComponent <GUISelectPanelA_StageL>(); int depth = this.txEVENT_BG.gameObject.GetComponent <UIWidget>().depth - 1; DepthController.SetWidgetDepth_Static(this.csSelectPanelA_StageL.transform, depth); if (CMD_QuestTOP.AreaData.data.type == "3" || CMD_QuestTOP.AreaData.data.type == "4") { GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("UISelectPanelParam/SelectPanelParamUD_A_StageL_Point")) as GameObject; gameObject.transform.parent = base.transform; this.csSelectPanelA_StageL.SetSelectPanelParam(gameObject); } else if (CMD_QuestTOP.AreaData.data.worldAreaId == "3" && this.isScheduleBannerActive) { GameObject gameObject2 = UnityEngine.Object.Instantiate(Resources.Load("UISelectPanelParam/SelectPanelParamUD_A_StageL_Point")) as GameObject; gameObject2.transform.parent = base.transform; this.csSelectPanelA_StageL.SetSelectPanelParam(gameObject2); } else if (CMD_QuestTOP.AreaData.data.type == "6") { GameObject gameObject3 = UnityEngine.Object.Instantiate(Resources.Load("UISelectPanelParam/SelectPanelParamUD_A_StageL_Detiles")) as GameObject; gameObject3.transform.parent = base.transform; this.csSelectPanelA_StageL.SetSelectPanelParam(gameObject3); } Vector3 localPosition = this.goLP_SATGE.transform.localPosition; GUICollider component = this.goSelectPanelA_StageL.GetComponent <GUICollider>(); component.SetOriginalPos(localPosition); this.csSelectPanelA_StageL.selectParts = this.goLP_SATGE; this.csSelectPanelA_StageL.ListWindowViewRect = this.GetRectWindowArea(localPosition); }
private void SetCommonUI_Exchange() { Vector3 localPosition = this.exchangeList.transform.localPosition; GUICollider component = this.exchangeList.GetComponent <GUICollider>(); component.SetOriginalPos(localPosition); this.exchangeList.selectParts = this.goListPartsExchange; Rect listWindowViewRect = default(Rect); listWindowViewRect.xMin = -560f; listWindowViewRect.xMax = 560f; listWindowViewRect.yMin = -256f - GUIMain.VerticalSpaceSize; listWindowViewRect.yMax = 256f + GUIMain.VerticalSpaceSize; this.exchangeList.ListWindowViewRect = listWindowViewRect; }
private void SetCommonUI_S_Dungeon() { this.goSelectPanelS_DungeonR = GUIManager.LoadCommonGUI("SelectListPanel/SelectListPanelS_DungeonR", base.gameObject); this.csSelectPanelS_DungeonR = this.goSelectPanelS_DungeonR.GetComponent <GUISelectPanelS_DungeonR>(); int depth = this.txEVENT_BG.gameObject.GetComponent <UIWidget>().depth - 1; DepthController.SetWidgetDepth_Static(this.csSelectPanelS_DungeonR.transform, depth); Vector3 localPosition = this.goLP_DNG.transform.localPosition; this.goSelectPanelS_DungeonR.transform.localPosition.y = localPosition.x; GUICollider component = this.goSelectPanelS_DungeonR.GetComponent <GUICollider>(); component.SetOriginalPos(localPosition); this.csSelectPanelS_DungeonR.selectParts = this.goLP_DNG; this.csSelectPanelS_DungeonR.ListWindowViewRect = this.GetRectWindow(localPosition); }
private void SetCommonUI() { this.baseTitleName.text = StringMaster.GetString("Succession-01"); this.partnerTitleName.text = StringMaster.GetString("ArousalPartner"); this.goSelectPanelMonsterIcon = GUIManager.LoadCommonGUI("SelectListPanel/SelectListPanelMonsterIcon", base.gameObject); this.csSelectPanelMonsterIcon = this.goSelectPanelMonsterIcon.GetComponent <GUISelectPanelMonsterIcon>(); Vector3 localPosition = this.goSelectPanelMonsterIcon.transform.localPosition; localPosition.x = 208f; GUICollider component = this.goSelectPanelMonsterIcon.GetComponent <GUICollider>(); component.SetOriginalPos(localPosition); if (null != this.goEFC_RIGHT) { this.goSelectPanelMonsterIcon.transform.parent = this.goEFC_RIGHT.transform; } this.csSelectPanelMonsterIcon.ListWindowViewRect = ConstValue.GetRectWindow2(); }
private void SetCommonUI_Evolution() { GameObject gameObject = GUIManager.LoadCommonGUI("SelectListPanel/SelectListPanelEvolution", base.gameObject); this.csSelectPanelEvolution = gameObject.GetComponent <GUISelectPanelEvolution>(); if (this.goEFC_RIGHT != null) { gameObject.transform.SetParent(this.goEFC_RIGHT.transform); } Vector3 localPosition = this.goListParts.transform.localPosition; Vector3 localPosition2 = gameObject.transform.localPosition; localPosition2.x = localPosition.x; GUICollider component = gameObject.GetComponent <GUICollider>(); component.SetOriginalPos(localPosition2); this.csSelectPanelEvolution.selectParts = this.goListParts; this.csSelectPanelEvolution.ListWindowViewRect = ConstValue.GetRectWindow3(); }
private void SetProductScrollView() { this.productScrollView.Callback = new Action(this.SetDigistoneNumber); Vector3 localPosition = this.productScrollView.transform.localPosition; GUICollider component = this.productScrollView.GetComponent <GUICollider>(); component.SetOriginalPos(localPosition); this.productScrollView.selectParts = this.productScrollViewItem; Rect listWindowViewRect = default(Rect); listWindowViewRect.xMin = -560f; listWindowViewRect.xMax = 560f; listWindowViewRect.yMin = -256f - GUIMain.VerticalSpaceSize; listWindowViewRect.yMax = 256f + GUIMain.VerticalSpaceSize; this.productScrollView.ListWindowViewRect = listWindowViewRect; this.storeProductList = StoreUtil.Instance().GetStoneStoreDataList(); this.productScrollView.initLocation = true; this.productScrollView.AllBuild(this.storeProductList); }
private void SetCommonUI() { this.goSelectPanelMonsterIcon = GUIManager.LoadCommonGUI("SelectListPanel/SelectListPanelMonsterIcon", base.gameObject); this.csSelectPanelMonsterIcon = this.goSelectPanelMonsterIcon.GetComponent <GUISelectPanelMonsterIcon>(); if (null != this.goEFC_RIGHT) { this.goSelectPanelMonsterIcon.transform.parent = this.goEFC_RIGHT.transform; } Vector3 localPosition = this.goSelectPanelMonsterIcon.transform.localPosition; localPosition.x = 208f; GUICollider component = this.goSelectPanelMonsterIcon.GetComponent <GUICollider>(); component.SetOriginalPos(localPosition); Rect listWindowViewRect = default(Rect); listWindowViewRect.xMin = -240f; listWindowViewRect.xMax = 240f; listWindowViewRect.yMin = -297f - GUIMain.VerticalSpaceSize; listWindowViewRect.yMax = 158f + GUIMain.VerticalSpaceSize; this.csSelectPanelMonsterIcon.ListWindowViewRect = listWindowViewRect; }
private void CreateTitleList(GUISelectPanelTitle listUI, int listItemCount) { GUICollider component = listUI.GetComponent <GUICollider>(); BoxCollider component2 = component.GetComponent <BoxCollider>(); Vector3 localPosition = component.transform.localPosition; component.SetOriginalPos(this.titleListOriginalItem.transform.localPosition); component.transform.localPosition = localPosition; Rect listWindowViewRect = new Rect { xMin = component2.size.x * -0.5f, xMax = component2.size.x * 0.5f, yMin = component2.size.y * -0.5f - 40f, yMax = component2.size.y * 0.5f }; listWindowViewRect.yMin = listWindowViewRect.y - GUIMain.VerticalSpaceSize; listWindowViewRect.yMax = listWindowViewRect.y + listWindowViewRect.height + GUIMain.VerticalSpaceSize; listUI.ListWindowViewRect = listWindowViewRect; listUI.selectParts = this.titleListOriginalItem; listUI.initLocation = true; listUI.AllBuild(listItemCount); }
private void SetCommonUI() { this.UpdateDigicoin(); this.goSelectPanelMonsterIcon = GUIManager.LoadCommonGUI("SelectListPanel/SelectListPanelMonsterIconL", base.gameObject); this.csSelectPanelMonsterIcon = this.goSelectPanelMonsterIcon.GetComponent <GUISelectPanelMonsterIcon>(); if (null != this.goEFC_FOOTER) { this.goSelectPanelMonsterIcon.transform.parent = this.goEFC_FOOTER.transform; } Vector3 localPosition = this.goSelectPanelMonsterIcon.transform.localPosition; localPosition.x = -108.5f; GUICollider component = this.goSelectPanelMonsterIcon.GetComponent <GUICollider>(); component.SetOriginalPos(localPosition); Rect listWindowViewRect = default(Rect); listWindowViewRect.xMin = -480f; listWindowViewRect.xMax = 480f; listWindowViewRect.yMin = -297f - GUIMain.VerticalSpaceSize; listWindowViewRect.yMax = 158f + GUIMain.VerticalSpaceSize; this.csSelectPanelMonsterIcon.ListWindowViewRect = listWindowViewRect; this.csSelectPanelMonsterIcon.PARTS_CT_MN = 7; }
private void InitializeList() { GameObject gameObject = GUIManager.LoadCommonGUI("SelectListPanel/SelectListPanelPartyEdit", base.gameObject); this.listRoot = gameObject.GetComponent <GUISelectPanelPartyEdit>(); if (null != this.listRootParent) { gameObject.transform.parent = this.listRootParent.transform; } Vector3 localPosition = this.listParts.transform.localPosition; gameObject.transform.localPosition.y = localPosition.y; GUICollider component = gameObject.GetComponent <GUICollider>(); component.SetOriginalPos(localPosition); this.listRoot.selectParts = this.listParts; Rect listWindowViewRect = default(Rect); listWindowViewRect.xMin = -525f + localPosition.x; listWindowViewRect.xMax = 525f + localPosition.x; listWindowViewRect.yMin = -240f; listWindowViewRect.yMax = 240f; this.listRoot.ListWindowViewRect = listWindowViewRect; }
public static GameObject LoadCommonGUI(string guiName, GameObject parent) { string path = "UICommon/" + guiName; GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(path, typeof(GameObject))); if (gameObject == null) { return(null); } gameObject.name = guiName; gameObject.SetActive(true); Vector3 localPosition = gameObject.transform.localPosition; if (parent != null) { Vector3 localScale = gameObject.transform.localScale; gameObject.transform.parent = parent.transform; gameObject.transform.localScale = localScale; } gameObject.transform.localPosition = localPosition; if (localPosition.x < 0f) { localPosition.x = -localPosition.x; localPosition.x = (float)((int)localPosition.x % 2000); if (localPosition.x > 1000f) { localPosition.x -= 2000f; } localPosition.x = -localPosition.x; } else { if (localPosition.x > 1000f) { localPosition.x -= 2000f; } localPosition.x = (float)((int)localPosition.x % 2000); } if (localPosition.y < 0f) { localPosition.y = -localPosition.y; localPosition.y = (float)((int)localPosition.y % 2000); if (localPosition.y > 1000f) { localPosition.y -= 2000f; } localPosition.y = -localPosition.y; } else { if (localPosition.y > 1000f) { localPosition.y -= 2000f; } localPosition.y = (float)((int)localPosition.y % 2000); } gameObject.transform.localPosition = localPosition; GUICollider component = gameObject.GetComponent <GUICollider>(); if (component != null) { component.SetOriginalPos(localPosition); } GUIScreen component2 = gameObject.GetComponent <GUIScreen>(); if (component2 != null) { component2.ShowGUI(); } return(gameObject); }