This commit is contained in:
2025-05-04 20:46:46 +02:00
parent 169a514973
commit ba3bf263d6
3 changed files with 69 additions and 10 deletions

View File

@@ -1,12 +1,14 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@alias distIndex
---| 1
---| 2
---| 3
---| 4
---@param unit string
---@param distIndex 4
---@param 1
---@param 2
---@param 3
---@param 4
---@return 1nil canInteract
---@param distIndex distIndex
---@return boolean canInteract
---Returns whether the player is close enough to a unit for certain types of interaction
function CheckInteractDistance(unit, distIndex, 1, 2, 3, 4) end
function CheckInteractDistance(unit, distIndex) end

View File

@@ -1,7 +1,7 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param unit unitID
---@return 1nil success
---@param unit string
---@return boolean success
---Enables comparing achievements/statistics with another player. After a call to this function, the INSPECTACHIEVEMENTREADY event fires to indicate that achievement/statistic comparison functions will return valid data on the given unit.
function SetAchievementComparisonUnit(unit) end

View File

@@ -73,4 +73,61 @@ Frame = {
---@param rightOffset number The amount by which to displace the right edge of the test rectangle
---@return boolean isOver true if the mouse is over the region; otherwise false
IsMouseOver = function(self, topOffset, leftOffset, bottomOffset, rightOffset) end,
---Sets the width of the frame.
---@param self Frame
---@param width number The width of the frame
SetWidth = function(self, width) end,
---Sets the height of the frame.
---@param self Frame
---@param height number The height of the frame
SetHeight = function(self, height) end,
---Sets the point of the frame.
---This method sets an attachment point of a UI component.
---@overload fun(self: Frame, point: string): nil
---@overload fun(self: Frame, point: string, relativeTo: Frame): nil
---@overload fun(self: Frame, point: string, relativeTo: Frame, relativePoint: string): nil
---@overload fun(self: Frame, point: string, relativeTo: Frame, relativePoint: string, offsetX: number): nil
---@overload fun(self: Frame, point: string, relativeTo: Frame, relativePoint: string, offsetX: number, offsetY: number): nil
---@param self Frame
---@param point string The point of the frame to adjust based on the anchor.
---@param relativeTo Frame The frame to anchor to (defaults to parent if omitted).
---@param relativePoint string The point of the relative frame (defaults to point if omitted).
---@param offsetX number The x-offset (defaults to 0 if not specified).
---@param offsetY number The y-offset (defaults to 0 if not specified).
SetPoint = function(self, point, relativeTo, relativePoint, offsetX, offsetY) end,
---@class backdrop
---@field bgFile string The texture file to use as the frame background (.blp or .tga format).
---@field edgeFile string The texture file to use as the frame edge (.blp or .tga format).
---@field tile boolean Whether the background texture is tiled or stretched.
---@field tileSize number Control how large each copy of the bgFile becomes on-screen.
---@field edgeSize number Control how large each copy of the edgeFile becomes on-screen (i.e., border thickness and corner size).
---@field insets table Controls how far into the frame the background will be drawn (use higher values for thicker edges).
---Sets the backdrop of the frame.
---This method allows you to set a background and border for the frame.
---@param self Frame
---@param backdrop backdrop A table containing the backdrop settings.
---@example
--- Frame:SetBackdrop({
--- bgFile = "Interface/Tooltips/UI-Tooltip-Background",
--- edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
--- tile = true,
--- tileSize = 16,
--- edgeSize = 16,
--- insets = { left = 4, right = 4, top = 4, bottom = 4 }
--- });
SetBackdrop = function(self, backdrop) end,
--- Sets the color of the backdrop border.
---@param self Frame
---@param red number The red component of the border color (0 to 1).
---@param green number The green component of the border color (0 to 1).
---@param blue number The blue component of the border color (0 to 1).
---@param alpha number Optional. The alpha (transparency) of the border color (0 to 1).
---@example
--- Frame:SetBackdropBorderColor(1, 0, 0, 1); -- Sets the border color to opaque red
SetBackdropBorderColor = function(self, red, green, blue, alpha) end,
}