public override void OnInit() { base.OnInit(); AddPropChangedNotify((int)MVCPropertyID.enFriendList, OnPropertyChanged); m_item = FindChild("ItemPlace"); m_sortBtn = FindChild("CardSort"); m_friendGridList = FindChildComponent <UIGrid>("GridList"); m_cardSortLable = FindChildComponent <UILabel>("CardSortLabel"); m_curFrdNumLab = FindChildComponent <UILabel>("Capacity"); m_capacityNumLab = FindChildComponent <UILabel>("MaxCapacity"); // m_scrollBar = FindChildComponent<UIScrollBar>("List"); m_friendList = new Dictionary <int, UIWindow>(); m_cardSortUI = UICardSort.Load(); m_cardSortUI.SetParentWnd(this); InitBaseDate(); }
public override void OnInit() { base.OnInit(); AddPropChangedNotify((int)MVCPropertyID.enOperateCardList, OnPropertyChanged); AddPropChangedNotify((int)MVCPropertyID.enCardBag, OnCardBagPropertyChanged); m_gridList = new Dictionary <int, UICardItem>(); // m_item = FindChildComponent<UIDragScrollView>("Grid"); m_ruSure = FindChildComponent <UIPanel>("RUSure"); m_sellItem = FindChildComponent <UITexture>("SellItem"); m_sellImageList = new Dictionary <int, GameObject>(); m_grid = FindChildComponent <UIGrid>("ItemList"); m_grid2 = FindChildComponent <UIGrid>("ItemList2"); m_tips = FindChildComponent <UILabel>("RUSureTips"); m_gridItemList = FindChildComponent <UIGrid>("GridList"); // 队伍编辑 UIOperateTeam teamItem = UIOperateTeam.Create(); AddNewWindow(OperateCardList.TYPE.enTeamCardListType, teamItem); // 点击的回调 AddClickCallback(OperateCardList.TYPE.enTeamCardListType, teamItem.OnClickTeamItem); // 排列的回调 AddSortCallback(OperateCardList.TYPE.enTeamCardListType, teamItem.OnSortCondion); // 出售编辑 UIOperateSell sellItem = UIOperateSell.Create(); AddNewWindow(OperateCardList.TYPE.enSellType, sellItem); AddClickCallback(OperateCardList.TYPE.enSellType, sellItem.OnClickItem); AddSortCallback(OperateCardList.TYPE.enSellType, sellItem.OnSortCondion); // 升级基本卡编辑 UIOperateLevelupBaseCard levelupBaseItem = UIOperateLevelupBaseCard.Create(); AddNewWindow(OperateCardList.TYPE.enCardLevelUpBaseCardType, levelupBaseItem); AddClickCallback(OperateCardList.TYPE.enCardLevelUpBaseCardType, levelupBaseItem.OnClickItem); AddSortCallback(OperateCardList.TYPE.enCardLevelUpBaseCardType, levelupBaseItem.OnSortCondion); // 强化合成编辑 UIOperateLevelupDataCard levelupDataItem = UIOperateLevelupDataCard.Create(); AddNewWindow(OperateCardList.TYPE.enCardLevelUpDataCardType, levelupDataItem); AddClickCallback(OperateCardList.TYPE.enCardLevelUpDataCardType, levelupDataItem.OnClickItem); AddSortCallback(OperateCardList.TYPE.enCardLevelUpDataCardType, levelupDataItem.OnSortCondion); // 进化 的基本卡牌列表 UIOperateEvolution evolutionItem = UIOperateEvolution.Create(); AddNewWindow(OperateCardList.TYPE.enCardEvolutionBaseCardType, evolutionItem); AddClickCallback(OperateCardList.TYPE.enCardEvolutionBaseCardType, evolutionItem.OnClickItem); AddSortCallback(OperateCardList.TYPE.enCardEvolutionBaseCardType, evolutionItem.OnSortCondion); // UIOperateCardDivision divsionItem = UIOperateCardDivision.Create(); AddNewWindow(OperateCardList.TYPE.enCardDivisionUpdate, divsionItem); AddClickCallback(OperateCardList.TYPE.enCardDivisionUpdate, divsionItem.OnClickItem); AddSortCallback(OperateCardList.TYPE.enCardDivisionUpdate, divsionItem.OnSortCondion); // UIOperateRepresentativeCard representativeItem = UIOperateRepresentativeCard.Create(); AddNewWindow(OperateCardList.TYPE.enSelectRepresentativeCard, representativeItem); AddClickCallback(OperateCardList.TYPE.enSelectRepresentativeCard, representativeItem.OnClickItem); AddSortCallback(OperateCardList.TYPE.enSelectRepresentativeCard, representativeItem.OnSortCondion); m_cardSortUI = UICardSort.Load(); m_cardSortUI.SetParentWnd(this); m_cardSortUI.SortCards(ENSortType.enDefault, true); HideWindow(); }
public static UICardSort Load() { UICardSort sort = UIManager.Singleton.LoadUI <UICardSort>("UI/UICardSort", UIManager.Anchor.Center); return(sort); }
public override void OnInit() { base.OnInit(); AddPropChangedNotify((int)MVCPropertyID.enCardBag, OnPropertyChanged); m_gridList = new Dictionary <int, UICardItem>(); m_capacity = FindChildComponent <UILabel>("Capacity"); m_maxCapacity = FindChildComponent <UILabel>("MaxCapacity"); m_selectLayout = FindChildComponent <UIPanel>("SelectLayout"); m_option = FindChildComponent <UIPanel>("Option"); m_optionName = FindChildComponent <UILabel>("CardInfoname"); m_optionLevel = FindChildComponent <UILabel>("CardInfoLevel"); m_optionHp = FindChildComponent <UILabel>("CardInfoRhp"); m_optionMagAttack = FindChildComponent <UILabel>("CardInfoRmagAttack"); m_optionPhyAttack = FindChildComponent <UILabel>("CardInfoRphyAttack"); m_optionRace = FindChildComponent <UILabel>("CardInfoRace_name"); m_opInfoOp = FindChildComponent <UILabel>("CardInfoOccupation_name"); m_grid = FindChildComponent <UIGrid>("GridList"); m_cardSortLable = FindChildComponent <UILabel>("CardSortLabel"); // m_itemPanel = FindChildComponent<UIPanel>("List"); m_bagBar = FindChildComponent <UIProgressBar>("BagBar"); m_dragBox = FindChild("DragBox"); EventDelegate.Add(m_bagBar.onChange, OnScrollBar); m_cardSortUI = UICardSort.Load(); m_cardSortUI.SetParentWnd(this); m_cardSortUI.SortCards(ENSortType.enDefault, true); InitBag(); UpdateInfo(); WorldParamInfo worldParamInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enBagGridBgIconId); IconInfomation iconInfo = GameTable.IconInfoTableAsset.Lookup(worldParamInfo.IntTypeValue); m_gridBgTexture = PoolManager.Singleton.LoadIcon <Texture>(iconInfo.dirName); worldParamInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enBagExpandIconId); iconInfo = GameTable.IconInfoTableAsset.Lookup(worldParamInfo.IntTypeValue); m_extendBagTexture = PoolManager.Singleton.LoadIcon <Texture>(iconInfo.dirName); //营地卡牌详细信息界面 // m_infoReturn = FindChildComponent<UIButton>("Button_return"); m_cardInfoRace = FindChildComponent <UITexture>("CardInfoRace"); m_cardInfoOccupation = FindChildComponent <UITexture>("CardInfoOccupation"); m_rarityTexture = FindChildComponent <UITexture>("rarityIcon"); m_cardInfoMain = FindChildComponent <UITexture>("CardInfoMain"); m_cardInfoLove = FindChildComponent <UISprite>("cardInfoLove"); // m_joinLoveButton = FindChildComponent<UIButton>("Button_join_love"); m_joinLoveSprite = FindChildComponent <UISprite>("join_love"); m_stengThen = FindChildComponent <UIButton>("Button_strengthen_synthesis"); m_evlotion = FindChildComponent <UIButton>("Button_dan_upgrade"); m_deputyLabel = FindChildComponent <UILabel>("deputyLabel"); m_chosenLable = FindChildComponent <UILabel>("ChosenLable"); }