Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Fixed beat controller buttons for .exe version
Browse files Browse the repository at this point in the history
  • Loading branch information
Fi0x committed Nov 13, 2022
1 parent 010c7dd commit daa47a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ public boolean interact(int x, int y)
return false;
}

public void updateLocation(int addedX, int addedY)
public void updateLocation(int xPos, int yPos, int xOffset, int yOffset)
{
offsetX += addedX;
offsetY += addedY;
controlX = xPos;
controlY = yPos;

offsetX += xOffset;
offsetY += yOffset;
}
public void updateScale(float scaleMultiplier)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void mouseReleased()
PVector dist = new PVector(mouseX, mouseY);
dist.add(mouseDragStart.mult(-1));
currentTranslation.add(dist);
beatController.updateLocation((int) -dist.x, (int) -dist.y);
beatController.updateLocation(-width / 2, -height / 2, (int) -dist.x, (int) -dist.y);
mouseDragStart = null;
}
else if(draggingElement != null)
Expand Down

0 comments on commit daa47a7

Please sign in to comment.