Refactor API functions to improve parameter aliasing and enhance documentation clarity

This commit is contained in:
2025-05-18 15:03:21 +02:00
parent b595bc5573
commit cbed6108ef
22 changed files with 165 additions and 170 deletions

View File

@@ -1,12 +1,14 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param button 5 or Button5
---@param 1 or LeftButton
---@param 2 or RightButton
---@param 3 or MiddleButton
---@param 4 or Button4
---@param 5 or Button5
---@return 1nil isDown
---@alias mouseButton
---| 1 or "LeftButton" - Primary mouse button
---| 2 or "RightButton" - Secondary mouse button
---| 3 or "MiddleButton" - Third mouse button (or clickable scroll control)
---| 4 or "Button4" - Fourth mouse button
---| 5 or "Button5" - Fifth mouse button
---@param button mouseButton
---@return boolean isDown
---Returns whether a given mouse button is held down. If no button is specified, returns 1 if any mouse button is held down.
function IsMouseButtonDown(button, 1 or LeftButton, 2 or RightButton, 3 or MiddleButton, 4 or Button4, 5 or Button5) end
function IsMouseButtonDown(button) end