Skip to content

Commit

Permalink
Update visible player rating on Save and Validate All in Profile Tab
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Nov 24, 2019
1 parent fe7f462 commit 9da1b16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ local profilebuttons =
if ButtonActive(self) and rankingSkillset == 1 then
if PROFILEMAN:SaveProfile(PLAYER_1) then
ms.ok(translated_info["Success"])
STATSMAN:UpdatePlayerRating()
else
ms.ok(translated_info["Failure"])
end
Expand Down Expand Up @@ -736,6 +737,7 @@ local profilebuttons =
MouseLeftClickMessageCommand = function(self)
if ButtonActive(self) and rankingSkillset == 1 then
SCOREMAN:ValidateAllScores()
STATSMAN:UpdatePlayerRating()
end
end
}
Expand Down
6 changes: 6 additions & 0 deletions Themes/Til Death/BGAnimations/_PlayerInfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ t[#t + 1] =
playTime = profile:GetTotalSessionSeconds()
noteCount = profile:GetTotalTapsAndHolds()
playerRating = profile:GetPlayerRating()
end,
PlayerRatingUpdatedMessageCommand = function(self)
playerRating = profile:GetPlayerRating()
self:GetParent():GetChild("AvatarPlayerNumber_P1"):GetChild("Name"):playcommand("Set")
end
}

Expand Down Expand Up @@ -131,10 +135,12 @@ t[#t + 1] =
},
LoadFont("Common Normal") ..
{
Name = "Name",
InitCommand = function(self)
self:xy(AvatarX + 53, AvatarY + 7):maxwidth(400):halign(0):zoom(0.6):diffuse(getMainColor("positive"))
end,
SetCommand = function(self)
ms.ok(1)
self:settextf("%s: %5.2f", profileName, playerRating)
if profileName == "Default Profile" or profileName == "" then
easyInputStringWithFunction(
Expand Down

0 comments on commit 9da1b16

Please sign in to comment.