Skip to content

UI/leaderboard/refactor/new leaderboard design#1626

Open
Emilierald wants to merge 28 commits into
mainfrom
UI/Leaderboard/Refactor/NewLeaderboardDesign
Open

UI/leaderboard/refactor/new leaderboard design#1626
Emilierald wants to merge 28 commits into
mainfrom
UI/Leaderboard/Refactor/NewLeaderboardDesign

Conversation

@Emilierald

Copy link
Copy Markdown
Contributor

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.

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
@Emilierald Emilierald requested a review from BillTheBeast June 5, 2026 15:40
using UnityEngine;
using UnityEngine.UI;
using Altzone.Scripts;
using static UnityEditor.Progress;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eikös tämä ole turha? Muutenkin tuolla taitaa olla muitakin turhia kirjastoja.

@BillTheBeast BillTheBeast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muista poistaa tämä täältä.

private PlayerData _secondPlayerData;
private PlayerData _thirdPlayerData;

private string TruncateName(string name, int maxLength = 24)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sama kuin edellinen

private ScrollRect _scrollRect;
private RectTransform _contentPanel;

[SerializeField] private List<ScrollRect> _scrollRectScrollToMeList = new List<ScrollRect>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tarvitseeko tämän olla globaali muuttuja?

_contentPanel.localPosition = newPosition;
}

_scrollToTopButton.gameObject.SetActive(false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miksi tässä pistetään tämä nappula pois päältä? Eikös tuo Updaten sisältö yliaja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants