public static void AddRockImage(GameObject _objParent, int _dSlotIndex, string _strNeed) { GameObject RockImage = ResourceLoad.GetEzGuiTexture(ScrollData.objIconRock_56_76); GameObject RockMent = new GameObject(); RockImage.name = "RockImage_" + _dSlotIndex; RockMent.name = "RockMent_" + _dSlotIndex; ResourceLoad.SetSpriteText_OutLine(RockMent, ScrollData.objSpriteText24, ScrollData.objSpriteText_stroke24); RockMent.GetComponent <EzGui_SpriteText_Outline>().SetColor(new Color(0.7451f, 0.0f, 0.0f), Color.white); RockMent.GetComponent <EzGui_SpriteText_Outline>().SetAnchor(SpriteText.Anchor_Pos.Middle_Center); RockMent.GetComponent <EzGui_SpriteText_Outline>().SetAllignment(SpriteText.Alignment_Type.Center); RockMent.GetComponent <EzGui_SpriteText_Outline>().SetText(_strNeed); if (RockImage.GetComponent <EzGui_Texture>()) { RockImage.GetComponent <EzGui_Texture>().GetEZGUITexture().anchor = SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER; } // RockImage.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f); RockImage.transform.localPosition = m_posRockImage; RockMent.transform.localPosition = m_posRockMent; RockImage.transform.parent = _objParent.transform; RockMent.transform.parent = _objParent.transform; }
public static void AddDeleteTimeToContainer(GameObject _objContainer, int _dSlotIndex, string _strSlotDeleteTime) { GameObject ObjectDeleteTime = new GameObject(m_strSlotDeleteTime); ResourceLoad.SetSpriteText_OutLine(ObjectDeleteTime, ScrollData.objSpriteText30, ScrollData.objSpriteText_stroke30); ObjectDeleteTime.GetComponent <EzGui_SpriteText_Outline>().SetColor(Color.white, Color.black); ObjectDeleteTime.GetComponent <EzGui_SpriteText_Outline>().SetAnchor(SpriteText.Anchor_Pos.Middle_Center); ObjectDeleteTime.GetComponent <EzGui_SpriteText_Outline>().SetAllignment(SpriteText.Alignment_Type.Center); ObjectDeleteTime.GetComponent <EzGui_SpriteText_Outline>().SetText(_strSlotDeleteTime); ObjectDeleteTime.transform.localPosition = m_posDeleteTimeFont; _objContainer.GetComponent <UIListItemContainer>().MakeChild(ObjectDeleteTime); }
public static void AddItemNumToContainer(GameObject _objContainer, int _dSlotIndex, string _strInitNum) { GameObject CubeSlotFont = new GameObject("ItemNum_" + _dSlotIndex); ResourceLoad.SetSpriteText_OutLine(CubeSlotFont, ScrollData.objSpriteText30, ScrollData.objSpriteText_stroke30); CubeSlotFont.GetComponent <EzGui_SpriteText_Outline>().SetColor(Color.white, Color.black); CubeSlotFont.GetComponent <EzGui_SpriteText_Outline>().SetAnchor(SpriteText.Anchor_Pos.Middle_Right); CubeSlotFont.GetComponent <EzGui_SpriteText_Outline>().SetAllignment(SpriteText.Alignment_Type.Center); CubeSlotFont.GetComponent <EzGui_SpriteText_Outline>().SetText("X" + _strInitNum); CubeSlotFont.transform.position = m_posItemNum; _objContainer.GetComponent <UIListItemContainer>().MakeChild(CubeSlotFont); }
public static void AddNameToContainer(GameObject _objContainer, int _dSlotIndex, string _strSlotTitle) { GameObject SlotTitle = new GameObject(m_strSlotTitle + _dSlotIndex); ResourceLoad.SetSpriteText_OutLine(SlotTitle, ScrollData.objSpriteText30, ScrollData.objSpriteText_stroke30); SlotTitle.GetComponent <EzGui_SpriteText_Outline>().SetColor(ScrollData.colorShopSlotTitleFront, ScrollData.colorShopSlotTitleBack); SlotTitle.GetComponent <EzGui_SpriteText_Outline>().SetAnchor(SpriteText.Anchor_Pos.Upper_Center); SlotTitle.GetComponent <EzGui_SpriteText_Outline>().SetAllignment(SpriteText.Alignment_Type.Center); SlotTitle.GetComponent <EzGui_SpriteText_Outline>().SetText(_strSlotTitle); // ResourceLoad.SetSpriteText(SlotTitle, ScrollData.objSpriteText30); // // SlotTitle.GetComponent<EzGui_SpriteText>().SetColor(ScrollData.colorShopSlotTitle); // SlotTitle.GetComponent<EzGui_SpriteText>().SetAnchor(SpriteText.Anchor_Pos.Upper_Center); // SlotTitle.GetComponent<EzGui_SpriteText>().SetAllignment(SpriteText.Alignment_Type.Center); // SlotTitle.GetComponent<EzGui_SpriteText>().SetText(_strSlotTitle); SlotTitle.transform.localPosition = m_posTitleFont; _objContainer.GetComponent <UIListItemContainer>().MakeChild(SlotTitle); }