From 916bec18c8384f14404b2b79d762855d1610411a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 25 Oct 2021 16:42:28 +0800 Subject: fix #756 --- meta/3rd/love2d/library/love.mouse.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'meta/3rd/love2d/library/love.mouse.lua') diff --git a/meta/3rd/love2d/library/love.mouse.lua b/meta/3rd/love2d/library/love.mouse.lua index d25808ba..af2eeae5 100644 --- a/meta/3rd/love2d/library/love.mouse.lua +++ b/meta/3rd/love2d/library/love.mouse.lua @@ -15,6 +15,8 @@ function love.mouse.getCursor() end --- ---Returns the current position of the mouse. --- +---@return number x # The position of the mouse along the x-axis. +---@return number y # The position of the mouse along the y-axis. function love.mouse.getPosition() end --- @@ -39,11 +41,13 @@ function love.mouse.getSystemCursor(ctype) end --- ---Returns the current x-position of the mouse. --- +---@return number x # The position of the mouse along the x-axis. function love.mouse.getX() end --- ---Returns the current y-position of the mouse. --- +---@return number y # The position of the mouse along the y-axis. function love.mouse.getY() end --- @@ -106,7 +110,9 @@ function love.mouse.setGrabbed(grab) end --- ---Sets the current position of the mouse. Non-integer values are floored. --- -function love.mouse.setPosition() end +---@param x number # The new position of the mouse along the x-axis. +---@param y number # The new position of the mouse along the y-axis. +function love.mouse.setPosition(x, y) end --- ---Sets whether relative mode is enabled for the mouse. @@ -129,14 +135,16 @@ function love.mouse.setVisible(visible) end --- ---Non-integer values are floored. --- -function love.mouse.setX() end +---@param x number # The new position of the mouse along the x-axis. +function love.mouse.setX(x) end --- ---Sets the current Y position of the mouse. --- ---Non-integer values are floored. --- -function love.mouse.setY() end +---@param y number # The new position of the mouse along the y-axis. +function love.mouse.setY(y) end --- ---Represents a hardware cursor. -- cgit v1.2.3