Skip to content

Commit f24eaca

Browse files
committed
Add enums to Input class params
1 parent 9c8a02d commit f24eaca

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---@param button integer
2+
---@return boolean
3+
function Input.IsMouseBtnPressed(button)
4+
end

src/docs/repentogon_changes/Input.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@ end
55

66
---@return Vector
77
function Input.GetMouseWheel()
8+
end
9+
10+
---@param button MouseButton
11+
---@return boolean
12+
function Input.IsMouseBtnPressed(button)
813
end

src/docs/vanilla/Input.lua

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---@class Input
22
_G.Input = {}
33

4-
---@param action integer
4+
---@param action ButtonAction
55
---@param controllerId integer
66
---@return number
77
function Input.GetActionValue(action, controllerId)
88
end
99

10-
---@param button integer
10+
---@param button Keyboard
1111
---@param controllerId integer
1212
---@return number
1313
function Input.GetButtonValue(button, controllerId)
@@ -18,31 +18,26 @@ end
1818
function Input.GetMousePosition(gameCoords)
1919
end
2020

21-
---@param action integer
21+
---@param action ButtonAction
2222
---@param controllerId integer
2323
---@return boolean
2424
function Input.IsActionPressed(action, controllerId)
2525
end
2626

27-
---@param action integer
27+
---@param action ButtonAction
2828
---@param controllerId integer
2929
---@return boolean
3030
function Input.IsActionTriggered(action, controllerId)
3131
end
3232

33-
---@param button integer
33+
---@param button Keyboard
3434
---@param controllerId integer
3535
---@return boolean
3636
function Input.IsButtonPressed(button, controllerId)
3737
end
3838

39-
---@param button integer
39+
---@param button Keyboard
4040
---@param controllerId integer
4141
---@return boolean
4242
function Input.IsButtonTriggered(button, controllerId)
4343
end
44-
45-
---@param button integer
46-
---@return boolean
47-
function Input.IsMouseBtnPressed(button)
48-
end

0 commit comments

Comments
 (0)