Skip to content

Commit

Permalink
rebirth add offset reprioritization warning to offsetplot
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Dec 20, 2022
1 parent 741295f commit 4fd80d5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Themes/Rebirth/BGAnimations/offsetplot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ local translations = {
Early = THEME:GetString("OffsetPlot", "Early"),
Instructions = THEME:GetString("OffsetPlot", "Instructions"),
CurrentColumnHighlights = THEME:GetString("OffsetPlot", "CurrentColumnHighlights"),
OffsetWarning = THEME:GetString("OffsetPlot", "UsingReprioritized"),
}

local judgeSetting = (PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or GetTimingDifficulty())
Expand Down Expand Up @@ -453,6 +454,26 @@ t[#t+1] = LoadFont("Common Normal") .. {
end
}

t[#t+1] = LoadFont("Common Normal") .. {
Name = "OffsetWarningText",
InitCommand = function(self)
self:valign(0)
self:zoom(instructionTextSize)
self:settext(translations["OffsetWarning"])
registerActorToColorConfigElement(self, "offsetPlot", "Text")
self:playcommand("UpdateSizing")
self:finishtweening()
end,
UpdateSizingCommand = function(self)
self:visible(usingCustomWindows and currentCustomWindowConfigUsesOldestNoteFirst())

self:finishtweening()
self:smooth(resizeAnimationSeconds)
self:xy(sizing.Width / 2, textPadding)
self:maxwidth((sizing.Width - self:GetParent():GetChild("LateText"):GetZoomedWidth() * 2) / instructionTextSize - textPadding)
end,
}

-- keeping track of stuff for persistence dont look at this
local lastOffsets = {}
local lastTracks = {}
Expand Down
1 change: 1 addition & 0 deletions Themes/Rebirth/Languages/en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Late=Late
Early=Early
Instructions=Up/Down for column highlights
CurrentColumnHighlights=Now
UsingReprioritized=Using Reprioritized Offsets
# legacy option names
[OptionNames]
Expand Down

0 comments on commit 4fd80d5

Please sign in to comment.