Skip to content

Commit

Permalink
unload custom windows when not using them
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Dec 19, 2022
1 parent 88b7860 commit abff9d1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ local function scoreBoard(pn, position)
self:GetParent():GetChild("GraphDisplayP1"):visible(not usingCustomWindows)
self:GetParent():GetChild("ComboGraphP1"):visible(not usingCustomWindows)
if not usingCustomWindows then
unloadCustomWindowConfig()
self:GetParent():playcommand("ChangeScore", {score = score})
MESSAGEMAN:Broadcast("UnloadedCustomWindow")
MESSAGEMAN:Broadcast("SetFromDisplay", {score = score})
Expand All @@ -293,6 +294,9 @@ local function scoreBoard(pn, position)
MESSAGEMAN:Broadcast("LoadedCustomWindow")
end
end,
EndCommand = function(self)
unloadCustomWindowConfig()
end,
MoveCustomWindowIndexMessageCommand = function(self, params)
if not usingCustomWindows then return end
moveCustomWindowConfigIndex(params.direction)
Expand Down

0 comments on commit abff9d1

Please sign in to comment.