This repository has been archived by the owner on Oct 19, 2019. It is now read-only.
forked from mkosler/LOVELuaDoc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mouse.lua
82 lines (67 loc) · 2.66 KB
/
mouse.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
-- Provides an interface to the user's mouse.
--
-- @module mouse
--
---
-- Returns the current position of the mouse.
-- @function [parent = #mouse] getPosition
-- @return #number x The position of the mouse along the x-axis.
-- @return #number y The position of the mouse along the y-axis.
---
-- Returns the current x-position of the mouse.
-- @function [parent = #mouse] getX
-- @return #number x The position of the mouse along the x-axis.
---
-- Returns the current y-position of the mouse.
-- @function [parent = #mouse] getY
-- @return #number y The position of the mouse along the y-axis.
---
-- Checks whether a certain mouse button is down.
-- @function [parent = #mouse] isDown
-- @param button The button to check.
-- @param #boolean down True if the specified button is down.
---
-- Checks whether a certain mouse button is down.
-- @function [parent = #mouse] isDown
-- @param button1 A button to check.
-- @param button2 A button to check.
-- @param ... Additional button(s) to check.
-- @param #boolean anyDown True if any specified button is down, false otherwise.
---
-- Checks if the mouse is grabbed.
-- @function [parent = #mouse] isGrabbed
-- @return #boolean grabbed True if the cursor is grabbed, false if it is not.
---
-- Checks if the cursor is visible.
-- @function [parent = #mouse] isVisible
-- @return #boolean visible True if the cursor to visible, false if the cursor is hidden.
---
-- Grabs the mouse and confines it to the window.
-- @function [parent = #mouse] setGrabbed
-- @param #boolean grab True to confine the mouse, false to let it leave the window.
---
-- Sets the current position of the mouse.
-- @function [parent = #mouse] setPosition
-- @param #number x The new position of the mouse along the x-axis.
-- @param #number y The new position of the mouse along the y-axis.
---
-- Sets the current visibility of the cursor.
-- @function [parent = #mouse] setVisible
-- @param #boolean visible True to set the cursor to visible, false to hide the cursor.
---
-- Creates a new hardware Cursor object from an image file or ImageData.
-- @function [parent = #mouse] newCursor
-- @param imageData The ImageData to use for the new Cursor.
-- @param #number hotx-(0) The x-coordinate in the ImageData of the cursor's hot spot.
-- @param #number hoty-(0) The y-coordinate in the ImageData of the cursor's hot spot.
-- @return Cursor The new Cursor object.
---
-- Sets the current X position of the mouse
-- @function [parent = #mouse] setX
-- @param #number x The new position of the mouse along the x-axis.
---
-- Sets the current Y position of the mouse
-- @function [parent = #mouse] setY
-- @param #number y The new position of the mouse along the y-axis.
return nil