Update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---@meta
|
||||
|
||||
---@class Frame : UIObject
|
||||
---@class Frame : ScriptRegion
|
||||
Frame = {
|
||||
--- Aborts the current drag operation.
|
||||
--- @example
|
||||
|
57
ui/Line.lua
Normal file
57
ui/Line.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
---@meta
|
||||
|
||||
---@class Line : TextureBase
|
||||
Line = {
|
||||
--- Clears all anchor points from the line.
|
||||
--- @example
|
||||
--- myLine:ClearAllPoints()
|
||||
ClearAllPoints = function(self) end,
|
||||
|
||||
--- Returns the end point of the line.
|
||||
--- @return string relativePoint The relative point.
|
||||
--- @return Frame relativeTo The frame to which the end point is relative.
|
||||
--- @return number offsetX The x offset of the end point.
|
||||
--- @return number offsetY The y offset of the end point.
|
||||
--- @example
|
||||
--- local relativePoint, relativeTo, offsetX, offsetY = myLine:GetEndPoint()
|
||||
GetEndPoint = function(self) end,
|
||||
|
||||
--- Returns the start point of the line.
|
||||
--- @return string relativePoint The relative point.
|
||||
--- @return Frame relativeTo The frame to which the start point is relative.
|
||||
--- @return number offsetX The x offset of the start point.
|
||||
--- @return number offsetY The y offset of the start point.
|
||||
--- @example
|
||||
--- local relativePoint, relativeTo, offsetX, offsetY = myLine:GetStartPoint()
|
||||
GetStartPoint = function(self) end,
|
||||
|
||||
--- Returns the thickness of the line.
|
||||
--- @return number thickness The thickness of the line.
|
||||
--- @example
|
||||
--- local thickness = myLine:GetThickness()
|
||||
GetThickness = function(self) end,
|
||||
|
||||
--- Sets the end point of the line.
|
||||
--- @param relativePoint string The relative point.
|
||||
--- @param relativeTo Frame The frame to which the end point is relative.
|
||||
--- @param offsetX number? Optional. The x offset of the end point.
|
||||
--- @param offsetY number? Optional. The y offset of the end point.
|
||||
--- @example
|
||||
--- myLine:SetEndPoint("TOP", otherFrame, 0, 0)
|
||||
SetEndPoint = function(self, relativePoint, relativeTo, offsetX, offsetY) end,
|
||||
|
||||
--- Sets the start point of the line.
|
||||
--- @param relativePoint string The relative point.
|
||||
--- @param relativeTo Frame The frame to which the start point is relative.
|
||||
--- @param offsetX number? Optional. The x offset of the start point.
|
||||
--- @param offsetY number? Optional. The y offset of the start point.
|
||||
--- @example
|
||||
--- myLine:SetStartPoint("BOTTOM", otherFrame, 0, 0)
|
||||
SetStartPoint = function(self, relativePoint, relativeTo, offsetX, offsetY) end,
|
||||
|
||||
--- Sets the thickness of the line.
|
||||
--- @param thickness number The thickness to set.
|
||||
--- @example
|
||||
--- myLine:SetThickness(2)
|
||||
SetThickness = function(self, thickness) end,
|
||||
}
|
136
ui/Texture.lua
Normal file
136
ui/Texture.lua
Normal file
@@ -0,0 +1,136 @@
|
||||
---@meta
|
||||
|
||||
---@class Texture : TextureBase
|
||||
Texture = {
|
||||
--- Adds a mask texture to the texture.
|
||||
--- @param mask Texture The mask texture to add.
|
||||
--- @example
|
||||
--- myTexture:AddMaskTexture(myMaskTexture)
|
||||
AddMaskTexture = function(self, mask) end,
|
||||
|
||||
--- Returns the mask texture at the specified index.
|
||||
--- @param index number The index of the mask texture.
|
||||
--- @return Texture mask The mask texture at the specified index.
|
||||
--- @example
|
||||
--- local mask = myTexture:GetMaskTexture(1)
|
||||
GetMaskTexture = function(self, index) end,
|
||||
|
||||
--- Returns the number of mask textures applied to the texture.
|
||||
--- @return number count The number of mask textures.
|
||||
--- @example
|
||||
--- local count = myTexture:GetNumMaskTextures()
|
||||
GetNumMaskTextures = function(self) end,
|
||||
|
||||
--- Removes a mask texture from the texture.
|
||||
--- @param mask Texture The mask texture to remove.
|
||||
--- @example
|
||||
--- myTexture:RemoveMaskTexture(myMaskTexture)
|
||||
RemoveMaskTexture = function(self, mask) end,
|
||||
|
||||
--- Sets the texture to an atlas.
|
||||
--- @param atlas string The atlas to set.
|
||||
--- @param useAtlasSize boolean? Optional. Whether to use the atlas size.
|
||||
--- @param filterMode string? Optional. The filter mode to use.
|
||||
--- @param resetTexCoords boolean? Optional. Whether to reset texture coordinates.
|
||||
--- @example
|
||||
--- myTexture:SetAtlas("MyAtlas", true)
|
||||
SetAtlas = function(self, atlas, useAtlasSize, filterMode, resetTexCoords) end,
|
||||
|
||||
--- Sets the blend mode of the texture.
|
||||
--- @param blendMode string The blend mode to set.
|
||||
--- @example
|
||||
--- myTexture:SetBlendMode("ADD")
|
||||
SetBlendMode = function(self, blendMode) end,
|
||||
|
||||
--- Sets the texture to a solid color.
|
||||
--- @param colorR number The red component of the color.
|
||||
--- @param colorG number The green component of the color.
|
||||
--- @param colorB number The blue component of the color.
|
||||
--- @param a number? Optional. The alpha component of the color.
|
||||
--- @example
|
||||
--- myTexture:SetColorTexture(1, 0, 0) -- Set to red
|
||||
SetColorTexture = function(self, colorR, colorG, colorB, a) end,
|
||||
|
||||
--- Sets the texture to be desaturated.
|
||||
--- @param desaturated boolean? Optional. True to desaturate the texture.
|
||||
--- @example
|
||||
--- myTexture:SetDesaturated(true)
|
||||
SetDesaturated = function(self, desaturated) end,
|
||||
|
||||
--- Sets the desaturation level of the texture.
|
||||
--- @param desaturation number The desaturation level to set.
|
||||
--- @example
|
||||
--- myTexture:SetDesaturation(0.5) -- Set to 50% desaturation
|
||||
SetDesaturation = function(self, desaturation) end,
|
||||
|
||||
--- Sets a gradient color shading for the texture.
|
||||
--- @param orientation string The orientation of the gradient.
|
||||
--- @param minColor table The minimum color.
|
||||
--- @param maxColor table The maximum color.
|
||||
--- @example
|
||||
--- myTexture:SetGradient("HORIZONTAL", {1, 0, 0}, {0, 0, 1}) -- Red to Blue
|
||||
SetGradient = function(self, orientation, minColor, maxColor) end,
|
||||
|
||||
--- Sets whether the texture should tile horizontally.
|
||||
--- @param tiling boolean? Optional. True to enable horizontal tiling.
|
||||
--- @example
|
||||
--- myTexture:SetHorizTile(true)
|
||||
SetHorizTile = function(self, tiling) end,
|
||||
|
||||
--- Applies a mask to the texture.
|
||||
--- @param file string The file path of the mask.
|
||||
--- @example
|
||||
--- myTexture:SetMask("Interface\\Textures\\Mask")
|
||||
SetMask = function(self, file) end,
|
||||
|
||||
--- Applies a rotation to the texture.
|
||||
--- @param radians number The rotation in radians.
|
||||
--- @param normalizedRotationPoint table? Optional. The normalized rotation point.
|
||||
--- @example
|
||||
--- myTexture:SetRotation(math.rad(45)) -- Rotate 45 degrees
|
||||
SetRotation = function(self, radians, normalizedRotationPoint) end,
|
||||
|
||||
--- Sets the texture to snap to the pixel grid.
|
||||
--- @param snap boolean? Optional. True to enable snapping.
|
||||
--- @example
|
||||
--- myTexture:SetSnapToPixelGrid(true)
|
||||
SetSnapToPixelGrid = function(self, snap) end,
|
||||
|
||||
--- Sets the coordinates for cropping or transforming the texture.
|
||||
--- @param left number The left coordinate.
|
||||
--- @param right number The right coordinate.
|
||||
--- @param bottom number The bottom coordinate.
|
||||
--- @param top number The top coordinate.
|
||||
--- @example
|
||||
--- myTexture:SetTexCoord(0, 1, 0, 1) -- Full texture
|
||||
SetTexCoord = function(self, left, right, bottom, top) end,
|
||||
|
||||
--- Sets the texel snapping bias for the texture.
|
||||
--- @param bias number The texel snapping bias to set.
|
||||
--- @example
|
||||
--- myTexture:SetTexelSnappingBias(0.5)
|
||||
SetTexelSnappingBias = function(self, bias) end,
|
||||
|
||||
--- Sets the texture to an image.
|
||||
--- @param textureAsset string The texture asset to set.
|
||||
--- @param wrapModeHorizontal string? Optional. The horizontal wrap mode.
|
||||
--- @param wrapModeVertical string? Optional. The vertical wrap mode.
|
||||
--- @param filterMode string? Optional. The filter mode.
|
||||
--- @example
|
||||
--- myTexture:SetTexture("Interface\\Textures\\MyTexture")
|
||||
SetTexture = function(self, textureAsset, wrapModeHorizontal, wrapModeVertical, filterMode) end,
|
||||
|
||||
--- Sets whether the texture should tile vertically.
|
||||
--- @param tiling boolean? Optional. True to enable vertical tiling.
|
||||
--- @example
|
||||
--- myTexture:SetVertTile(true)
|
||||
SetVertTile = function(self, tiling) end,
|
||||
|
||||
--- Sets a vertex offset for the texture.
|
||||
--- @param vertexIndex number The index of the vertex.
|
||||
--- @param offsetX number The x offset to set.
|
||||
--- @param offsetY number The y offset to set.
|
||||
--- @example
|
||||
--- myTexture:SetVertexOffset(1, 5, 5)
|
||||
SetVertexOffset = function(self, vertexIndex, offsetX, offsetY) end,
|
||||
}
|
217
ui/TextureBase.lua
Normal file
217
ui/TextureBase.lua
Normal file
@@ -0,0 +1,217 @@
|
||||
---@meta
|
||||
|
||||
---@class TextureBase : Region
|
||||
TextureBase = {
|
||||
--- Returns the atlas for the texture.
|
||||
--- @return string atlas The atlas of the texture.
|
||||
--- @example
|
||||
--- local atlas = myTexture:GetAtlas()
|
||||
GetAtlas = function(self) end,
|
||||
|
||||
--- Returns the blend mode of the texture.
|
||||
--- @return string blendMode The blend mode of the texture.
|
||||
--- @example
|
||||
--- local blendMode = myTexture:GetBlendMode()
|
||||
GetBlendMode = function(self) end,
|
||||
|
||||
--- Returns the desaturation level of the texture.
|
||||
--- @return number desaturation The desaturation level of the texture.
|
||||
--- @example
|
||||
--- local desaturation = myTexture:GetDesaturation()
|
||||
GetDesaturation = function(self) end,
|
||||
|
||||
--- Returns true if the texture is tiling horizontally.
|
||||
--- @return boolean tiling True if the texture is tiling horizontally.
|
||||
--- @example
|
||||
--- local isTiling = myTexture:GetHorizTile()
|
||||
GetHorizTile = function(self) end,
|
||||
|
||||
--- Returns the rotation of the texture.
|
||||
--- @return number radians The rotation in radians.
|
||||
--- @return table normalizedRotationPoint The normalized rotation point.
|
||||
--- @example
|
||||
--- local radians, rotationPoint = myTexture:GetRotation()
|
||||
GetRotation = function(self) end,
|
||||
|
||||
--- Returns the texture space coordinates of the texture.
|
||||
--- @return number ULx The upper-left x coordinate.
|
||||
--- @return number ULy The upper-left y coordinate.
|
||||
--- @return number LLx The lower-left x coordinate.
|
||||
--- @return number LLy The lower-left y coordinate.
|
||||
--- @return number URx The upper-right x coordinate.
|
||||
--- @return number URy The upper-right y coordinate.
|
||||
--- @return number LRx The lower-right x coordinate.
|
||||
--- @return number LRy The lower-right y coordinate.
|
||||
--- @example
|
||||
--- local ULx, ULy, LLx, LLy, URx, URy, LRx, LRy = myTexture:GetTexCoord()
|
||||
GetTexCoord = function(self) end,
|
||||
|
||||
--- Returns the texel snapping bias for the texture.
|
||||
--- @return number bias The texel snapping bias.
|
||||
--- @example
|
||||
--- local bias = myTexture:GetTexelSnappingBias()
|
||||
GetTexelSnappingBias = function(self) end,
|
||||
|
||||
--- Returns the FileID for the texture.
|
||||
--- @return number textureFile The FileID of the texture.
|
||||
--- @example
|
||||
--- local textureFile = myTexture:GetTexture()
|
||||
GetTexture = function(self) end,
|
||||
|
||||
--- Returns the FileID for the texture.
|
||||
--- @return number textureFile The FileID of the texture.
|
||||
--- @example
|
||||
--- local textureFile = myTexture:GetTextureFileID()
|
||||
GetTextureFileID = function(self) end,
|
||||
|
||||
--- Returns the FileID for the texture.
|
||||
--- @return number textureFile The FileID of the texture.
|
||||
--- @example
|
||||
--- local textureFile = myTexture:GetTextureFilePath()
|
||||
GetTextureFilePath = function(self) end,
|
||||
|
||||
--- Returns true if the texture is tiling vertically.
|
||||
--- @return boolean tiling True if the texture is tiling vertically.
|
||||
--- @example
|
||||
--- local isTiling = myTexture:GetVertTile()
|
||||
GetVertTile = function(self) end,
|
||||
|
||||
--- Returns a vertex offset for the texture.
|
||||
--- @param vertexIndex number The index of the vertex.
|
||||
--- @return number offsetX The x offset of the vertex.
|
||||
--- @return number offsetY The y offset of the vertex.
|
||||
--- @example
|
||||
--- local offsetX, offsetY = myTexture:GetVertexOffset(1)
|
||||
GetVertexOffset = function(self, vertexIndex) end,
|
||||
|
||||
--- Returns true if a blocking load is requested.
|
||||
--- @return boolean blocking True if a blocking load is requested.
|
||||
--- @example
|
||||
--- local isBlocking = myTexture:IsBlockingLoadRequested()
|
||||
IsBlockingLoadRequested = function(self) end,
|
||||
|
||||
--- Returns true if the texture is desaturated.
|
||||
--- @return boolean desaturated True if the texture is desaturated.
|
||||
--- @example
|
||||
--- local isDesaturated = myTexture:IsDesaturated()
|
||||
IsDesaturated = function(self) end,
|
||||
|
||||
--- Returns true if the texture is snapping to the pixel grid.
|
||||
--- @return boolean snap True if the texture is snapping to the pixel grid.
|
||||
--- @example
|
||||
--- local isSnapping = myTexture:IsSnappingToPixelGrid()
|
||||
IsSnappingToPixelGrid = function(self) end,
|
||||
|
||||
--- Sets the texture to an atlas.
|
||||
--- @param atlas string The atlas to set.
|
||||
--- @param useAtlasSize boolean? Optional. Whether to use the atlas size.
|
||||
--- @param filterMode string? Optional. The filter mode to use.
|
||||
--- @param resetTexCoords boolean? Optional. Whether to reset texture coordinates.
|
||||
--- @example
|
||||
--- myTexture:SetAtlas("MyAtlas", true)
|
||||
SetAtlas = function(self, atlas, useAtlasSize, filterMode, resetTexCoords) end,
|
||||
|
||||
--- Sets the blend mode of the texture.
|
||||
--- @param blendMode string The blend mode to set.
|
||||
--- @example
|
||||
--- myTexture:SetBlendMode("ADD")
|
||||
SetBlendMode = function(self, blendMode) end,
|
||||
|
||||
--- Sets whether blocking loads are requested.
|
||||
--- @param blocking boolean? Optional. True to request blocking loads.
|
||||
--- @example
|
||||
--- myTexture:SetBlockingLoadsRequested(true)
|
||||
SetBlockingLoadsRequested = function(self, blocking) end,
|
||||
|
||||
--- Sets the texture to a solid color.
|
||||
--- @param colorR number The red component of the color.
|
||||
--- @param colorG number The green component of the color.
|
||||
--- @param colorB number The blue component of the color.
|
||||
--- @param a number? Optional. The alpha component of the color.
|
||||
--- @example
|
||||
--- myTexture:SetColorTexture(1, 0, 0) -- Set to red
|
||||
SetColorTexture = function(self, colorR, colorG, colorB, a) end,
|
||||
|
||||
--- Sets the texture to be desaturated.
|
||||
--- @param desaturated boolean? Optional. True to desaturate the texture.
|
||||
--- @example
|
||||
--- myTexture:SetDesaturated(true)
|
||||
SetDesaturated = function(self, desaturated) end,
|
||||
|
||||
--- Sets the desaturation level of the texture.
|
||||
--- @param desaturation number The desaturation level to set.
|
||||
--- @example
|
||||
--- myTexture:SetDesaturation(0.5) -- Set to 50% desaturation
|
||||
SetDesaturation = function(self, desaturation) end,
|
||||
|
||||
--- Sets a gradient color shading for the texture.
|
||||
--- @param orientation string The orientation of the gradient.
|
||||
--- @param minColor table The minimum color.
|
||||
--- @param maxColor table The maximum color.
|
||||
--- @example
|
||||
--- myTexture:SetGradient("HORIZONTAL", {1, 0, 0}, {0, 0, 1}) -- Red to Blue
|
||||
SetGradient = function(self, orientation, minColor, maxColor) end,
|
||||
|
||||
--- Sets whether the texture should tile horizontally.
|
||||
--- @param tiling boolean? Optional. True to enable horizontal tiling.
|
||||
--- @example
|
||||
--- myTexture:SetHorizTile(true)
|
||||
SetHorizTile = function(self, tiling) end,
|
||||
|
||||
--- Applies a mask to the texture.
|
||||
--- @param file string The file path of the mask.
|
||||
--- @example
|
||||
--- myTexture:SetMask("Interface\\Textures\\Mask")
|
||||
SetMask = function(self, file) end,
|
||||
|
||||
--- Applies a rotation to the texture.
|
||||
--- @param radians number The rotation in radians.
|
||||
--- @param normalizedRotationPoint table? Optional. The normalized rotation point.
|
||||
--- @example
|
||||
--- myTexture:SetRotation(math.rad(45)) -- Rotate 45 degrees
|
||||
SetRotation = function(self, radians, normalizedRotationPoint) end,
|
||||
|
||||
--- Sets the texture to snap to the pixel grid.
|
||||
--- @param snap boolean? Optional. True to enable snapping.
|
||||
--- @example
|
||||
--- myTexture:SetSnapToPixelGrid(true)
|
||||
SetSnapToPixelGrid = function(self, snap) end,
|
||||
|
||||
--- Sets the coordinates for cropping or transforming the texture.
|
||||
--- @param left number The left coordinate.
|
||||
--- @param right number The right coordinate.
|
||||
--- @param bottom number The bottom coordinate.
|
||||
--- @param top number The top coordinate.
|
||||
--- @example
|
||||
--- myTexture:SetTexCoord(0, 1, 0, 1) -- Full texture
|
||||
SetTexCoord = function(self, left, right, bottom, top) end,
|
||||
|
||||
--- Sets the texel snapping bias for the texture.
|
||||
--- @param bias number The texel snapping bias to set.
|
||||
--- @example
|
||||
--- myTexture:SetTexelSnappingBias(0.5)
|
||||
SetTexelSnappingBias = function(self, bias) end,
|
||||
|
||||
--- Sets the texture to an image.
|
||||
--- @param textureAsset string The texture asset to set.
|
||||
--- @param wrapModeHorizontal string? Optional. The horizontal wrap mode.
|
||||
--- @param wrapModeVertical string? Optional. The vertical wrap mode.
|
||||
--- @param filterMode string? Optional. The filter mode.
|
||||
--- @example
|
||||
--- myTexture:SetTexture("Interface\\Textures\\MyTexture")
|
||||
SetTexture = function(self, textureAsset, wrapModeHorizontal, wrapModeVertical, filterMode) end,
|
||||
|
||||
--- Sets whether the texture should tile vertically.
|
||||
--- @param tiling boolean? Optional. True to enable vertical tiling.
|
||||
--- @example
|
||||
--- myTexture:SetVertTile(true)
|
||||
SetVertTile = function(self, tiling) end,
|
||||
|
||||
--- Sets a vertex offset for the texture.
|
||||
--- @param vertexIndex number The index of the vertex.
|
||||
--- @param offsetX number The x offset to set.
|
||||
--- @param offsetY number The y offset to set.
|
||||
--- @example
|
||||
--- myTexture:SetVertexOffset(1, 5, 5)
|
||||
SetVertexOffset = function(self, vertexIndex, offsetX, offsetY) end,
|
||||
}
|
120
ui/UIObject.lua
120
ui/UIObject.lua
@@ -1,120 +0,0 @@
|
||||
---@meta
|
||||
|
||||
---UIObject is an abstract UI object type that is used to group together methods that are common to all user interface types. All of the various user interface elements in World of Warcraft are derived from UIObject.
|
||||
---@class UIObject
|
||||
UIObject = {
|
||||
---Returns the widget object's name
|
||||
---@param self UIObject
|
||||
---@return string Name of the object
|
||||
GetName = function(self) end,
|
||||
|
||||
---Returns the widget object's widget type
|
||||
---@param self UIObject
|
||||
---@return string Name of the object's type (e.g. Frame, Button, FontString, etc.)
|
||||
GetObjectType = function(self) end,
|
||||
|
||||
--- Returns whether the object belongs to a given widget type
|
||||
---@param self UIObject
|
||||
---@param type string Name of the object's type (e.g. Frame, Button, FontString, etc.)
|
||||
---@return number|nil 1 if the object belongs to the given type (or a subtype thereof); otherwise nil
|
||||
IsObjectType = function(self, type) end,
|
||||
|
||||
--- Gets the height and width, respectively, of an object.
|
||||
---@param self Frame
|
||||
---@return number # width The width of the frame.
|
||||
GetWidth = function(self) end,
|
||||
|
||||
--- Gets the height of the frame.
|
||||
---@param self Frame
|
||||
---@return number # height The height of the frame.
|
||||
GetHeight = function(self) end,
|
||||
|
||||
--- Sets the parent of the region.
|
||||
--- @param self Frame
|
||||
--- @param parent Frame? Reference to the parent widget. Unsets the parent if omitted.
|
||||
--- Children inherit alpha and scale unless disallowed with SetIgnoreParentAlpha and SetIgnoreParentScale.
|
||||
--- @example
|
||||
--- local f = CreateFrame("Frame")
|
||||
--- f:SetScale(0.5)
|
||||
--- f:SetParent(UIParent)
|
||||
--- print(UIParent:GetScale()) -- 0.63999998569489
|
||||
--- print(f:GetScale(), f:GetEffectiveScale()) -- 0.5, 0.31999999284744
|
||||
SetParent = function(self, parent) end,
|
||||
|
||||
--- Sets the widget script handler.
|
||||
--- @param self Frame
|
||||
--- @param scriptTypeName string Name of the script type, for example "OnShow".
|
||||
--- @param script function|nil The script handler to call or explicitly nil to remove any existing script.
|
||||
--- Setting a script will remove any scripts that were previously hooked with HookScript.
|
||||
--- @example
|
||||
--- local function OnEvent(self, event)
|
||||
--- print(event)
|
||||
--- end
|
||||
--- local f = CreateFrame("Frame")
|
||||
--- f:RegisterEvent("PLAYER_STARTED_MOVING")
|
||||
--- f:SetScript("OnEvent", OnEvent)
|
||||
SetScript = function(self, scriptTypeName, script) end,
|
||||
|
||||
--- Sets the size scaling of the region.
|
||||
--- @param self Frame
|
||||
--- @param scale number The scale of the region. Must be greater than 0.
|
||||
--- @example
|
||||
--- MinimapCluster:SetScale(1.2); -- Scales MinimapCluster and its child regions to 120%
|
||||
SetScale = function(self, scale) end,
|
||||
|
||||
---Returns whether the mouse cursor is over the given region. This function replaces the previous MouseIsOver FrameXML function.
|
||||
---
|
||||
---If provided, the arguments are treated as offsets by which to adjust the hit rectangle when comparing it to the mouse. They are in screen coordinates; positive offsets move an edge right or up, negative values move it left or down. No frame edges are actually moved. For example:
|
||||
---
|
||||
--- if button:IsMouseOver(2, -2, -2, 2) then
|
||||
---
|
||||
---will return true if the mouse is within 2 pixels of the given frame.
|
||||
---@overload fun(self: Frame): boolean
|
||||
---@overload fun(self: Frame, topOffset: number): boolean
|
||||
---@overload fun(self: Frame, topOffset: number, leftOffset: number): boolean
|
||||
---@overload fun(self: Frame, topOffset: number, leftOffset: number, bottomOffset: number): boolean
|
||||
---@overload fun(self: Frame, topOffset: number, leftOffset: number, bottomOffset: number, rightOffset: number): boolean
|
||||
---@param self Frame
|
||||
---@param topOffset number The amount by which to displace the top edge of the test rectangle
|
||||
---@param leftOffset number The amount by which to displace the left edge of the test rectangle
|
||||
---@param bottomOffset number The amount by which to displace the bottom edge of the test rectangle
|
||||
---@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,
|
||||
|
||||
---Unregisters the frame from any events for which it is registered.
|
||||
---@param self Frame
|
||||
UnregisterAllEvents = function(self) end,
|
||||
|
||||
---Unregisters the frame for an event. Once unregistered, the frame's OnEvent script handler will not be called for that event.
|
||||
---
|
||||
---Unregistering from notifications for an event can be useful for improving addon performance at times when it's not necessary to process the event. For example, a frame which monitors target health does not need to receive the UNIT_HEALTH event while the player has no target. An addon that sorts the contents of the player's bags can register for the BAG_UPDATE event to keep track of when items are picked up, but unregister from the event while it performs its sorting.
|
||||
---@param self Frame
|
||||
---@param event string Name of an event
|
||||
UnregisterEvent = function(self, event) end,
|
||||
}
|
Reference in New Issue
Block a user