void OnNextBtnClick() { if (currentSelectIndex < itemList.Count) { currentSelectIndex++; SelectContentName.text = LeaderModule.GetPortraitName(portraitType) + "_" + currentSelectIndex + 1; UpdateBtnState(); } }
void OnPreBtnClick() { if (currentSelectIndex > 0) { currentSelectIndex--; SelectContentName.text = LeaderModule.GetPortraitName(portraitType) + "_" + currentSelectIndex + 1; UpdateBtnState(); UIManager.Instance.SendMessageToWnd(UIPath.WindowPath.Leader_Custom_Page, new UIMessage(UIMsgType.LeaderCustom_Refresh_Portrait, new List <object>() { portraitType, currentSelectIndex })); } }
public void SetUpItem(LeaderPortraitType type, int speciesID, int sexID) { itemList = LeaderModule.GetLeagalPortraitImte(type, speciesID, sexID); if (itemList == null || itemList.Count == 0) { return; } ///Select Default portraitType = type; transform.FindTransfrom("Name").SafeGetComponent <Text>().text = LeaderModule.GetPortraitName(type); SelectContentName.text = LeaderModule.GetPortraitName(portraitType) + "_" + currentSelectIndex + 1; UpdateBtnState(); }