Skip to content

Commit

Permalink
rebirth hovering player name shows tooltip saying what will happen
Browse files Browse the repository at this point in the history
if you click
  • Loading branch information
poco0317 committed Feb 25, 2023
1 parent 424eba6 commit b0be391
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ local translations = {
ViewRecentScores = THEME:GetString("ScreenSelectMusic Profile", "ViewRecentScores"),
ShowingLocalScores = THEME:GetString("ScreenSelectMusic Profile", "ShowingLocalScores"),
ShowingOnlineScores = THEME:GetString("ScreenSelectMusic Profile", "ShowingOnlineScores"),
SetPlayerName = THEME:GetString("ScreenSelectMusic Profile", "SetPlayerName"),
}

-- the page names in the order they go
Expand Down Expand Up @@ -1064,20 +1065,30 @@ local function createList()
else
self:settext(pname)
end
if self:IsInvisible() then return end
if isOver(self) then
TOOLTIP:SetText(translations["SetPlayerName"])
TOOLTIP:Show()
end
end,
ProfileRenamedMessageCommand = function(self)
pname = profile:GetDisplayName()
self:playcommand("Set")
end,
MouseOverCommand = function(self)
self:diffusealpha(buttonHoverAlpha)
if self:IsInvisible() then return end
TOOLTIP:SetText(translations["SetPlayerName"])
TOOLTIP:Show()
end,
MouseOutCommand = function(self)
self:diffusealpha(1)
TOOLTIP:Hide()
end,
MouseDownCommand = function(self, params)
if self:IsInvisible() then return end
if params.event == "DeviceButton_left mouse button" then
TOOLTIP:Hide()
renameProfileDialogue(profile)
end
end,
Expand Down
11 changes: 11 additions & 0 deletions Themes/Rebirth/BGAnimations/playerInfoFrame/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ local translations = {
DownloadingPacks = THEME:GetString("Header", "DownloadingPacks"),
QueuedPacks = THEME:GetString("Header", "QueuedPacks"),
UploadPercent = THEME:GetString("Header", "UploadPercent"),
SetPlayerName = THEME:GetString("Header", "SetPlayerName"),
}

-- the list of buttons and the lists of screens those buttons are allowed on
Expand Down Expand Up @@ -435,18 +436,28 @@ t[#t+1] = Def.ActorFrame {
else
self:settext(profile:GetDisplayName())
end
if self:IsInvisible() then return end
if isOver(self) then
TOOLTIP:SetText(translations["SetPlayerName"])
TOOLTIP:Show()
end
end,
ProfileRenamedMessageCommand = function(self)
self:playcommand("Set")
end,
MouseOverCommand = function(self)
self:diffusealpha(hoverAlpha)
if self:IsInvisible() then return end
TOOLTIP:SetText(translations["SetPlayerName"])
TOOLTIP:Show()
end,
MouseOutCommand = function(self)
self:diffusealpha(1)
TOOLTIP:Hide()
end,
MouseDownCommand = function(self, params)
if params.event == "DeviceButton_left mouse button" then
TOOLTIP:Hide()
renameProfileDialogue(profile)
end
end,
Expand Down
2 changes: 2 additions & 0 deletions Themes/Rebirth/Languages/en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Search=Search
DownloadingPacks=Downloading
QueuedPacks=Queued
UploadPercent=Score Upload Progress
SetPlayerName=Set Local Profile Name
[OffsetPlot]
StandardDeviation=Std. Dev
Expand Down Expand Up @@ -507,6 +508,7 @@ PlayerStats=Player Stats
ViewRecentScores=View Recent Scores
ShowingLocalScores=Showing Local
ShowingOnlineScores=Showing Online
SetPlayerName=Set Local Profile Name
[ScreenSelectMusic Scores]
LastScore=Last Score
Expand Down

0 comments on commit b0be391

Please sign in to comment.