Skip to content

Commit

Permalink
graphics, gui: fix wrong variables names leading to confusion when re…
Browse files Browse the repository at this point in the history
…ading the code
  • Loading branch information
Wertzui123 committed Nov 5, 2024
1 parent 0506158 commit 415e569
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions stdlib/graphics/Window.aspl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Window{
[public]
property callback<Point, MouseButton> onMouseUp = callback(Point position, MouseButton button){}
[public]
property callback<Point, float, float> onMouseMove = callback(Point from, float deltaX, float deltaY){}
property callback<Point, float, float> onMouseMove = callback(Point end, float deltaX, float deltaY){}
[public]
property callback<Point, float, float> onMouseWheel = callback(Point position, float deltaX, float deltaY){}
[public]
Expand Down Expand Up @@ -101,8 +101,8 @@ class Window{
implement("graphics.window.set_on_mouse_up", handle, callback(float x, float y, int button){
onMouseUp.(new Point(x, y), MouseButton(button))
})
implement("graphics.window.set_on_mouse_move", handle, callback(float fromX, float fromY, float deltaX, float deltaY){
onMouseMove.(new Point(fromX, fromY), deltaX, deltaY)
implement("graphics.window.set_on_mouse_move", handle, callback(float endX, float endY, float deltaX, float deltaY){
onMouseMove.(new Point(endX, endY), deltaX, deltaY)
})
implement("graphics.window.set_on_mouse_wheel", handle, callback(float x, float y, float deltaX, float deltaY){
onMouseWheel.(new Point(x, y), deltaX, deltaY)
Expand Down
4 changes: 2 additions & 2 deletions stdlib/gui/Control.aspl
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ class Control {
return false
}
[public]
method onMouseMove(Point from, float deltaX, float deltaY){}
method onMouseMove(Point end, float deltaX, float deltaY){}
[public]
method onMouseMoveAny(Point from, float deltaX, float deltaY) returns bool{
method onMouseMoveAny(Point end, float deltaX, float deltaY) returns bool{
return false
}
[public]
Expand Down

0 comments on commit 415e569

Please sign in to comment.