UI/leaderboard/refactor/new leaderboard design#1626
Conversation
Renewed the looks of the LeaderboardClanPointsItem prefab. Adjusted leaderboard elements position.
The podium is now a part of the scroll view. Added temporary assets related to podium and started reformatting it. Turned the podium into a prefab.
Reshaping the podium. Modified the scroll view so that the podium goes from edge to edge.
Added podium to other leaderboards also. Modified the components of other leaderboards. Added placeholder graphics to correct places.
Main had overwritten some things in leaderboard view, adjusted them to the previous condition. Added a new prefab for the friends leaderboard scroll view items.
Added a button that scrolls to the top of the leaderboard. Adjusted the size of the text in leaderboard items. Added buttons and title to tab (not functional yet)
Added titles to tabline in leaderboards, made podium look a little better.
Added white nameplate placeholder and functionality for highlighting the players placement. Started "go to me" navi functionality. Added the correct tab to the players leaderboard. Small retouches to visuals.
Added the branch's changes to the leaderboard script
Friends leaderboard shows player and friends. Podium now get loaded correctly in leaderboards
Changed the character head sprites into body sprites in podium (not showing the correct sprite yet), made the podium buttons to show the correct account.
made the podium look closer to the plan. The box behind player info as well as the content changes between tabs.
Turned off the toggles to use the player avatar
The avatars in the leaderboards podium are now shown correctly (except the player in friends list). Changed the hierarchy location of tab line titles.
The tab titles work correctly again (scroll to me doesn't work currently because of this). Scroll to me button now gets disabled when the list is at the top.
Added better placeholder assets for podium. Scroll to me -button works now.
Scroll to me also works when player has a podium placement.
Cleaned code, made leaderboard points text more accurate
Changed fonts in leaderboards
| using UnityEngine; | ||
| using UnityEngine.UI; | ||
| using Altzone.Scripts; | ||
| using static UnityEditor.Progress; |
There was a problem hiding this comment.
Eikös tämä ole turha? Muutenkin tuolla taitaa olla muitakin turhia kirjastoja.
BillTheBeast
left a comment
There was a problem hiding this comment.
Korjaa noi mitä pistin tuohon ja lisää se kaveri listan avatarin asettaminen niin sanoisin, että voisi hyväksyä.
Voin lisätä sen yieldin koodin josset itse halua pistää sitä paikalleen.
|
|
||
| private string _clanId; | ||
|
|
||
| private string TruncateName(string name, int maxLength = 24) |
There was a problem hiding this comment.
Muista poistaa tämä täältä.
| private PlayerData _secondPlayerData; | ||
| private PlayerData _thirdPlayerData; | ||
|
|
||
| private string TruncateName(string name, int maxLength = 24) |
| private ScrollRect _scrollRect; | ||
| private RectTransform _contentPanel; | ||
|
|
||
| [SerializeField] private List<ScrollRect> _scrollRectScrollToMeList = new List<ScrollRect>(); |
There was a problem hiding this comment.
Onko mitään syytä miksi nämä pitää olla erillisinä listoina? Eikös tämä ala toimimaan väärin jos syystä tai toisesta listan sisällön järjestys muuttuu.
There was a problem hiding this comment.
Voisi olla varmaan parempi, jos tekee jonkun pikku luokan jonka sisään sekä toi scrollRect ja contentPanel pistetään ja kolmanneksi kentäksi lisätään enum, joka kertoo minkä osuuden tavarat sen sisällä pitäisi olla.
Sit voidaan hakea oikea "laatikko" aina sen enumin avulla ja se antaa aina oikean scrollRectin ja contentPanelin.
Toinen vaihtoehto olisi myös vain hylätä kokonaan tuo lista ja lisätä ne erillisinä kenttinä, jolloin pitäisi olla aina oikea tieto oikeassa paikassa. Varsinkin kun noita listoja on rajallinen määrä.
|
|
||
| //friend leaderboard | ||
| private List<FriendPlayer> _friendsPlayersList = new List<FriendPlayer>(); | ||
| private FriendPlayer player = new FriendPlayer(); |
There was a problem hiding this comment.
Tarvitseeko tämän olla globaali muuttuja?
| _contentPanel.localPosition = newPosition; | ||
| } | ||
|
|
||
| _scrollToTopButton.gameObject.SetActive(false); |
There was a problem hiding this comment.
Miksi tässä pistetään tämä nappula pois päältä? Eikös tuo Updaten sisältö yliaja
Changed the look of the leader boards according to prototype. Added functionality for going to the top of the list and finding the player's placement, as well as highlighting the player's placement.