Skip to content

Commit

Permalink
Make Notefield Y movement symmetrical
Browse files Browse the repository at this point in the history
This refers to vertical movement not being symmetrical when changing between upscroll and reverse.
This fixes that.
  • Loading branch information
poco0317 committed Aug 21, 2018
1 parent afc1cd0 commit 536845c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,13 @@ local function secondHalfInput(event)
-- changes the noteField/receptor x/y
if rPressed and event.type ~= "InputEventType_Release" then
if event.DeviceInput.button == "DeviceButton_up" then
noteFieldY = noteFieldY - 3
noteFieldY = noteFieldY + (GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() and -3 or 3)
playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).GameplayXYCoordinates.NotefieldY = noteFieldY
noteField:addy(-3)
changed = true
end
if event.DeviceInput.button == "DeviceButton_down" then
noteFieldY = noteFieldY + 3
noteFieldY = noteFieldY + (GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() and 3 or -3)
playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).GameplayXYCoordinates.NotefieldY = noteFieldY
noteField:addy(3)
changed = true
Expand Down Expand Up @@ -684,8 +684,8 @@ local t = Def.ActorFrame{
end
screen = SCREENMAN:GetTopScreen()
noteField = screen:GetChild("PlayerP1"):GetChild("NoteField")
noteField:addy(noteFieldY * (GAMESTATE:GetPlayerState(PLAYER_1):GetCurrentPlayerOptions():UsingReverse() and 1 or -1))
noteField:addx(noteFieldX)
noteField:addy(noteFieldY)
noteColumns = noteField:get_column_actors()
for i, actor in ipairs(noteColumns) do
actor:zoomtowidth(noteFieldWidth)
Expand Down

0 comments on commit 536845c

Please sign in to comment.