//=================================================================================== // // Default Method // //=================================================================================== public override void Init() { if (_TitleLabel != null) { _TitleLabel.text = StringTableManager.GetData(3494); } _GuildSearchButton.SetLabel(StringTableManager.GetData(6750)); // 6750 길드 검색 if (_MyGuild == null) { _MyGuild = UIResourceMgr.CreatePrefab <MyGuild>(BUNDLELIST.PREFABS_UI_GUILD, transform, "MyGuild"); _MyGuild.Init(this); } if (_GuildList == null) { _GuildList = UIResourceMgr.CreatePrefab <GuildList>(BUNDLELIST.PREFABS_UI_GUILD, transform, "GuildList"); _GuildList.Init(); } if (m_GuildDelegationPopupWindow == null) { m_GuildDelegationPopupWindow = UIResourceMgr.CreatePrefab <GuildDelegation>(BUNDLELIST.PREFABS_UI_GUILD, transform, "GuildDelegation"); m_GuildDelegationPopupWindow.Init(); m_GuildDelegationPopupWindow.CloseUI(); } m_iGuildDelegateCountGold = (int)CDATA_FIXED_CONSTANTS.Get(DATA_FIXED_CONSTANTS._enConstant.Guild_Delegate_Count_Gold).Value; SetMenu(enMyGuildMain_ButtonType.MyGuild); }
// Use this for initialization void Start() { btn = GetComponent <Button>(); dropdown = GameObject.Find("Canvas/GuildList").GetComponent <GuildList>(); dbService = GameObject.Find("Connection").GetComponent <DBConnection>(); name = transform.parent.Find("GuildName").GetComponent <InputField>(); btn.onClick.AddListener(GuildCreation); }
//=================================================================================== // // Method // //=================================================================================== public void Init(GuildList guildList) { m_Parent = guildList; m_GuildNameLabel.gameObject.SetActive(true); m_CaptainNameLabel.gameObject.SetActive(true); m_GuildLevelLabel.gameObject.SetActive(true); m_GuildMarkSprite.gameObject.SetActive(true); }
// Set guild list public static Coroutine SetGuildList(string accountId, GuildList guildIdList, GameDB.ActionOnResult <GuildList> func = null) { return(GameDB.instance.StartCoroutine(GameDB.Set <GuildList>( "AccountToGuilds", accountId, guildIdList, func ))); }
// Removes a guild ID from a player's guild list IEnumerator RemoveGuildFromGuildList(string guildId, string accountId, LobbyPeer requester = null) { // Player online? if (LobbyPlayer.accountIdToLobbyPlayer.ContainsKey(accountId)) { var playerKicked = LobbyPlayer.accountIdToLobbyPlayer[accountId]; // Get guild ID list if (playerKicked.guildList == null) { yield return(GuildsDB.GetGuildList(accountId, data => { if (data == null) { playerKicked.guildList = new GuildList(); } else { playerKicked.guildList = data; } })); } // Remove guild ID from the kicked player's guild ID list playerKicked.guildList.Remove(guildId); // Set guild ID list yield return(GuildsDB.SetGuildList(accountId, playerKicked.guildList)); // Send the kicked player the new guild ID list SendGuildList(playerKicked); // Player offline } else { GuildList guildList = null; // Get guild ID list yield return(GuildsDB.GetGuildList(accountId, data => { guildList = data; })); if (guildList == null) { if (requester != null) { Lobby.RPC("GuildKickError", requester, guildId, accountId); } yield break; } // Remove guild ID from the kicked player's guild ID list guildList.Remove(guildId); // Set guild ID list yield return(GuildsDB.SetGuildList(accountId, guildList)); } }
// Draw public override void Draw() { guildList = InGameLobby.instance.displayedAccount.guildList; using (new GUIVertical()) { switch (guildMenuState) { case GuildMenuState.ListGuilds: DrawGuildInterface(); break; case GuildMenuState.CreateGuild: DrawCreateGuildInterface(); break; } } }
public void UpdateGuildList(List <CharacterSetting> CharacterList) { string OldSelectedGuild = ((SelectedGuild >= 0 && SelectedGuild < GuildList.Count) ? GuildList[SelectedGuild] : null); List <string> ToRemove = new List <string>(); foreach (string GuildName in GuildList) { bool IsFound = false; foreach (CharacterSetting Character in CharacterList) { if (Character.GuildName == GuildName) { IsFound = true; break; } } if (!IsFound) { ToRemove.Add(GuildName); } } foreach (CharacterSetting Character in CharacterList) { if (Character.GuildName.Length > 0 && !GuildList.Contains(Character.GuildName)) { GuildList.Add(Character.GuildName); } } foreach (string GuildName in ToRemove) { GuildList.Remove(GuildName); } if (OldSelectedGuild != null && !GuildList.Contains(OldSelectedGuild)) { SelectedGuild = -1; } else if (GuildList.Count == 1 && SelectedGuild == -1) { SelectedGuild = 0; } }
//=================================================================================== // // Default Method // //=================================================================================== public override void Init() { if (m_GuildCreate == null) { m_GuildCreate = UIResourceMgr.CreatePrefab <GuildCreate>(BUNDLELIST.PREFABS_UI_GUILD, transform, "GuildCreate"); m_GuildCreate.Init(); } if (m_GuildList == null) { m_GuildList = UIResourceMgr.CreatePrefab <GuildList>(BUNDLELIST.PREFABS_UI_GUILD, transform, "GuildList"); m_GuildList.Init(); } OnJoinGuild(null); m_MainTitleLabel.text = StringTableManager.GetData(3494); m_JoinGuildButton.SetLabel(StringTableManager.GetData(6227)); m_CreateGuildButton.SetLabel(StringTableManager.GetData(6260)); }
//=================================================================================== // // Method // //=================================================================================== public void Init(GuildList guildList) { m_Parent = guildList; m_iGuildWaitingCount = (int)CDATA_FIXED_CONSTANTS.Get(DATA_FIXED_CONSTANTS._enConstant.Guild_Waiting_Count).Value; m_TitleLabel.text = StringTableManager.GetData(6248); m_GuildBenefitTitleLabel.text = StringTableManager.GetData(6250); m_GuildJoinRequestButtonLabel.text = StringTableManager.GetData(6252); m_GuildBenefitLabel.text = StringTableManager.GetData(8527); if (UserInfo.Instance.GuildKey != 0) { // 가입한 길드가 있다. m_GuildJoinRequestButton.SetActive(false); } else { // 가입한 길드가 없다. m_GuildJoinRequestButton.SetActive(true); } }
private TabControl ConstructMainTabControl() { // Main log list var logList = new LogList(LogCache, ApiData, LogDataProcessor, UploadProcessor, ImageProvider, LogNameProvider); LogCollectionsInitialized += (sender, args) => logList.DataStore = logsFiltered; LogDataProcessor.Processed += (sender, args) => { bool last = args.CurrentScheduledItems == 0; if (last || gridRefreshCooldown.TryUse(DateTime.Now)) { Application.Instance.AsyncInvoke(() => { logList.ReloadData(); }); } }; // Player list var playerList = new PlayerList(LogCache, ApiData, LogDataProcessor, UploadProcessor, ImageProvider, LogNameProvider); FilteredLogsUpdated += (sender, args) => playerList.UpdateDataFromLogs(logsFiltered); // Guild list var guildList = new GuildList(LogCache, ApiData, LogDataProcessor, UploadProcessor, ImageProvider, LogNameProvider); FilteredLogsUpdated += (sender, args) => guildList.UpdateDataFromLogs(logsFiltered); // Statistics var statistics = new StatisticsSection(ImageProvider, LogNameProvider); FilteredLogsUpdated += (sender, args) => statistics.UpdateDataFromLogs(logsFiltered.ToList()); // Game data collecting var gameDataCollecting = new GameDataCollecting(logList, LogCache, ApiData, LogDataProcessor, UploadProcessor, ImageProvider, LogNameProvider); var gameDataPage = new TabPage { Text = "Game data", Content = gameDataCollecting, Visible = Settings.ShowDebugData }; Settings.ShowDebugDataChanged += (sender, args) => gameDataPage.Visible = Settings.ShowDebugData; // Service status var serviceStatus = new DynamicLayout { Spacing = new Size(10, 10), Padding = new Padding(5) }; serviceStatus.BeginHorizontal(); { serviceStatus.Add(new GroupBox { Text = "Uploads", Content = new BackgroundProcessorDetail { BackgroundProcessor = UploadProcessor } }, xscale: true); serviceStatus.Add(new GroupBox { Text = "Guild Wars 2 API", Content = new BackgroundProcessorDetail { BackgroundProcessor = ApiProcessor } }, xscale: true); serviceStatus.Add(new GroupBox { Text = "Log parsing", Content = new BackgroundProcessorDetail { BackgroundProcessor = LogDataProcessor } }, xscale: true); } serviceStatus.AddRow(null); var servicePage = new TabPage { Text = "Services", Content = serviceStatus, Visible = Settings.ShowDebugData }; Settings.ShowDebugDataChanged += (sender, args) => servicePage.Visible = Settings.ShowDebugData; var tabs = new TabControl(); tabs.Pages.Add(new TabPage { Text = "Logs", Content = logList }); tabs.Pages.Add(new TabPage { Text = "Players", Content = playerList }); tabs.Pages.Add(new TabPage { Text = "Guilds", Content = guildList }); tabs.Pages.Add(new TabPage { Text = "Statistics", Content = statistics }); tabs.Pages.Add(gameDataPage); tabs.Pages.Add(servicePage); // This is needed to avoid a Gtk platform issue where the tab is changed to the last one. Shown += (sender, args) => tabs.SelectedIndex = 1; return(tabs); }
private void View_Resize(object sender, EventArgs e) { try { int width = View.Width; int height = View.Height; Wrapper.SetControlRect(Tabs, new Rectangle(45, 50, width - 45, height - 65)); DefinedLayout.SetControlRect(TimerList, new Rectangle(0, 0, width - 45, height - 80)); PlayerLayout.SetControlRect(PlayerList, new Rectangle(0, 0, width - 45, (height - 65) / 2)); PlayerLayout.SetControlRect(GuildList, new Rectangle(0, (height - 65) / 2, width - 45, (height - 65) / 2)); LogoutLayout.SetControlRect(FriendsList, new Rectangle(0, 20, (width - 45) / 2, height - 145)); LogoutLayout.SetControlRect(EnemiesList, new Rectangle((width - 45) / 2, 20, (width - 45) / 2, height - 145)); CorpseLayout.SetControlRect(CorpseList, new Rectangle(0, 0, width - 45, height - 80)); PortalLayout.SetControlRect(PortalList, new Rectangle(0, 0, width - 45, height - 80)); PlayerList.SetColumnWidth(1, width - 215); PlayerList.SetColumnWidth(2, 45); PlayerList.SetColumnWidth(3, 75); PlayerList.SetColumnWidth(4, 0); GuildList.SetColumnWidth(1, width - 215); GuildList.SetColumnWidth(2, 45); GuildList.SetColumnWidth(3, 75); GuildList.SetColumnWidth(4, 0); TimerList.SetColumnWidth(1, width - 215); TimerList.SetColumnWidth(2, 45); TimerList.SetColumnWidth(3, 75); TimerList.SetColumnWidth(4, 0); PortalList.SetColumnWidth(1, width - 215); PortalList.SetColumnWidth(2, 45); PortalList.SetColumnWidth(3, 75); PortalList.SetColumnWidth(4, 0); CorpseList.SetColumnWidth(1, width - 215); CorpseList.SetColumnWidth(2, 45); CorpseList.SetColumnWidth(3, 75); CorpseList.SetColumnWidth(4, 0); FriendsList.SetColumnWidth(0, (width - 45) / 2 - 45); EnemiesList.SetColumnWidth(0, (width - 45) / 2 - 45); Wrapper2.SetControlRect(Tabs2, new Rectangle(45, 100, width - 45, height - 100)); Rectangle controlRect = Wrapper.GetControlRect(VersusNote); Wrapper.SetControlRect(VersusNote, new Rectangle(width - 125, 32, 35, 15)); controlRect = Wrapper.GetControlRect(GuildNote); Wrapper.SetControlRect(GuildNote, new Rectangle(width - 205, 32, 70, 15)); controlRect = Wrapper.GetControlRect(EnemyNote); Wrapper.SetControlRect(EnemyNote, new Rectangle(width - 75, 32, 70, 15)); controlRect = LogoutLayout.GetControlRect(AddFriend); LogoutLayout.SetControlRect(AddFriend, new Rectangle((width - 45) / 2 - 40, height - 125, 40, 15)); controlRect = LogoutLayout.GetControlRect(AddEnemy); LogoutLayout.SetControlRect(AddEnemy, new Rectangle(width - 85, height - 125, 40, 15)); controlRect = LogoutLayout.GetControlRect(Friend); LogoutLayout.SetControlRect(Friend, new Rectangle(4, height - 125, (width - 45) / 2 - 45, 15)); controlRect = LogoutLayout.GetControlRect(Enemy); LogoutLayout.SetControlRect(Enemy, new Rectangle((width - 45) / 2 + 5, height - 125, (width - 45) / 2 - 45, 15)); controlRect = LogoutLayout.GetControlRect(FriendsNote); LogoutLayout.SetControlRect(FriendsNote, new Rectangle(5, 0, (width / 2) - 5, 15)); controlRect = LogoutLayout.GetControlRect(EnemiesNote); LogoutLayout.SetControlRect(EnemiesNote, new Rectangle((width / 2) + 5, 0, (width / 2) - 5, 15)); controlRect = AlertLayout.GetControlRect(AudioNote); AlertLayout.SetControlRect(AudioNote, new Rectangle(5, 5, width - 10, 20)); controlRect = AlertLayout.GetControlRect(AlertSPK); AlertLayout.SetControlRect(AlertSPK, new Rectangle(5, 25, ((width - 45) / 2) - 10, 20)); controlRect = AlertLayout.GetControlRect(AlertSS); AlertLayout.SetControlRect(AlertSS, new Rectangle(((width - 45) / 2) + 10, 25, (width / 2) - 10, 20)); controlRect = AlertLayout.GetControlRect(AlertOdds); AlertLayout.SetControlRect(AlertOdds, new Rectangle(5, 45, ((width - 45) / 2) - 10, 20)); controlRect = AlertLayout.GetControlRect(AlertBc); AlertLayout.SetControlRect(AlertBc, new Rectangle(((width - 45) / 2) + 10, 45, (width / 2) - 10, 20)); controlRect = AlertLayout.GetControlRect(AlertDT); AlertLayout.SetControlRect(AlertDT, new Rectangle(5, 65, ((width - 45) / 2) - 10, 20)); controlRect = AlertLayout.GetControlRect(AlertPKT); AlertLayout.SetControlRect(AlertPKT, new Rectangle(((width - 45) / 2) + 10, 65, (width / 2) - 10, 20)); controlRect = AlertLayout.GetControlRect(TextNote); AlertLayout.SetControlRect(TextNote, new Rectangle(5, 85, width - 10, 20)); controlRect = AlertLayout.GetControlRect(AlertPA); AlertLayout.SetControlRect(AlertPA, new Rectangle(5, 105, ((width - 45) / 2) - 10, 20)); controlRect = AlertLayout.GetControlRect(AlertPF); AlertLayout.SetControlRect(AlertPF, new Rectangle(5, 125, ((width - 45) / 2) - 10, 20)); controlRect = AlertLayout.GetControlRect(AlertLogP); AlertLayout.SetControlRect(AlertLogP, new Rectangle(((width - 45) / 2) + 10, 105, ((width - 45) / 2) - 10, controlRect.Height)); controlRect = AlertLayout.GetControlRect(AlertDA); AlertLayout.SetControlRect(AlertDA, new Rectangle(((width - 45) / 2) + 10, 125, ((width - 45) / 2) - 10, controlRect.Height)); controlRect = AlertLayout.GetControlRect(AlertLS); AlertLayout.SetControlRect(AlertLS, new Rectangle(5, 145, ((width - 45) / 2) - 10, 20)); controlRect = AlertLayout.GetControlRect(SaveSettings2); AlertLayout.SetControlRect(SaveSettings2, new Rectangle(0, height - 107, width - 45 - 60, 15)); controlRect = AlertLayout.GetControlRect(ResetAlarms); AlertLayout.SetControlRect(ResetAlarms, new Rectangle(width - 45 - 60, height - 107, 60, 15)); controlRect = SentryLayout.GetControlRect(ElementLbl); SentryLayout.SetControlRect(ElementLbl, new Rectangle(5, 5, 60, 20)); controlRect = SentryLayout.GetControlRect(BehaviourLbl); SentryLayout.SetControlRect(BehaviourLbl, new Rectangle((width - 45) / 2 + 5, 5, 60, 20)); controlRect = SentryLayout.GetControlRect(Element); SentryLayout.SetControlRect(Element, new Rectangle(5, 25, (width - 45) / 2 - 10, 20)); controlRect = SentryLayout.GetControlRect(Behaviour); SentryLayout.SetControlRect(Behaviour, new Rectangle((width - 45) / 2 + 5, 25, (width - 45) / 2 - 10, 20)); controlRect = SentryLayout.GetControlRect(Ticker); SentryLayout.SetControlRect(Ticker, new Rectangle(5, 45, 60, 15)); controlRect = SentryLayout.GetControlRect(TickerNote); SentryLayout.SetControlRect(TickerNote, new Rectangle(70, 45, (width - 45) / 2 - 45, 15)); controlRect = SentryLayout.GetControlRect(TickerNote2); SentryLayout.SetControlRect(TickerNote2, new Rectangle(5, 60, width - 45, 15)); controlRect = SentryLayout.GetControlRect(Range); SentryLayout.SetControlRect(Range, new Rectangle(5, 85, 30, 15)); controlRect = SentryLayout.GetControlRect(RangeNote); SentryLayout.SetControlRect(RangeNote, new Rectangle(40, 85, 120, 15)); controlRect = SentryLayout.GetControlRect(Timer); SentryLayout.SetControlRect(Timer, new Rectangle(5, 105, 30, 15)); controlRect = SentryLayout.GetControlRect(TimerNote); SentryLayout.SetControlRect(TimerNote, new Rectangle(40, 105, 120, 15)); controlRect = SentryLayout.GetControlRect(Comps); SentryLayout.SetControlRect(Comps, new Rectangle(5, 125, 30, 15)); controlRect = SentryLayout.GetControlRect(TapersNote); SentryLayout.SetControlRect(TapersNote, new Rectangle(40, 125, 120, 15)); controlRect = SentryLayout.GetControlRect(Slots); SentryLayout.SetControlRect(Slots, new Rectangle(5, 145, 30, 15)); controlRect = SentryLayout.GetControlRect(SlotsNote); SentryLayout.SetControlRect(SlotsNote, new Rectangle(40, 145, 120, 15)); controlRect = SentryLayout.GetControlRect(UseMacroLogic); SentryLayout.SetControlRect(UseMacroLogic, new Rectangle((width - 45) / 2 + 5, 85, (width - 45) / 2 - 10, 15)); controlRect = SentryLayout.GetControlRect(UseLogDie); SentryLayout.SetControlRect(UseLogDie, new Rectangle((width - 45) / 2 + 5, 105, (width - 45) / 2 - 10, 15)); controlRect = SentryLayout.GetControlRect(SaveSettings3); SentryLayout.SetControlRect(SaveSettings3, new Rectangle(0, height - 107, width - 45 - 60, 15)); controlRect = SentryLayout.GetControlRect(ResetOptions); SentryLayout.SetControlRect(ResetOptions, new Rectangle(width - 45 - 60, height - 107, 60, 15)); controlRect = Wrapper.GetControlRect(Die); Wrapper.SetControlRect(Die, new Rectangle(0, height - 15, 40, 15)); controlRect = Wrapper.GetControlRect(IgnoreVP); Wrapper.SetControlRect(IgnoreVP, new Rectangle(40, height - 15, 40, 15)); controlRect = Wrapper.GetControlRect(Fixbusy); Wrapper.SetControlRect(Fixbusy, new Rectangle(80, height - 15, 40, 15)); controlRect = Wrapper.GetControlRect(Loc); Wrapper.SetControlRect(Loc, new Rectangle(120, height - 15, 40, 15)); controlRect = Wrapper.GetControlRect(ModeLbl); Wrapper.SetControlRect(ModeLbl, new Rectangle(165, height - 15, 35, 15)); controlRect = Wrapper.GetControlRect(Mode); Wrapper.SetControlRect(Mode, new Rectangle(200, height - 15, width - 190, 15)); controlRect = Wrapper.GetControlRect(Imperil); Wrapper.SetControlRect(Imperil, new Rectangle(0, 0, 40, 15)); controlRect = Wrapper.GetControlRect(Bludge); Wrapper.SetControlRect(Bludge, new Rectangle(40, 0, 40, 15)); controlRect = Wrapper.GetControlRect(Slash); Wrapper.SetControlRect(Slash, new Rectangle(80, 0, 40, 15)); controlRect = Wrapper.GetControlRect(Pierce); Wrapper.SetControlRect(Pierce, new Rectangle(120, 0, 40, 15)); controlRect = Wrapper.GetControlRect(Light); Wrapper.SetControlRect(Light, new Rectangle(0, 15, 40, 15)); controlRect = Wrapper.GetControlRect(Acid); Wrapper.SetControlRect(Acid, new Rectangle(40, 15, 40, 15)); controlRect = Wrapper.GetControlRect(Fire); Wrapper.SetControlRect(Fire, new Rectangle(80, 15, 40, 15)); controlRect = Wrapper.GetControlRect(Cold); Wrapper.SetControlRect(Cold, new Rectangle(120, 15, 40, 15)); controlRect = Wrapper.GetControlRect(Stam); Wrapper.SetControlRect(Stam, new Rectangle(200, 0, 40, 15)); controlRect = Wrapper.GetControlRect(Harm); Wrapper.SetControlRect(Harm, new Rectangle(200, 15, 40, 15)); controlRect = Wrapper.GetControlRect(Tag); Wrapper.SetControlRect(Tag, new Rectangle(240, 0, width - 240, 30)); controlRect = AdminLayout.GetControlRect(AdminNote); AdminLayout.SetControlRect(AdminNote, new Rectangle(5, 5, width - 50, 15)); controlRect = AdminLayout.GetControlRect(ForcelogNote); AdminLayout.SetControlRect(ForcelogNote, new Rectangle(5, 35, 100, 15)); controlRect = AdminLayout.GetControlRect(ForcelogBox); AdminLayout.SetControlRect(ForcelogBox, new Rectangle(5, 55, width - 110, 15)); controlRect = AdminLayout.GetControlRect(ForcelogButton); AdminLayout.SetControlRect(ForcelogButton, new Rectangle(0, 85, (width - 50) / 2, 15)); controlRect = AdminLayout.GetControlRect(ForceRelogButton); AdminLayout.SetControlRect(ForceRelogButton, new Rectangle((width - 50) / 2, 85, (width - 50) / 2, 15)); controlRect = AdminLayout.GetControlRect(ForcelocButton); AdminLayout.SetControlRect(ForcelocButton, new Rectangle(0, 105, (width - 50) / 2, 15)); controlRect = AdminLayout.GetControlRect(ForcedieButton); AdminLayout.SetControlRect(ForcedieButton, new Rectangle((width - 50) / 2, 105, (width - 50) / 2, 15)); controlRect = Wrapper.GetControlRect(Strength); Wrapper.SetControlRect(Strength, new Rectangle(0, 50, 20, 20)); controlRect = Wrapper.GetControlRect(Endurance); Wrapper.SetControlRect(Endurance, new Rectangle(20, 50, 20, 20)); controlRect = Wrapper.GetControlRect(Coordination); Wrapper.SetControlRect(Coordination, new Rectangle(0, 70, 20, 20)); controlRect = Wrapper.GetControlRect(Quickness); Wrapper.SetControlRect(Quickness, new Rectangle(20, 70, 20, 20)); controlRect = Wrapper.GetControlRect(Focus); Wrapper.SetControlRect(Focus, new Rectangle(0, 90, 20, 20)); controlRect = Wrapper.GetControlRect(Willpower); Wrapper.SetControlRect(Willpower, new Rectangle(20, 90, 20, 20)); controlRect = Wrapper.GetControlRect(Run); Wrapper.SetControlRect(Run, new Rectangle(0, 120, 20, 20)); controlRect = Wrapper.GetControlRect(StamRegen); Wrapper.SetControlRect(StamRegen, new Rectangle(20, 120, 20, 20)); controlRect = Wrapper.GetControlRect(Creature); Wrapper.SetControlRect(Creature, new Rectangle(0, 150, 20, 20)); controlRect = Wrapper.GetControlRect(Life); Wrapper.SetControlRect(Life, new Rectangle(20, 150, 20, 20)); controlRect = Wrapper.GetControlRect(War); Wrapper.SetControlRect(War, new Rectangle(0, 170, 20, 20)); controlRect = Wrapper.GetControlRect(MagicD); Wrapper.SetControlRect(MagicD, new Rectangle(20, 170, 20, 20)); controlRect = Wrapper.GetControlRect(HeavyW); Wrapper.SetControlRect(HeavyW, new Rectangle(0, 190, 20, 20)); controlRect = Wrapper.GetControlRect(MelD); Wrapper.SetControlRect(MelD, new Rectangle(20, 190, 20, 20)); controlRect = Wrapper.GetControlRect(MissW); Wrapper.SetControlRect(MissW, new Rectangle(0, 210, 20, 20)); controlRect = Wrapper.GetControlRect(MissD); Wrapper.SetControlRect(MissD, new Rectangle(20, 210, 20, 20)); } catch (Exception ex) { Repo.RecordException(ex); } }
//Bundle加载帮会列表结束 void OnLoadGuildListItem(GameObject resItem, object param) { if (null == resItem) { LogModule.ErrorLog("load Guild List item fail"); return; } Utils.CleanGrid(m_GuildListGrid); List <GuildPreviewInfo> list = GameManager.gameManager.PlayerDataPool.guildList.GuildInfoList; list = GuildList.GuildSort(list); if (null == list) { return; } //计算最大页数和当前页数 m_nCurGuildListPage = 1; if (m_bIsOnlyShowEnemyGuild) { int nEnemyCount = 0; for (int i = 0; i < list.Count; ++i) { if (list[i].IsEnemyGuild) { nEnemyCount++; } } m_nMaxGuildListPage = (int)(nEnemyCount / m_nGuildNumPerPage) + 1; } else { m_nMaxGuildListPage = (int)(list.Count / m_nGuildNumPerPage) + 1; } m_GuildPageLable.text = string.Format("{0}/{1}", m_nCurGuildListPage, m_nMaxGuildListPage); //填充数据 int nGuildListStartIndex = (m_nCurGuildListPage - 1) * m_nGuildNumPerPage; int nSelectCount = 0; for (; nGuildListStartIndex < list.Count; ++nGuildListStartIndex) { if (nSelectCount >= m_nGuildNumPerPage) { break; } if (list.Count > nGuildListStartIndex) { GuildPreviewInfo info = list[nGuildListStartIndex]; //如果需要筛选 敌对帮会 则跳过非敌对的帮会 if (m_bIsOnlyShowEnemyGuild && info.IsEnemyGuild == false) { continue; } if (info.GuildGuid != GlobeVar.INVALID_GUID) { GameObject newGuildListItem = Utils.BindObjToParent(resItem, m_GuildListGrid, nGuildListStartIndex.ToString()); if (null != newGuildListItem && null != newGuildListItem.GetComponent <GuildListItemLogic>()) { newGuildListItem.GetComponent <GuildListItemLogic>().Init(info); } nSelectCount++; } } } //Grid排序,防止列表异常 if (m_GuildListGrid.GetComponent <UIGrid>() != null) { m_GuildListGrid.GetComponent <UIGrid>().Reposition(); } if (m_GuildListGrid.GetComponent <UITopGrid>() != null) { //m_GuildListGrid.GetComponent<UITopGrid>().Recenter(true); } //根据等级处理创建帮会按钮 if (null != Singleton <ObjManager> .GetInstance().MainPlayer&& null != m_CreateGuildBtn) { if (Singleton <ObjManager> .GetInstance().MainPlayer.BaseAttr.Level >= GlobeVar.CREATE_GUILD_LEVEL) { m_CreateGuildBtn.gameObject.SetActive(true); } else { m_CreateGuildBtn.gameObject.SetActive(false); } } }