Skip to content

Commit

Permalink
only initialize customization input callbacks/text if customizegamepl…
Browse files Browse the repository at this point in the history
…ay is enabled
  • Loading branch information
MinaciousGrace committed Mar 19, 2017
1 parent 0a42a98 commit d253366
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -644,16 +644,18 @@ local t = Def.ActorFrame{
Name = "WifePerch",
OnCommand=function()
SCREENMAN:GetTopScreen():AddInputCallback(froot)
SCREENMAN:GetTopScreen():AddInputCallback(firstHalfInput)
SCREENMAN:GetTopScreen():AddInputCallback(secondHalfInput)
screen = SCREENMAN:GetTopScreen()
noteField = screen:GetChild("PlayerP1"):GetChild("NoteField")
noteField:addx(noteFieldX)
noteField:addy(noteFieldY)
noteColumns = noteField:get_column_actors()
for i, actor in ipairs(noteColumns) do
actor:zoomtowidth(noteFieldWidth)
actor:zoomtoheight(noteFieldHeight)
if(playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay) then
SCREENMAN:GetTopScreen():AddInputCallback(firstHalfInput)
SCREENMAN:GetTopScreen():AddInputCallback(secondHalfInput)
screen = SCREENMAN:GetTopScreen()
noteField = screen:GetChild("PlayerP1"):GetChild("NoteField")
noteField:addx(noteFieldX)
noteField:addy(noteFieldY)
noteColumns = noteField:get_column_actors()
for i, actor in ipairs(noteColumns) do
actor:zoomtowidth(noteFieldWidth)
actor:zoomtoheight(noteFieldHeight)
end
end
end,
JudgmentMessageCommand=function(self, msg)
Expand Down Expand Up @@ -1113,7 +1115,7 @@ t[#t+1] = LoadActor("npscalc")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
offset window esque boxes so its more intuitive to use the moving feature
]]

if(playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay) then
t[#t+1] = Def.ActorFrame{
InitCommand=function(self)
messageBox = self
Expand Down Expand Up @@ -1428,5 +1430,6 @@ t[#t+1] = Def.ActorFrame{
end,
},
}
end

return t
4 changes: 3 additions & 1 deletion Themes/Til Death/Graphics/Player combo/default.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ local t = Def.ActorFrame {
c = self:GetChildren()
end,
OnCommand=function(self)
SCREENMAN:GetTopScreen():AddInputCallback(input)
if(playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay) then
SCREENMAN:GetTopScreen():AddInputCallback(input)
end
end,
ComboCommand=function(self, param)
local iCombo = param.Combo
Expand Down
4 changes: 3 additions & 1 deletion Themes/Til Death/Graphics/Player judgment/default.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ local t = Def.ActorFrame {
c = self:GetChildren()
end,
OnCommand=function(self)
SCREENMAN:GetTopScreen():AddInputCallback(input)
if(playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomizeGameplay) then
SCREENMAN:GetTopScreen():AddInputCallback(input)
end
end,

JudgmentMessageCommand=function(self, param)
Expand Down

0 comments on commit d253366

Please sign in to comment.