Skip to content

Commit

Permalink
Don't show CustomizeGameplay elements in GameplaySyncMachine
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Feb 20, 2020
1 parent 6a46310 commit 87216ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ local t =
Def.ActorFrame {
Name = "WifePerch",
OnCommand = function(self)
if allowedCustomization then
if allowedCustomization and SCREENMAN:GetTopScreen():GetName() ~= "ScreenGameplaySyncMachine" then
-- auto enable autoplay
GAMESTATE:SetAutoplay(true)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ end

return Def.ActorFrame {
OnCommand = function(self)
if SCREENMAN:GetTopScreen():GetName() == "ScreenGameplaySyncMachine" then
self:visible(false)
end
SCREENMAN:GetTopScreen():AddInputCallback(MovableInput)
self:SetUpdateFunction(highlight)
end,
Expand Down
7 changes: 7 additions & 0 deletions Themes/Til Death/Scripts/02 CustomizeGameplay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ local function updatetext(button)
end

function MovableInput(event)
if SCREENMAN:GetTopScreen():GetName() == "ScreenGameplaySyncMachine" then return end
if getAutoplay() ~= 0 then
-- this will eat any other mouse input than a right click (toggle)
-- so we don't have to worry about anything weird happening with the ersatz inputs -mina
Expand Down Expand Up @@ -1016,6 +1017,12 @@ function MovableBorder(width, height, bw, x, y)
self:xy(x,y):diffusealpha(0)
self:SetUpdateFunction(bordermousereact)
end,
OnCommand=function(self)
if SCREENMAN:GetTopScreen():GetName() == "ScreenGameplaySyncMachine" then
self:visible(false)
self:SetUpdateFunction(nil)
end
end,
ChangeWidthCommand=function(self, params)
self:GetChild("xbar"):zoomx(params.val)
self:GetChild("showybox"):zoomx(params.val)
Expand Down

0 comments on commit 87216ff

Please sign in to comment.