diff --git a/PlayWall/src/main/java/de/tobias/playpad/action/actions/cart/CartAction.java b/PlayWall/src/main/java/de/tobias/playpad/action/actions/cart/CartAction.java index 604f9d0ebc6d2bba964f7124078c9f0729111a74..eec9a3cd8a041f07c0f6d8ffb6ecb27cd32ce153 100644 --- a/PlayWall/src/main/java/de/tobias/playpad/action/actions/cart/CartAction.java +++ b/PlayWall/src/main/java/de/tobias/playpad/action/actions/cart/CartAction.java @@ -133,7 +133,7 @@ public class CartAction extends Action implements ColorAdjustable { } if (pad.hasVisibleContent()) { - handler.performAction(type, this, pad, project); + handler.performAction(type, this, pad); } } diff --git a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/CartActionHandler.scala b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/CartActionHandler.scala index 122de83f5eb3b230796102bc85a2f89073b6ca60..c472bcf36a9d2d2e108827cff2c440daab91bf65 100644 --- a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/CartActionHandler.scala +++ b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/CartActionHandler.scala @@ -3,9 +3,8 @@ package de.tobias.playpad.action.actions.cart.handler import de.tobias.playpad.action.InputType import de.tobias.playpad.action.actions.cart.CartAction import de.tobias.playpad.pad.Pad -import de.tobias.playpad.project.Project trait CartActionHandler { - def performAction(inputType: InputType, cartAction: CartAction, pad: Pad, project: Project): Unit + def performAction(inputType: InputType, cartAction: CartAction, pad: Pad): Unit } diff --git a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayHoldHandler.scala b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayHoldHandler.scala index a520005390b3e33c2f5770d1ffbf830f4a89aaeb..49c630e54195c69de04572aa46da3e1b7b5dc847 100644 --- a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayHoldHandler.scala +++ b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayHoldHandler.scala @@ -3,19 +3,16 @@ package de.tobias.playpad.action.actions.cart.handler import de.tobias.playpad.action.InputType import de.tobias.playpad.action.actions.cart.CartAction import de.tobias.playpad.pad.Pad -import de.tobias.playpad.project.Project class PlayHoldHandler extends CartActionHandler { - override def performAction(`type`: InputType, - cartAction: CartAction, - pad: Pad, - project: Project): Unit = { - if (`type` eq InputType.PRESSED) { + + override def performAction(inputType: InputType, cartAction: CartAction, pad: Pad): Unit = { + if (inputType eq InputType.PRESSED) { if (pad.isReady) { // Allow the listener to send the feedback cartAction.getPadPositionListener.setSend(false) pad.play() } - } else if (`type` eq InputType.RELEASED) { + } else if (inputType eq InputType.RELEASED) { if (pad.isPlay) { pad.stop() } diff --git a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayPauseHandler.scala b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayPauseHandler.scala index 90e322e1c3504d1fb92d5c8573f3d258293a3498..8fb1cfda114cd57dad138db5159089ec029663d4 100644 --- a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayPauseHandler.scala +++ b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayPauseHandler.scala @@ -3,14 +3,11 @@ package de.tobias.playpad.action.actions.cart.handler import de.tobias.playpad.action.InputType import de.tobias.playpad.action.actions.cart.CartAction import de.tobias.playpad.pad.Pad -import de.tobias.playpad.project.Project class PlayPauseHandler extends CartActionHandler { - override def performAction(`type`: InputType, - cartAction: CartAction, - pad: Pad, - project: Project): Unit = { - if (`type` eq InputType.PRESSED) { + + override def performAction(inputType: InputType, cartAction: CartAction, pad: Pad): Unit = { + if (inputType eq InputType.PRESSED) { if (pad.isPlay) { pad.pause() } diff --git a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayPlayHandler.scala b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayPlayHandler.scala index 1a02e8460be875c1165406021a76a715324c849b..f43a562108b0083b2eac4cbdc8e68af9d69151dc 100644 --- a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayPlayHandler.scala +++ b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayPlayHandler.scala @@ -3,14 +3,11 @@ package de.tobias.playpad.action.actions.cart.handler import de.tobias.playpad.action.InputType import de.tobias.playpad.action.actions.cart.CartAction import de.tobias.playpad.pad.{Pad, PadStatus} -import de.tobias.playpad.project.Project class PlayPlayHandler extends CartActionHandler { - override def performAction(`type`: InputType, - cartAction: CartAction, - pad: Pad, - project: Project): Unit = { - if (`type` eq InputType.PRESSED) { + + override def performAction(inputType: InputType, cartAction: CartAction, pad: Pad): Unit = { + if (inputType eq InputType.PRESSED) { pad.setStatus(PadStatus.RESTART) } } diff --git a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayStopHandler.scala b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayStopHandler.scala index 5745993131ac68ce950e033e1d2ab4035dd756c0..4ecc60edc7e4cf5fb1accd59a214403e338619f1 100644 --- a/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayStopHandler.scala +++ b/PlayWall/src/main/scala/de/tobias/playpad/action/actions/cart/handler/PlayStopHandler.scala @@ -3,15 +3,11 @@ package de.tobias.playpad.action.actions.cart.handler import de.tobias.playpad.action.InputType import de.tobias.playpad.action.actions.cart.CartAction import de.tobias.playpad.pad.Pad -import de.tobias.playpad.project.Project class PlayStopHandler extends CartActionHandler { - override def performAction(`type`: InputType, - cartAction: CartAction, - pad: Pad, - project: Project): Unit = { - if (`type` eq InputType.PRESSED) { + override def performAction(inputType: InputType, cartAction: CartAction, pad: Pad): Unit = { + if (inputType eq InputType.PRESSED) { if (pad.isPlay) { pad.stop() } else { // Allow the listener to send the feedback