Add scene type notation

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-05-19 22:24:08 +07:00
parent 522edc5e0c
commit c0f06b9694

View File

@@ -6,6 +6,22 @@ function SCENE:new() end
function SCENE:update() end
function SCENE:render() end
-- You can use the class SCENE_onInput to show suggestions for `e` table
---@class SCENE_onInput
---@field type "key"|"joystick"|"virtual"|"touch"|"mouse"|"wheel"
---
---@field input? string # Action triggered<br>Only visible via keyboard and gamepad
---@field key? love.KeyConstant Only visible via keyboard and gamepad
---@field scancode? love.Scancode Only visible via keyboard and gamepad
---
---@field x? number Only visible via touch and mouse
---@field y? number Only visible via touch and mouse
---@field dx? number # Delta X<br> Only visible via touch, mouse and wheel
---@field dy? number # Delta Y<br> Only visible via touch, mouse and wheel
---@field id? lightuserdata # Only visible via touch
---@field presses? number # Only visible via mouse
-- e in 4 below functions will contain different things based on it's type:
-- key - input, key, scancode
-- joystick - input, button, name