Skip to content

Commit 5f6edc9

Browse files
committed
Update parameter lists for mousepressed and mousereleased callbacks
1 parent 1d9c0f2 commit 5f6edc9

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

ScreenManager.lua

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,23 +218,25 @@ function ScreenManager.mousemoved( x, y, dx, dy )
218218
end
219219

220220
---
221-
-- Reroute the mousepressed callback to the currently active screen.
222-
-- @param x
223-
-- @param y
224-
-- @param button
221+
-- Callback function triggered when a mouse button is pressed.
222+
-- @param x - Mouse x position, in pixels.
223+
-- @param y - Mouse y position, in pixels.
224+
-- @param button - The button index that was pressed. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependant.
225+
-- @param istouch - True if the mouse button press originated from a touchscreen touch-press.
225226
--
226-
function ScreenManager.mousepressed( x, y, button )
227-
ScreenManager.peek():mousepressed( x, y, button );
227+
function ScreenManager.mousepressed( x, y, button, istouch )
228+
ScreenManager.peek():mousepressed( x, y, button, istouch );
228229
end
229230

230231
---
231-
-- Reroute the mousereleased callback to the currently active screen.
232-
-- @param x
233-
-- @param y
234-
-- @param button
232+
-- Callback function triggered when a mouse button is released.
233+
-- @param x - Mouse x position, in pixels.
234+
-- @param y - Mouse y position, in pixels.
235+
-- @param button - The button index that was released. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependant.
236+
-- @param istouch - True if the mouse button release originated from a touchscreen touch-release.
235237
--
236-
function ScreenManager.mousereleased( x, y, button )
237-
ScreenManager.peek():mousereleased( x, y, button );
238+
function ScreenManager.mousereleased( x, y, button, istouch )
239+
ScreenManager.peek():mousereleased( x, y, button, istouch );
238240
end
239241

240242
---

0 commit comments

Comments
 (0)