Skip to content

Commit

Permalink
Use better logic for highlight hovering Offset Plots
Browse files Browse the repository at this point in the history
i have a headache from this
  • Loading branch information
poco0317 committed Nov 24, 2019
1 parent 193b263 commit ffa0381
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Themes/Til Death/BGAnimations/offsetplot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ local function fitY(y) -- Scale offset values to fit within plot height
end

local function HighlightUpdaterThing(self)
if SCREENMAN:GetTopScreen():GetName():find("Evaluation") then
self:GetChild("BGQuad"):queuecommand("Highlight")
end
self:GetChild("BGQuad"):queuecommand("Highlight")
end

-- convert a plot x position to a noterow
Expand All @@ -75,15 +73,13 @@ end

local o =
Def.ActorFrame {
InitCommand = function(self)
self:SetUpdateFunction(HighlightUpdaterThing)
end,
OnCommand = function(self)
self:xy(plotX, plotY)

-- being explicit about the logic since atm these are the only 2 cases we handle
local name = SCREENMAN:GetTopScreen():GetName()
if name == "ScreenEvaluationNormal" or name == "ScreenNetEvaluation" then -- default case, all data is in pss and no disk load is required
self:SetUpdateFunction(HighlightUpdaterThing)
local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(PLAYER_1)
dvt = pss:GetOffsetVector()
nrt = pss:GetNoteRowVector()
Expand Down

0 comments on commit ffa0381

Please sign in to comment.