Index: binaries/data/mods/public/gui/lobby/LeaderboardPage/LeaderboardPage.js =================================================================== --- binaries/data/mods/public/gui/lobby/LeaderboardPage/LeaderboardPage.js +++ binaries/data/mods/public/gui/lobby/LeaderboardPage/LeaderboardPage.js @@ -30,7 +30,6 @@ { this.leaderboardPage.hidden = false; Engine.SetGlobalHotkey("cancel", "Press", this.onPressClose.bind(this)); - Engine.SendGetBoardList(); let playerName = this.leaderboardList.selectedPlayer(); for (let handler of this.openPageHandlers) Index: binaries/data/mods/public/gui/lobby/LobbyPage/ProfilePanel.js =================================================================== --- binaries/data/mods/public/gui/lobby/LobbyPage/ProfilePanel.js +++ binaries/data/mods/public/gui/lobby/LobbyPage/ProfilePanel.js @@ -72,7 +72,7 @@ if (!playerName) return; - this.playernameText.caption = playerName; + this.playernameText.caption = PlayerColor.ColorPlayerName(escapeText(playerName)); this.updatePlayerRoleText(playerName); this.rankText.caption = this.NotAvailable; @@ -91,7 +91,7 @@ if (attributes.rating == "-2" || attributes.player != this.requestedPlayer) return; - this.playernameText.caption = attributes.player; + this.playernameText.caption = PlayerColor.ColorPlayerName(escapeText(attributes.player), attributes.rating); this.updatePlayerRoleText(attributes.player); this.rankText.caption = attributes.rank; Index: binaries/data/mods/public/gui/lobby/ProfilePage/ProfilePage.js =================================================================== --- binaries/data/mods/public/gui/lobby/ProfilePage/ProfilePage.js +++ binaries/data/mods/public/gui/lobby/ProfilePage/ProfilePage.js @@ -12,6 +12,8 @@ this.fetchInput = Engine.GetGUIObjectByName("fetchInput"); this.fetchInput.onPress = this.onPressLookup.bind(this); + this.fetchInput.onTab = this.autocomplete.bind(this); + this.fetchInput.tooltip = colorizeAutocompleteHotkey(); Engine.GetGUIObjectByName("viewProfileButton").onPress = this.onPressLookup.bind(this); Engine.GetGUIObjectByName("profileBackButton").onPress = this.onPressClose.bind(this, true); @@ -46,6 +48,16 @@ Engine.SendGetProfile(this.requestedPlayer); } + autocomplete() + { + const listPlayerNames = Engine.GetPlayerList().map(player => escapeText(player.name)); + Engine.GetBoardList().forEach((entry, i) => { + if (!listPlayerNames.includes(escapeText(entry.name))) + listPlayerNames.push(escapeText(entry.name)); + }); + autoCompleteText(this.fetchInput, listPlayerNames); + } + onPressClose() { this.profilePage.hidden = true; @@ -73,7 +85,7 @@ return; } - this.profilePlayernameText.caption = escapeText(attributes.player); + this.profilePlayernameText.caption = PlayerColor.ColorPlayerName(escapeText(attributes.player), attributes.rating); this.profileRankText.caption = attributes.rank; this.profileHighestRatingText.caption = attributes.highestRating; this.profileTotalGamesText.caption = attributes.totalGamesPlayed; Index: binaries/data/mods/public/gui/prelobby/login/login.js =================================================================== --- binaries/data/mods/public/gui/prelobby/login/login.js +++ binaries/data/mods/public/gui/prelobby/login/login.js @@ -48,4 +48,5 @@ Engine.SwitchGuiPage("page_lobby.xml", { "dialog": false }); + Engine.SendGetBoardList(); }