Skip to content

Commit

Permalink
GLFWMouseAndKeyHandler + Test: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
moreApi authored and skalarproduktraum committed Sep 24, 2024
1 parent c451d8d commit 45cfa0b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,22 +384,6 @@ open class GLFWMouseAndKeyHandler(var hub: Hub?) : MouseAndKeyHandlerBase(), Aut
activeButtonDrags.clear()
}

/**
* Called when the mouse is dragged, evaluates current drag behaviours
*
* @param[e] The incoming mouse event
*/
fun mouseDragged(e: MouseEvent) {
update()

val x = e.x
val y = e.y

for (drag in activeButtonDrags) {
drag.behaviour.drag(x, y)
}
}

/**
* Called when the mouse is exiting, updates state
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ class GLFWMouseAndKeyHandlerTests {
glfwHandler.mousePressed(clickEvent)
moveEvents.forEach { move ->
glfwHandler.mouseMoved(move)
glfwHandler.mouseDragged(move)
}
glfwHandler.mouseReleased(releaseEvent)

Expand All @@ -466,7 +465,7 @@ class GLFWMouseAndKeyHandlerTests {

assertEquals(start, dragStart, "Expected dragging start to be")
assertEquals(end, dragEnd, "Expected dragging end to be")
assertEquals(dragCount * 2, actualDrags, "Expected $dragCount events to have happened")
assertEquals(dragCount, actualDrags, "Expected $dragCount events to have happened")
}
}

Expand Down

0 comments on commit 45cfa0b

Please sign in to comment.