private void ResetPosition() { EventItemPrefab.GetComponent <UIGrid>().Reposition(); var scroll = EventItemPrefab.GetComponentInParent <UIScrollView>(); if (scroll != null) { scroll.ResetPosition(); } }
////////////////////////////////////////////////////////////////////////// private void InitGuildMember() { GuildMemberPrefabManager.Clear(); foreach (var member in GuildManager.Instance.GuildMembers) { var item = GuildMemberPrefabManager.GetNewObject <GuildMemberItem>(GuildMemberPrefabManager.transform, Vector3.zero); item.Init(member); } GuildMemberPrefabManager.GetComponent <UIGrid>().Reposition(); GuildMemberPrefabManager.GetComponentInParent <UIScrollView>().ResetPosition(); m_LabelMemberCount.text = Localization.Format("GuildMemberFormat", GuildManager.Instance.GuildMembers.Count, GuildManager.Instance.GuildMemberMax); }
private void InitGuildRequest() { GuildRequestPrefabManager.Clear(); foreach (var request in Requested) { var item = GuildRequestPrefabManager.GetNewObject <GuildRequestItem>(GuildRequestPrefabManager.transform, Vector3.zero); item.Init(request, OnSelect); } GuildRequestPrefabManager.GetComponent <UIGrid>().Reposition(); GuildRequestPrefabManager.GetComponentInParent <UIScrollView>().ResetPosition(); m_LabelRequestCount.text = Localization.Format("GuildMemberFormat", Requested.Count, GuildInfoManager.Config.GuildRequestCount); }