Update
This commit is contained in:
28
ui/Alpha.lua
Normal file
28
ui/Alpha.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Alpha : Animation
|
||||||
|
Alpha = {
|
||||||
|
--- Gets the ending alpha value.
|
||||||
|
--- @return number alpha The ending alpha value.
|
||||||
|
--- @example
|
||||||
|
--- local alpha = myAlpha:GetEndAlpha()
|
||||||
|
GetEndAlpha = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the starting alpha value.
|
||||||
|
--- @return number alpha The starting alpha value.
|
||||||
|
--- @example
|
||||||
|
--- local alpha = myAlpha:GetStartAlpha()
|
||||||
|
GetStartAlpha = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the ending alpha value.
|
||||||
|
--- @param alpha number The ending alpha value (0.0 to 1.0).
|
||||||
|
--- @example
|
||||||
|
--- myAlpha:SetEndAlpha(1.0)
|
||||||
|
SetEndAlpha = function(self, alpha) end,
|
||||||
|
|
||||||
|
--- Sets the starting alpha value.
|
||||||
|
--- @param alpha number The starting alpha value (0.0 to 1.0).
|
||||||
|
--- @example
|
||||||
|
--- myAlpha:SetStartAlpha(0.0)
|
||||||
|
SetStartAlpha = function(self, alpha) end,
|
||||||
|
}
|
103
ui/Animation.lua
Normal file
103
ui/Animation.lua
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Animation : UIObject
|
||||||
|
Animation = {
|
||||||
|
--- Gets the animation group this animation belongs to.
|
||||||
|
--- @return AnimationGroup group The parent animation group.
|
||||||
|
--- @example
|
||||||
|
--- local group = myAnimation:GetAnimationGroup()
|
||||||
|
GetAnimationGroup = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the delay before the animation starts.
|
||||||
|
--- @return number delay The delay in seconds.
|
||||||
|
--- @example
|
||||||
|
--- local delay = myAnimation:GetDelay()
|
||||||
|
GetDelay = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the duration of the animation.
|
||||||
|
--- @return number duration The duration in seconds.
|
||||||
|
--- @example
|
||||||
|
--- local duration = myAnimation:GetDuration()
|
||||||
|
GetDuration = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the animation's current elapsed time.
|
||||||
|
--- @return number elapsed The elapsed time in seconds.
|
||||||
|
--- @example
|
||||||
|
--- local elapsed = myAnimation:GetElapsed()
|
||||||
|
GetElapsed = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the animation's current progress.
|
||||||
|
--- @return number progress The progress (0.0 to 1.0).
|
||||||
|
--- @example
|
||||||
|
--- local progress = myAnimation:GetProgress()
|
||||||
|
GetProgress = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the smoothing type ("IN", "OUT", "IN_OUT", "OUT_IN", "NONE").
|
||||||
|
--- @return string smoothing The smoothing type.
|
||||||
|
--- @example
|
||||||
|
--- local smoothing = myAnimation:GetSmoothing()
|
||||||
|
GetSmoothing = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the animation plays in reverse.
|
||||||
|
--- @return boolean isReverse True if playing in reverse.
|
||||||
|
--- @example
|
||||||
|
--- local isReverse = myAnimation:IsReverse()
|
||||||
|
IsReverse = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the animation is currently playing.
|
||||||
|
--- @return boolean isPlaying True if playing.
|
||||||
|
--- @example
|
||||||
|
--- local isPlaying = myAnimation:IsPlaying()
|
||||||
|
IsPlaying = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the animation is currently paused.
|
||||||
|
--- @return boolean isPaused True if paused.
|
||||||
|
--- @example
|
||||||
|
--- local isPaused = myAnimation:IsPaused()
|
||||||
|
IsPaused = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the animation is currently stopped.
|
||||||
|
--- @return boolean isStopped True if stopped.
|
||||||
|
--- @example
|
||||||
|
--- local isStopped = myAnimation:IsStopped()
|
||||||
|
IsStopped = function(self) end,
|
||||||
|
|
||||||
|
--- Pauses the animation.
|
||||||
|
--- @example
|
||||||
|
--- myAnimation:Pause()
|
||||||
|
Pause = function(self) end,
|
||||||
|
|
||||||
|
--- Plays the animation.
|
||||||
|
--- @example
|
||||||
|
--- myAnimation:Play()
|
||||||
|
Play = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the delay before the animation starts.
|
||||||
|
--- @param delay number The delay in seconds.
|
||||||
|
--- @example
|
||||||
|
--- myAnimation:SetDelay(0.5)
|
||||||
|
SetDelay = function(self, delay) end,
|
||||||
|
|
||||||
|
--- Sets the duration of the animation.
|
||||||
|
--- @param duration number The duration in seconds.
|
||||||
|
--- @example
|
||||||
|
--- myAnimation:SetDuration(1.0)
|
||||||
|
SetDuration = function(self, duration) end,
|
||||||
|
|
||||||
|
--- Sets whether the animation plays in reverse.
|
||||||
|
--- @param reverse boolean True to play in reverse.
|
||||||
|
--- @example
|
||||||
|
--- myAnimation:SetReverse(true)
|
||||||
|
SetReverse = function(self, reverse) end,
|
||||||
|
|
||||||
|
--- Sets the smoothing type.
|
||||||
|
--- @param smoothing string The smoothing type ("IN", "OUT", "IN_OUT", "OUT_IN", "NONE").
|
||||||
|
--- @example
|
||||||
|
--- myAnimation:SetSmoothing("IN_OUT")
|
||||||
|
SetSmoothing = function(self, smoothing) end,
|
||||||
|
|
||||||
|
--- Stops the animation.
|
||||||
|
--- @example
|
||||||
|
--- myAnimation:Stop()
|
||||||
|
Stop = function(self) end,
|
||||||
|
}
|
101
ui/AnimationGroup.lua
Normal file
101
ui/AnimationGroup.lua
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class AnimationGroup : UIObject
|
||||||
|
AnimationGroup = {
|
||||||
|
--- Creates a new animation of the specified type.
|
||||||
|
--- @param animationType string The type of animation to create.
|
||||||
|
--- @param name? string Optional. The name for the new animation.
|
||||||
|
--- @param inheritsFrom? string Optional. Template to inherit from.
|
||||||
|
--- @return Animation animation The created animation.
|
||||||
|
--- @example
|
||||||
|
--- local alpha = myAnimGroup:CreateAnimation("Alpha", "FadeOut")
|
||||||
|
CreateAnimation = function(self, animationType, name, inheritsFrom) end,
|
||||||
|
|
||||||
|
--- Gets the animation at the specified index.
|
||||||
|
--- @param index number The index of the animation.
|
||||||
|
--- @return Animation animation The animation at the index.
|
||||||
|
--- @example
|
||||||
|
--- local anim = myAnimGroup:GetAnimation(1)
|
||||||
|
GetAnimation = function(self, index) end,
|
||||||
|
|
||||||
|
--- Gets the number of animations in the group.
|
||||||
|
--- @return number count The number of animations.
|
||||||
|
--- @example
|
||||||
|
--- local count = myAnimGroup:GetAnimations()
|
||||||
|
GetAnimations = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the duration of the animation group.
|
||||||
|
--- @return number duration The duration in seconds.
|
||||||
|
--- @example
|
||||||
|
--- local duration = myAnimGroup:GetDuration()
|
||||||
|
GetDuration = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the animation group's current progress.
|
||||||
|
--- @return number progress The progress (0.0 to 1.0).
|
||||||
|
--- @example
|
||||||
|
--- local progress = myAnimGroup:GetProgress()
|
||||||
|
GetProgress = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the number of times to loop.
|
||||||
|
--- @return number loopCount The loop count (-1 for infinite).
|
||||||
|
--- @example
|
||||||
|
--- local loops = myAnimGroup:GetLooping()
|
||||||
|
GetLooping = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the animation group plays in reverse.
|
||||||
|
--- @return boolean isReverse True if playing in reverse.
|
||||||
|
--- @example
|
||||||
|
--- local isReverse = myAnimGroup:IsReverse()
|
||||||
|
IsReverse = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the animation group is currently playing.
|
||||||
|
--- @return boolean isPlaying True if playing.
|
||||||
|
--- @example
|
||||||
|
--- local isPlaying = myAnimGroup:IsPlaying()
|
||||||
|
IsPlaying = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the animation group is currently paused.
|
||||||
|
--- @return boolean isPaused True if paused.
|
||||||
|
--- @example
|
||||||
|
--- local isPaused = myAnimGroup:IsPaused()
|
||||||
|
IsPaused = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the animation group is currently stopped.
|
||||||
|
--- @return boolean isStopped True if stopped.
|
||||||
|
--- @example
|
||||||
|
--- local isStopped = myAnimGroup:IsStopped()
|
||||||
|
IsStopped = function(self) end,
|
||||||
|
|
||||||
|
--- Pauses the animation group.
|
||||||
|
--- @example
|
||||||
|
--- myAnimGroup:Pause()
|
||||||
|
Pause = function(self) end,
|
||||||
|
|
||||||
|
--- Plays the animation group.
|
||||||
|
--- @example
|
||||||
|
--- myAnimGroup:Play()
|
||||||
|
Play = function(self) end,
|
||||||
|
|
||||||
|
--- Sets whether the animation group plays in reverse.
|
||||||
|
--- @param reverse boolean True to play in reverse.
|
||||||
|
--- @example
|
||||||
|
--- myAnimGroup:SetReverse(true)
|
||||||
|
SetReverse = function(self, reverse) end,
|
||||||
|
|
||||||
|
--- Sets the number of times to loop.
|
||||||
|
--- @param loopType string The loop type ("NONE", "REPEAT", "BOUNCE").
|
||||||
|
--- @param loopCount? number Optional. Number of times to loop (-1 for infinite).
|
||||||
|
--- @example
|
||||||
|
--- myAnimGroup:SetLooping("REPEAT", -1)
|
||||||
|
SetLooping = function(self, loopType, loopCount) end,
|
||||||
|
|
||||||
|
--- Stops the animation group.
|
||||||
|
--- @example
|
||||||
|
--- myAnimGroup:Stop()
|
||||||
|
Stop = function(self) end,
|
||||||
|
|
||||||
|
--- Finishes the current animation loop.
|
||||||
|
--- @example
|
||||||
|
--- myAnimGroup:Finish()
|
||||||
|
Finish = function(self) end,
|
||||||
|
}
|
36
ui/ColorSelect.lua
Normal file
36
ui/ColorSelect.lua
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class ColorSelect : Frame
|
||||||
|
ColorSelect = {
|
||||||
|
--- Gets the currently selected color.
|
||||||
|
--- @return number h The hue value (0-1).
|
||||||
|
--- @return number s The saturation value (0-1).
|
||||||
|
--- @return number v The brightness value (0-1).
|
||||||
|
--- @example
|
||||||
|
--- local h, s, v = myColorSelect:GetColorHSV()
|
||||||
|
GetColorHSV = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the RGB values of the currently selected color.
|
||||||
|
--- @return number r The red value (0-1).
|
||||||
|
--- @return number g The green value (0-1).
|
||||||
|
--- @return number b The blue value (0-1).
|
||||||
|
--- @example
|
||||||
|
--- local r, g, b = myColorSelect:GetColorRGB()
|
||||||
|
GetColorRGB = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the color using HSV values.
|
||||||
|
--- @param h number The hue value (0-1).
|
||||||
|
--- @param s number The saturation value (0-1).
|
||||||
|
--- @param v number The brightness value (0-1).
|
||||||
|
--- @example
|
||||||
|
--- myColorSelect:SetColorHSV(0.5, 1.0, 1.0)
|
||||||
|
SetColorHSV = function(self, h, s, v) end,
|
||||||
|
|
||||||
|
--- Sets the color using RGB values.
|
||||||
|
--- @param r number The red value (0-1).
|
||||||
|
--- @param g number The green value (0-1).
|
||||||
|
--- @param b number The blue value (0-1).
|
||||||
|
--- @example
|
||||||
|
--- myColorSelect:SetColorRGB(1.0, 0.0, 0.0)
|
||||||
|
SetColorRGB = function(self, r, g, b) end,
|
||||||
|
}
|
48
ui/Cooldown.lua
Normal file
48
ui/Cooldown.lua
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Cooldown : Frame
|
||||||
|
Cooldown = {
|
||||||
|
--- Gets whether the cooldown is showing the countdown numbers.
|
||||||
|
--- @return boolean isShowing Whether the countdown numbers are showing.
|
||||||
|
--- @example
|
||||||
|
--- local isShowing = myCooldown:GetDrawEdge()
|
||||||
|
GetDrawEdge = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the cooldown is showing the edge sparkle.
|
||||||
|
--- @return boolean isShowing Whether the edge sparkle is showing.
|
||||||
|
--- @example
|
||||||
|
--- local isShowing = myCooldown:GetDrawSwipe()
|
||||||
|
GetDrawSwipe = function(self) end,
|
||||||
|
|
||||||
|
--- Gets whether the cooldown is reversed (filling up instead of emptying).
|
||||||
|
--- @return boolean isReversed Whether the cooldown is reversed.
|
||||||
|
--- @example
|
||||||
|
--- local isReversed = myCooldown:GetReverse()
|
||||||
|
GetReverse = function(self) end,
|
||||||
|
|
||||||
|
--- Sets whether the cooldown shows countdown numbers.
|
||||||
|
--- @param show boolean Whether to show countdown numbers.
|
||||||
|
--- @example
|
||||||
|
--- myCooldown:SetDrawEdge(true)
|
||||||
|
SetDrawEdge = function(self, show) end,
|
||||||
|
|
||||||
|
--- Sets whether the cooldown shows the edge sparkle.
|
||||||
|
--- @param show boolean Whether to show the edge sparkle.
|
||||||
|
--- @example
|
||||||
|
--- myCooldown:SetDrawSwipe(true)
|
||||||
|
SetDrawSwipe = function(self, show) end,
|
||||||
|
|
||||||
|
--- Sets whether the cooldown fills up (true) or empties (false).
|
||||||
|
--- @param reverse boolean Whether to reverse the cooldown.
|
||||||
|
--- @example
|
||||||
|
--- myCooldown:SetReverse(true)
|
||||||
|
SetReverse = function(self, reverse) end,
|
||||||
|
|
||||||
|
--- Sets the cooldown timer.
|
||||||
|
--- @param start number Start time in seconds.
|
||||||
|
--- @param duration number Duration in seconds.
|
||||||
|
--- @param enable boolean? Optional. Whether to enable the cooldown.
|
||||||
|
--- @example
|
||||||
|
--- myCooldown:SetCooldown(GetTime(), 30)
|
||||||
|
SetCooldown = function(self, start, duration, enable) end,
|
||||||
|
}
|
20
ui/DressUpModel.lua
Normal file
20
ui/DressUpModel.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class DressUpModel : PlayerModel
|
||||||
|
DressUpModel = {
|
||||||
|
--- Sets the model to reflect the character's current inventory.
|
||||||
|
--- @example
|
||||||
|
--- myDressUpModel:Dress()
|
||||||
|
Dress = function(self) end,
|
||||||
|
|
||||||
|
--- Adds the specified item to the model.
|
||||||
|
--- @param itemID string|number The item ID or link to try on.
|
||||||
|
--- @example
|
||||||
|
--- myDressUpModel:TryOn("item:12345:0:0:0:0:0:0:0")
|
||||||
|
TryOn = function(self, itemID) end,
|
||||||
|
|
||||||
|
--- Sets the model to reflect the character without inventory.
|
||||||
|
--- @example
|
||||||
|
--- myDressUpModel:Undress()
|
||||||
|
Undress = function(self) end,
|
||||||
|
}
|
20
ui/Font.lua
Normal file
20
ui/Font.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Font : FontInstance
|
||||||
|
Font = {
|
||||||
|
--- Gets the font object's font path, height, and flags.
|
||||||
|
--- @return string path The font path.
|
||||||
|
--- @return number height The font height.
|
||||||
|
--- @return string flags The font flags.
|
||||||
|
--- @example
|
||||||
|
--- local path, height, flags = myFont:GetFont()
|
||||||
|
GetFont = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the font object's font path, height, and flags.
|
||||||
|
--- @param path string The font path.
|
||||||
|
--- @param height number The font height.
|
||||||
|
--- @param flags string? Optional. The font flags.
|
||||||
|
--- @example
|
||||||
|
--- myFont:SetFont("Fonts\\FRIZQT__.TTF", 12, "OUTLINE")
|
||||||
|
SetFont = function(self, path, height, flags) end,
|
||||||
|
}
|
60
ui/GameTooltip.lua
Normal file
60
ui/GameTooltip.lua
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class GameTooltip : Frame
|
||||||
|
GameTooltip = {
|
||||||
|
--- Adds a line of text to the tooltip.
|
||||||
|
--- @param text string The text to add.
|
||||||
|
--- @param r number? Optional. The red component (0-1).
|
||||||
|
--- @param g number? Optional. The green component (0-1).
|
||||||
|
--- @param b number? Optional. The blue component (0-1).
|
||||||
|
--- @param wrap boolean? Optional. Whether to wrap the text.
|
||||||
|
--- @example
|
||||||
|
--- myGameTooltip:AddLine("New Line", 1.0, 0.0, 0.0)
|
||||||
|
AddLine = function(self, text, r, g, b, wrap) end,
|
||||||
|
|
||||||
|
--- Adds a line with left and right text to the tooltip.
|
||||||
|
--- @param textLeft string The left text.
|
||||||
|
--- @param textRight string The right text.
|
||||||
|
--- @param leftR number? Optional. Left text red component (0-1).
|
||||||
|
--- @param leftG number? Optional. Left text green component (0-1).
|
||||||
|
--- @param leftB number? Optional. Left text blue component (0-1).
|
||||||
|
--- @param rightR number? Optional. Right text red component (0-1).
|
||||||
|
--- @param rightG number? Optional. Right text green component (0-1).
|
||||||
|
--- @param rightB number? Optional. Right text blue component (0-1).
|
||||||
|
--- @example
|
||||||
|
--- myGameTooltip:AddDoubleLine("Left", "Right", 1.0, 0.0, 0.0, 0.0, 1.0, 0.0)
|
||||||
|
AddDoubleLine = function(self, textLeft, textRight, leftR, leftG, leftB, rightR, rightG, rightB) end,
|
||||||
|
|
||||||
|
--- Clears all lines from the tooltip.
|
||||||
|
--- @example
|
||||||
|
--- myGameTooltip:ClearLines()
|
||||||
|
ClearLines = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the number of lines in the tooltip.
|
||||||
|
--- @return number numLines The number of lines.
|
||||||
|
--- @example
|
||||||
|
--- local numLines = myGameTooltip:NumLines()
|
||||||
|
NumLines = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the text of the tooltip.
|
||||||
|
--- @param text string The text to set.
|
||||||
|
--- @param r number? Optional. The red component (0-1).
|
||||||
|
--- @param g number? Optional. The green component (0-1).
|
||||||
|
--- @param b number? Optional. The blue component (0-1).
|
||||||
|
--- @param wrap boolean? Optional. Whether to wrap the text.
|
||||||
|
--- @example
|
||||||
|
--- myGameTooltip:SetText("Tooltip Text", 1.0, 1.0, 1.0)
|
||||||
|
SetText = function(self, text, r, g, b, wrap) end,
|
||||||
|
|
||||||
|
--- Sets the tooltip to show item information.
|
||||||
|
--- @param itemLink string|number The item ID or link.
|
||||||
|
--- @example
|
||||||
|
--- myGameTooltip:SetHyperlink("item:12345:0:0:0:0:0:0:0")
|
||||||
|
SetHyperlink = function(self, itemLink) end,
|
||||||
|
|
||||||
|
--- Sets the tooltip to show unit information.
|
||||||
|
--- @param unit string The unit ID.
|
||||||
|
--- @example
|
||||||
|
--- myGameTooltip:SetUnit("player")
|
||||||
|
SetUnit = function(self, unit) end,
|
||||||
|
}
|
17
ui/LayeredRegion.lua
Normal file
17
ui/LayeredRegion.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class LayeredRegion : Region
|
||||||
|
LayeredRegion = {
|
||||||
|
--- Gets the draw layer of the region.
|
||||||
|
--- @return string layer The draw layer.
|
||||||
|
--- @example
|
||||||
|
--- local layer = myLayeredRegion:GetDrawLayer()
|
||||||
|
GetDrawLayer = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the draw layer of the region.
|
||||||
|
--- @param layer string The draw layer.
|
||||||
|
--- @param subLevel number? Optional. The sublevel within the layer.
|
||||||
|
--- @example
|
||||||
|
--- myLayeredRegion:SetDrawLayer("ARTWORK", 1)
|
||||||
|
SetDrawLayer = function(self, layer, subLevel) end,
|
||||||
|
}
|
57
ui/Line.lua
57
ui/Line.lua
@@ -1,57 +0,0 @@
|
|||||||
---@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,
|
|
||||||
}
|
|
10
ui/LootButton.lua
Normal file
10
ui/LootButton.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class LootButton : Button
|
||||||
|
LootButton = {
|
||||||
|
--- Sets the slot index for this loot button.
|
||||||
|
--- @param index number The index of the loot slot.
|
||||||
|
--- @example
|
||||||
|
--- myLootButton:SetSlot(1)
|
||||||
|
SetSlot = function(self, index) end,
|
||||||
|
}
|
35
ui/Minimap.lua
Normal file
35
ui/Minimap.lua
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Minimap : Frame
|
||||||
|
Minimap = {
|
||||||
|
--- Gets the zoom level of the minimap.
|
||||||
|
--- @return number zoom The zoom level.
|
||||||
|
--- @example
|
||||||
|
--- local zoom = myMinimap:GetZoom()
|
||||||
|
GetZoom = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the zoom levels of the minimap.
|
||||||
|
--- @return number min The minimum zoom level.
|
||||||
|
--- @return number max The maximum zoom level.
|
||||||
|
--- @example
|
||||||
|
--- local min, max = myMinimap:GetZoomLevels()
|
||||||
|
GetZoomLevels = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the zoom level of the minimap.
|
||||||
|
--- @param zoom number The zoom level.
|
||||||
|
--- @example
|
||||||
|
--- myMinimap:SetZoom(2)
|
||||||
|
SetZoom = function(self, zoom) end,
|
||||||
|
|
||||||
|
--- Sets the mask texture of the minimap.
|
||||||
|
--- @param texture string|number The texture path or file ID.
|
||||||
|
--- @example
|
||||||
|
--- myMinimap:SetMaskTexture("Interface\\CHARACTERFRAME\\TempPortraitAlphaMask")
|
||||||
|
SetMaskTexture = function(self, texture) end,
|
||||||
|
|
||||||
|
--- Sets the blend mode of the minimap.
|
||||||
|
--- @param mode string The blend mode ("DISABLE"|"BLEND"|"ALPHAKEY"|"ADD"|"MOD").
|
||||||
|
--- @example
|
||||||
|
--- myMinimap:SetBlipTexture("BLEND")
|
||||||
|
SetBlipTexture = function(self, mode) end,
|
||||||
|
}
|
49
ui/Model.lua
Normal file
49
ui/Model.lua
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Model : Frame
|
||||||
|
Model = {
|
||||||
|
--- Advances the model's animation by the specified time.
|
||||||
|
--- @param seconds number The time to advance in seconds.
|
||||||
|
--- @example
|
||||||
|
--- myModel:AdvanceTime(0.1)
|
||||||
|
AdvanceTime = function(self, seconds) end,
|
||||||
|
|
||||||
|
--- Clears the model.
|
||||||
|
--- @example
|
||||||
|
--- myModel:ClearModel()
|
||||||
|
ClearModel = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the model's facing direction in radians.
|
||||||
|
--- @return number facing The facing direction in radians.
|
||||||
|
--- @example
|
||||||
|
--- local facing = myModel:GetFacing()
|
||||||
|
GetFacing = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the model's position.
|
||||||
|
--- @return number x The x coordinate.
|
||||||
|
--- @return number y The y coordinate.
|
||||||
|
--- @return number z The z coordinate.
|
||||||
|
--- @example
|
||||||
|
--- local x, y, z = myModel:GetPosition()
|
||||||
|
GetPosition = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the model's facing direction.
|
||||||
|
--- @param facing number The facing direction in radians.
|
||||||
|
--- @example
|
||||||
|
--- myModel:SetFacing(math.pi)
|
||||||
|
SetFacing = function(self, facing) end,
|
||||||
|
|
||||||
|
--- Sets the model's position.
|
||||||
|
--- @param x number The x coordinate.
|
||||||
|
--- @param y number The y coordinate.
|
||||||
|
--- @param z number The z coordinate.
|
||||||
|
--- @example
|
||||||
|
--- myModel:SetPosition(1.0, 0.0, 0.0)
|
||||||
|
SetPosition = function(self, x, y, z) end,
|
||||||
|
|
||||||
|
--- Sets the model to display.
|
||||||
|
--- @param modelPath string The path to the model file.
|
||||||
|
--- @example
|
||||||
|
--- myModel:SetModel("Interface\\Buttons\\TalkToMeQuestionMark.m2")
|
||||||
|
SetModel = function(self, modelPath) end,
|
||||||
|
}
|
36
ui/Path.lua
Normal file
36
ui/Path.lua
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Path : Animation
|
||||||
|
Path = {
|
||||||
|
--- Gets the number of control points in the path.
|
||||||
|
--- @return number count The number of control points.
|
||||||
|
--- @example
|
||||||
|
--- local count = myPath:GetNumControlPoints()
|
||||||
|
GetNumControlPoints = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the curve type of the path.
|
||||||
|
--- @return string curveType The curve type ("NONE", "BEZIER").
|
||||||
|
--- @example
|
||||||
|
--- local curveType = myPath:GetCurveType()
|
||||||
|
GetCurveType = function(self) end,
|
||||||
|
|
||||||
|
--- Creates a new control point at the specified index.
|
||||||
|
--- @param index number The index to create the control point at.
|
||||||
|
--- @return ControlPoint point The created control point.
|
||||||
|
--- @example
|
||||||
|
--- local point = myPath:CreateControlPoint(1)
|
||||||
|
CreateControlPoint = function(self, index) end,
|
||||||
|
|
||||||
|
--- Gets a control point at the specified index.
|
||||||
|
--- @param index number The index of the control point.
|
||||||
|
--- @return ControlPoint point The control point.
|
||||||
|
--- @example
|
||||||
|
--- local point = myPath:GetControlPoint(1)
|
||||||
|
GetControlPoint = function(self, index) end,
|
||||||
|
|
||||||
|
--- Sets the curve type of the path.
|
||||||
|
--- @param curveType string The curve type ("NONE", "BEZIER").
|
||||||
|
--- @example
|
||||||
|
--- myPath:SetCurveType("BEZIER")
|
||||||
|
SetCurveType = function(self, curveType) end,
|
||||||
|
}
|
27
ui/PlayerModel.lua
Normal file
27
ui/PlayerModel.lua
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class PlayerModel : Model
|
||||||
|
PlayerModel = {
|
||||||
|
--- Refreshes the model's display.
|
||||||
|
--- @example
|
||||||
|
--- myPlayerModel:RefreshUnit()
|
||||||
|
RefreshUnit = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the model to display a specific creature.
|
||||||
|
--- @param creatureID number The ID of the creature to display.
|
||||||
|
--- @example
|
||||||
|
--- myPlayerModel:SetCreature(12345)
|
||||||
|
SetCreature = function(self, creatureID) end,
|
||||||
|
|
||||||
|
--- Sets the model's rotation.
|
||||||
|
--- @param rotation number The rotation in radians.
|
||||||
|
--- @example
|
||||||
|
--- myPlayerModel:SetRotation(math.pi)
|
||||||
|
SetRotation = function(self, rotation) end,
|
||||||
|
|
||||||
|
--- Sets the model to display a specific unit.
|
||||||
|
--- @param unit string The unit ID to display.
|
||||||
|
--- @example
|
||||||
|
--- myPlayerModel:SetUnit("player")
|
||||||
|
SetUnit = function(self, unit) end,
|
||||||
|
}
|
41
ui/Rotation.lua
Normal file
41
ui/Rotation.lua
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Rotation : Animation
|
||||||
|
Rotation = {
|
||||||
|
--- Gets the origin point for the rotation.
|
||||||
|
--- @return number x, number y The origin point coordinates.
|
||||||
|
--- @example
|
||||||
|
--- local x, y = myRotation:GetOrigin()
|
||||||
|
GetOrigin = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the degrees to rotate.
|
||||||
|
--- @return number degrees The rotation amount in degrees.
|
||||||
|
--- @example
|
||||||
|
--- local degrees = myRotation:GetDegrees()
|
||||||
|
GetDegrees = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the radians to rotate.
|
||||||
|
--- @return number radians The rotation amount in radians.
|
||||||
|
--- @example
|
||||||
|
--- local radians = myRotation:GetRadians()
|
||||||
|
GetRadians = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the origin point for the rotation.
|
||||||
|
--- @param x number The x-coordinate of the origin point.
|
||||||
|
--- @param y number The y-coordinate of the origin point.
|
||||||
|
--- @example
|
||||||
|
--- myRotation:SetOrigin(0.5, 0.5)
|
||||||
|
SetOrigin = function(self, x, y) end,
|
||||||
|
|
||||||
|
--- Sets the degrees to rotate.
|
||||||
|
--- @param degrees number The rotation amount in degrees.
|
||||||
|
--- @example
|
||||||
|
--- myRotation:SetDegrees(90)
|
||||||
|
SetDegrees = function(self, degrees) end,
|
||||||
|
|
||||||
|
--- Sets the radians to rotate.
|
||||||
|
--- @param radians number The rotation amount in radians.
|
||||||
|
--- @example
|
||||||
|
--- myRotation:SetRadians(math.pi / 2)
|
||||||
|
SetRadians = function(self, radians) end,
|
||||||
|
}
|
30
ui/Scale.lua
Normal file
30
ui/Scale.lua
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Scale : Animation
|
||||||
|
Scale = {
|
||||||
|
--- Gets the origin point for the scaling.
|
||||||
|
--- @return number x, number y The origin point coordinates.
|
||||||
|
--- @example
|
||||||
|
--- local x, y = myScale:GetOrigin()
|
||||||
|
GetOrigin = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the scale factors.
|
||||||
|
--- @return number scaleX, number scaleY The x and y scale factors.
|
||||||
|
--- @example
|
||||||
|
--- local scaleX, scaleY = myScale:GetScale()
|
||||||
|
GetScale = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the origin point for the scaling.
|
||||||
|
--- @param x number The x-coordinate of the origin point.
|
||||||
|
--- @param y number The y-coordinate of the origin point.
|
||||||
|
--- @example
|
||||||
|
--- myScale:SetOrigin(0.5, 0.5)
|
||||||
|
SetOrigin = function(self, x, y) end,
|
||||||
|
|
||||||
|
--- Sets the scale factors.
|
||||||
|
--- @param scaleX number The x scale factor.
|
||||||
|
--- @param scaleY number The y scale factor.
|
||||||
|
--- @example
|
||||||
|
--- myScale:SetScale(2.0, 2.0)
|
||||||
|
SetScale = function(self, scaleX, scaleY) end,
|
||||||
|
}
|
@@ -1,399 +0,0 @@
|
|||||||
---@meta
|
|
||||||
|
|
||||||
---@class ScriptRegion
|
|
||||||
ScriptRegion = {
|
|
||||||
--- Returns true if protected properties of the region can be changed by non-secure scripts.
|
|
||||||
--- @return boolean canChange True if properties can be changed.
|
|
||||||
--- @example
|
|
||||||
--- local canChange = myScriptRegion:CanChangeProtectedState()
|
|
||||||
CanChangeProtectedState = function(self) end,
|
|
||||||
|
|
||||||
--- Sets whether the region should receive mouse input.
|
|
||||||
--- @param enable boolean True to enable mouse input.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:EnableMouse(true)
|
|
||||||
EnableMouse = function(self, enable) end,
|
|
||||||
|
|
||||||
--- Sets whether the region should receive mouse hover events.
|
|
||||||
--- @param enable boolean True to enable mouse hover events.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:EnableMouseMotion(true)
|
|
||||||
EnableMouseMotion = function(self, enable) end,
|
|
||||||
|
|
||||||
--- Sets whether the region should receive mouse wheel input.
|
|
||||||
--- @param enable boolean True to enable mouse wheel input.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:EnableMouseWheel(true)
|
|
||||||
EnableMouseWheel = function(self, enable) end,
|
|
||||||
|
|
||||||
--- Returns the offset in pixels to the bottom edge of the region.
|
|
||||||
--- @return number bottom The offset to the bottom edge.
|
|
||||||
--- @example
|
|
||||||
--- local bottomOffset = myScriptRegion:GetBottom()
|
|
||||||
GetBottom = function(self) end,
|
|
||||||
|
|
||||||
--- Returns the offset in pixels to the center of the region.
|
|
||||||
--- @return number x The x-coordinate of the center.
|
|
||||||
--- @return number y The y-coordinate of the center.
|
|
||||||
--- @example
|
|
||||||
--- local centerX, centerY = myScriptRegion:GetCenter()
|
|
||||||
GetCenter = function(self) end,
|
|
||||||
|
|
||||||
--- Returns the height of the region.
|
|
||||||
--- @param ignoreRect boolean? Optional. If true, ignores the rectangle.
|
|
||||||
--- @return number height The height of the region.
|
|
||||||
--- @example
|
|
||||||
--- local height = myScriptRegion:GetHeight()
|
|
||||||
GetHeight = function(self, ignoreRect) end,
|
|
||||||
|
|
||||||
--- Returns the offset in pixels to the left edge of the region.
|
|
||||||
--- @return number left The offset to the left edge.
|
|
||||||
--- @example
|
|
||||||
--- local leftOffset = myScriptRegion:GetLeft()
|
|
||||||
GetLeft = function(self) end,
|
|
||||||
|
|
||||||
--- Returns the coordinates and size of the region.
|
|
||||||
--- @return number left The left coordinate.
|
|
||||||
--- @return number bottom The bottom coordinate.
|
|
||||||
--- @return number width The width of the region.
|
|
||||||
--- @return number height The height of the region.
|
|
||||||
--- @example
|
|
||||||
--- local left, bottom, width, height = myScriptRegion:GetRect()
|
|
||||||
GetRect = function(self) end,
|
|
||||||
|
|
||||||
--- Returns the offset in pixels to the right edge of the region.
|
|
||||||
--- @return number right The offset to the right edge.
|
|
||||||
--- @example
|
|
||||||
--- local rightOffset = myScriptRegion:GetRight()
|
|
||||||
GetRight = function(self) end,
|
|
||||||
|
|
||||||
--- Returns the scaled coordinates and size of the region.
|
|
||||||
--- @return number left The left coordinate.
|
|
||||||
--- @return number bottom The bottom coordinate.
|
|
||||||
--- @return number width The width of the region.
|
|
||||||
--- @return number height The height of the region.
|
|
||||||
--- @example
|
|
||||||
--- local left, bottom, width, height = myScriptRegion:GetScaledRect()
|
|
||||||
GetScaledRect = function(self) end,
|
|
||||||
|
|
||||||
--- Returns the widget script handler.
|
|
||||||
--- @param scriptTypeName string The name of the script type.
|
|
||||||
--- @param bindingType string? Optional. The binding type.
|
|
||||||
--- @return function script The script handler.
|
|
||||||
--- @example
|
|
||||||
--- local scriptHandler = myScriptRegion:GetScript("OnClick")
|
|
||||||
GetScript = function(self, scriptTypeName, bindingType) end,
|
|
||||||
|
|
||||||
--- Returns the width and height of the region.
|
|
||||||
--- @param ignoreRect boolean? Optional. If true, ignores the rectangle.
|
|
||||||
--- @return number width The width of the region.
|
|
||||||
--- @return number height The height of the region.
|
|
||||||
--- @example
|
|
||||||
--- local width, height = myScriptRegion:GetSize()
|
|
||||||
GetSize = function(self, ignoreRect) end,
|
|
||||||
|
|
||||||
--- Returns the script name and line number where the region was created.
|
|
||||||
--- @return string location The script location.
|
|
||||||
--- @example
|
|
||||||
--- local location = myScriptRegion:GetSourceLocation()
|
|
||||||
GetSourceLocation = function(self) end,
|
|
||||||
|
|
||||||
--- Returns the offset in pixels to the top edge of the region.
|
|
||||||
--- @return number top The offset to the top edge.
|
|
||||||
--- @example
|
|
||||||
--- local topOffset = myScriptRegion:GetTop()
|
|
||||||
GetTop = function(self) end,
|
|
||||||
|
|
||||||
--- Returns the width of the region.
|
|
||||||
--- @param ignoreRect boolean? Optional. If true, ignores the rectangle.
|
|
||||||
--- @return number width The width of the region.
|
|
||||||
--- @example
|
|
||||||
--- local width = myScriptRegion:GetWidth()
|
|
||||||
GetWidth = function(self, ignoreRect) end,
|
|
||||||
|
|
||||||
--- Returns true if the region supports the given script type.
|
|
||||||
--- @param scriptName string The name of the script.
|
|
||||||
--- @return boolean hasScript True if the script is supported.
|
|
||||||
--- @example
|
|
||||||
--- local hasScript = myScriptRegion:HasScript("OnClick")
|
|
||||||
HasScript = function(self, scriptName) end,
|
|
||||||
|
|
||||||
--- Hides the region.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:Hide()
|
|
||||||
Hide = function(self) end,
|
|
||||||
|
|
||||||
--- Securely post-hooks a widget script handler.
|
|
||||||
--- @param scriptTypeName string The name of the script type.
|
|
||||||
--- @param script function The script handler.
|
|
||||||
--- @param bindingType string? Optional. The binding type.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:HookScript("OnClick", function() print("Clicked!") end)
|
|
||||||
HookScript = function(self, scriptTypeName, script, bindingType) end,
|
|
||||||
|
|
||||||
--- Returns true if the region has cross-region anchoring restrictions applied.
|
|
||||||
--- @return boolean isRestricted True if anchoring is restricted.
|
|
||||||
--- @example
|
|
||||||
--- local isRestricted = myScriptRegion:IsAnchoringRestricted()
|
|
||||||
IsAnchoringRestricted = function(self) end,
|
|
||||||
|
|
||||||
--- Returns true if the region is being dragged.
|
|
||||||
--- @return boolean isDragging True if the region is being dragged.
|
|
||||||
--- @example
|
|
||||||
--- local isDragging = myScriptRegion:IsDragging()
|
|
||||||
IsDragging = function(self) end,
|
|
||||||
|
|
||||||
--- Returns true if the region can receive mouse clicks.
|
|
||||||
--- @return boolean enabled True if mouse clicks are enabled.
|
|
||||||
--- @example
|
|
||||||
--- local isEnabled = myScriptRegion:IsMouseClickEnabled()
|
|
||||||
IsMouseClickEnabled = function(self) end,
|
|
||||||
|
|
||||||
--- Returns true if the region can receive mouse input.
|
|
||||||
--- @return boolean enabled True if mouse input is enabled.
|
|
||||||
--- @example
|
|
||||||
--- local isEnabled = myScriptRegion:IsMouseEnabled()
|
|
||||||
IsMouseEnabled = function(self) end,
|
|
||||||
|
|
||||||
--- Returns true if the region can receive mouse hover events.
|
|
||||||
--- @return boolean enabled True if mouse hover events are enabled.
|
|
||||||
--- @example
|
|
||||||
--- local isEnabled = myScriptRegion:IsMouseMotionEnabled()
|
|
||||||
IsMouseMotionEnabled = function(self) end,
|
|
||||||
|
|
||||||
--- Returns true if the mouse cursor is hovering over the region.
|
|
||||||
--- @return boolean isMouseMotionFocus True if the mouse is over the region.
|
|
||||||
--- @example
|
|
||||||
--- local isMouseOver = myScriptRegion:IsMouseMotionFocus()
|
|
||||||
IsMouseMotionFocus = function(self) end,
|
|
||||||
|
|
||||||
--- Returns true if the mouse cursor is hovering over the region.
|
|
||||||
--- @param offsetTop number? Optional. The top offset.
|
|
||||||
--- @param offsetBottom number? Optional. The bottom offset.
|
|
||||||
--- @param offsetLeft number? Optional. The left offset.
|
|
||||||
--- @param offsetRight number? Optional. The right offset.
|
|
||||||
--- @return boolean isMouseOver True if the mouse is over the region.
|
|
||||||
--- @example
|
|
||||||
--- local isMouseOver = myScriptRegion:IsMouseOver()
|
|
||||||
IsMouseOver = function(self, offsetTop, offsetBottom, offsetLeft, offsetRight) end,
|
|
||||||
|
|
||||||
--- Returns true if the region can receive mouse wheel input.
|
|
||||||
--- @return boolean enabled True if mouse wheel input is enabled.
|
|
||||||
--- @example
|
|
||||||
--- local isEnabled = myScriptRegion:IsMouseWheelEnabled()
|
|
||||||
IsMouseWheelEnabled = function(self) end,
|
|
||||||
|
|
||||||
--- Returns whether the region is currently protected.
|
|
||||||
--- @return boolean isProtected True if the region is protected.
|
|
||||||
--- @return boolean isProtectedExplicitly True if the protection is explicit.
|
|
||||||
--- @example
|
|
||||||
--- local isProtected, isExplicit = myScriptRegion:IsProtected()
|
|
||||||
IsProtected = function(self) end,
|
|
||||||
|
|
||||||
--- Returns true if the region can be positioned on the screen.
|
|
||||||
--- @return boolean isValid True if the region is valid.
|
|
||||||
--- @example
|
|
||||||
--- local isValid = myScriptRegion:IsRectValid()
|
|
||||||
IsRectValid = function(self) end,
|
|
||||||
|
|
||||||
--- Returns true if the region should be shown.
|
|
||||||
--- @return boolean isShown True if the region is shown.
|
|
||||||
--- @example
|
|
||||||
--- local isShown = myScriptRegion:IsShown()
|
|
||||||
IsShown = function(self) end,
|
|
||||||
|
|
||||||
--- Returns true if the region and its parents are shown.
|
|
||||||
--- @return boolean isVisible True if the region is visible.
|
|
||||||
--- @example
|
|
||||||
--- local isVisible = myScriptRegion:IsVisible()
|
|
||||||
IsVisible = function(self) end,
|
|
||||||
|
|
||||||
--- Sets whether the region should receive mouse clicks.
|
|
||||||
--- @param enabled boolean True to enable mouse clicks.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetMouseClickEnabled(true)
|
|
||||||
SetMouseClickEnabled = function(self, enabled) end,
|
|
||||||
|
|
||||||
--- Sets whether the region should receive mouse hover events.
|
|
||||||
--- @param enabled boolean True to enable mouse hover events.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetMouseMotionEnabled(true)
|
|
||||||
SetMouseMotionEnabled = function(self, enabled) end,
|
|
||||||
|
|
||||||
--- Sets the parent of the region.
|
|
||||||
--- @param parent Frame? The parent frame.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetParent(UIParent)
|
|
||||||
SetParent = function(self, parent) end,
|
|
||||||
|
|
||||||
--- Allows the region to propagate mouse clicks to underlying regions or the world frame.
|
|
||||||
--- @param button1 string? The first button to pass through.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetPassThroughButtons("LeftButton")
|
|
||||||
SetPassThroughButtons = function(self, button1) end,
|
|
||||||
|
|
||||||
--- Sets the widget script handler.
|
|
||||||
--- @param scriptTypeName string The name of the script type.
|
|
||||||
--- @param script function? The script handler.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetScript("OnClick", function() print("Clicked!") end)
|
|
||||||
SetScript = function(self, scriptTypeName, script) end,
|
|
||||||
|
|
||||||
--- Shows or hides the region.
|
|
||||||
--- @param show boolean? Optional. True to show, false to hide.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetShown(true)
|
|
||||||
SetShown = function(self, show) end,
|
|
||||||
|
|
||||||
--- Shows the region.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:Show()
|
|
||||||
Show = function(self) end,
|
|
||||||
|
|
||||||
--- Adjusts the x and y offset of the region.
|
|
||||||
--- @param x number The x offset.
|
|
||||||
--- @param y number The y offset.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:AdjustPointsOffset(10, 20)
|
|
||||||
AdjustPointsOffset = function(self, x, y) end,
|
|
||||||
|
|
||||||
--- Removes all anchor points from the region.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:ClearAllPoints()
|
|
||||||
ClearAllPoints = function(self) end,
|
|
||||||
|
|
||||||
--- Removes an anchor point from the region by name.
|
|
||||||
--- @param point string The name of the anchor point.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:ClearPoint("TOP")
|
|
||||||
ClearPoint = function(self, point) end,
|
|
||||||
|
|
||||||
--- Resets the x and y offset on the region to zero.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:ClearPointsOffset()
|
|
||||||
ClearPointsOffset = function(self) end,
|
|
||||||
|
|
||||||
--- Returns the number of anchor points for the region.
|
|
||||||
--- @return number numPoints The number of anchor points.
|
|
||||||
--- @example
|
|
||||||
--- local numPoints = myScriptRegion:GetNumPoints()
|
|
||||||
GetNumPoints = function(self) end,
|
|
||||||
|
|
||||||
--- Returns an anchor point for the region.
|
|
||||||
--- @param anchorIndex number? Optional. The index of the anchor point.
|
|
||||||
--- @return string point The anchor point.
|
|
||||||
--- @return Frame relativeTo The frame to which the anchor is relative.
|
|
||||||
--- @return string relativePoint The relative point.
|
|
||||||
--- @return number offsetX The x offset.
|
|
||||||
--- @return number offsetY The y offset.
|
|
||||||
--- @example
|
|
||||||
--- local point, relativeTo, relativePoint, offsetX, offsetY = myScriptRegion:GetPoint()
|
|
||||||
GetPoint = function(self, anchorIndex) end,
|
|
||||||
|
|
||||||
--- Returns an anchor point by name for the region.
|
|
||||||
--- @param point string The name of the anchor point.
|
|
||||||
--- @return string point The anchor point.
|
|
||||||
--- @return Frame relativeTo The frame to which the anchor is relative.
|
|
||||||
--- @return string relativePoint The relative point.
|
|
||||||
--- @return number offsetX The x offset.
|
|
||||||
--- @return number offsetY The y offset.
|
|
||||||
--- @example
|
|
||||||
--- local point, relativeTo, relativePoint, offsetX, offsetY = myScriptRegion:GetPointByName("TOP")
|
|
||||||
GetPointByName = function(self, point) end,
|
|
||||||
|
|
||||||
--- Positions the region the same as another region.
|
|
||||||
--- @param relativeTo Frame The frame to position relative to.
|
|
||||||
--- @param doResize boolean? Optional. True to resize the region.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetAllPoints(otherFrame)
|
|
||||||
SetAllPoints = function(self, relativeTo, doResize) end,
|
|
||||||
|
|
||||||
--- Sets the height of the region.
|
|
||||||
--- @param height number The height to set.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetHeight(100)
|
|
||||||
SetHeight = function(self, height) end,
|
|
||||||
|
|
||||||
--- Sets an anchor point for the region.
|
|
||||||
--- @param point string The anchor point.
|
|
||||||
--- @param relativeTo Frame The frame to which the anchor is relative.
|
|
||||||
--- @param relativePoint string The relative point.
|
|
||||||
--- @param offsetX number The x offset.
|
|
||||||
--- @param offsetY number The y offset.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetPoint("TOP", otherFrame, "BOTTOM", 0, 0)
|
|
||||||
SetPoint = function(self, point, relativeTo, relativePoint, offsetX, offsetY) end,
|
|
||||||
|
|
||||||
--- Sets the width and height of the region.
|
|
||||||
--- @param x number The width to set.
|
|
||||||
--- @param y number The height to set.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetSize(200, 100)
|
|
||||||
SetSize = function(self, x, y) end,
|
|
||||||
|
|
||||||
--- Sets the width of the region.
|
|
||||||
--- @param width number The width to set.
|
|
||||||
--- @example
|
|
||||||
--- myScriptRegion:SetWidth(200)
|
|
||||||
SetWidth = function(self, width) end,
|
|
||||||
|
|
||||||
-- --- @alias OnEnter
|
|
||||||
-- --- Invoked when the mouse cursor enters the frame's interactive area.
|
|
||||||
-- --- @param self ScriptRegion
|
|
||||||
-- --- @param motion table The motion data.
|
|
||||||
-- --- @example
|
|
||||||
-- --- myScriptRegion:SetScript("OnEnter", function(self, motion) print("Mouse entered") end)
|
|
||||||
--
|
|
||||||
-- --- @alias OnHide
|
|
||||||
-- --- Invoked when the frame's visibility changes to hidden.
|
|
||||||
-- --- @param self ScriptRegion
|
|
||||||
-- --- @example
|
|
||||||
-- --- myScriptRegion:SetScript("OnHide", function(self) print("Frame hidden") end)
|
|
||||||
--
|
|
||||||
-- --- @alias OnLeave
|
|
||||||
-- --- Invoked when the mouse cursor leaves the frame's interactive area.
|
|
||||||
-- --- @param self ScriptRegion
|
|
||||||
-- --- @param motion table The motion data.
|
|
||||||
-- --- @example
|
|
||||||
-- --- myScriptRegion:SetScript("OnLeave", function(self, motion) print("Mouse left") end)
|
|
||||||
--
|
|
||||||
-- --- @alias OnMouseDown
|
|
||||||
-- --- Invoked when a mouse button is pressed while the cursor is over the frame.
|
|
||||||
-- --- @param self ScriptRegion
|
|
||||||
-- --- @param button string The button that was pressed.
|
|
||||||
-- --- @example
|
|
||||||
-- --- myScriptRegion:SetScript("OnMouseDown", function(self, button) print("Mouse button pressed: " .. button) end)
|
|
||||||
--
|
|
||||||
-- --- @alias OnMouseUp
|
|
||||||
-- --- Invoked when the mouse button is released following a mouse down action in the frame.
|
|
||||||
-- --- @param self ScriptRegion
|
|
||||||
-- --- @param button string The button that was released.
|
|
||||||
-- --- @example
|
|
||||||
-- --- myScriptRegion:SetScript("OnMouseUp", function(self, button) print("Mouse button released: " .. button) end)
|
|
||||||
--
|
|
||||||
-- --- @alias OnMouseWheel
|
|
||||||
-- --- Invoked when the frame receives a mouse wheel scrolling action.
|
|
||||||
-- --- @param self ScriptRegion
|
|
||||||
-- --- @param delta number The amount of scrolling.
|
|
||||||
-- --- @example
|
|
||||||
-- --- myScriptRegion:SetScript("OnMouseWheel", function(self, delta) print("Mouse wheel scrolled: " .. delta) end)
|
|
||||||
--
|
|
||||||
-- --- @alias OnShow
|
|
||||||
-- --- Invoked when the frame becomes visible.
|
|
||||||
-- --- @param self ScriptRegion
|
|
||||||
-- --- @example
|
|
||||||
-- --- myScriptRegion:SetScript("OnShow", function(self) print("Frame shown") end)
|
|
||||||
--
|
|
||||||
-- --- @alias OnLoad
|
|
||||||
-- --- Invoked when the object is created.
|
|
||||||
-- --- @param self ScriptRegion
|
|
||||||
-- --- @example
|
|
||||||
-- --- myScriptRegion:SetScript("OnLoad", function(self) print("Object loaded") end)
|
|
||||||
--
|
|
||||||
-- --- @alias OnUpdate
|
|
||||||
-- --- Invoked on every frame.
|
|
||||||
-- --- @param self ScriptRegion
|
|
||||||
-- --- @param elapsed number The time elapsed since the last frame.
|
|
||||||
-- --- @example
|
|
||||||
-- --- myScriptRegion:SetScript("OnUpdate", function(self, elapsed) print("Frame updated: " .. elapsed) end)
|
|
||||||
}
|
|
65
ui/TabardModel.lua
Normal file
65
ui/TabardModel.lua
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class TabardModel : PlayerModel
|
||||||
|
TabardModel = {
|
||||||
|
--- Checks if the tabard can be saved.
|
||||||
|
--- @return boolean canSave Whether the tabard can be saved.
|
||||||
|
--- @example
|
||||||
|
--- local canSave = myTabardModel:CanSaveTabardNow()
|
||||||
|
CanSaveTabardNow = function(self) end,
|
||||||
|
|
||||||
|
--- Cycles through the variations of a tabard component.
|
||||||
|
--- @param variationIndex number The index of the variation to cycle.
|
||||||
|
--- @param delta number The amount to cycle by.
|
||||||
|
--- @example
|
||||||
|
--- myTabardModel:CycleVariation(1, 1)
|
||||||
|
CycleVariation = function(self, variationIndex, delta) end,
|
||||||
|
|
||||||
|
--- Gets the filename for the lower background texture.
|
||||||
|
--- @return string filename The filename.
|
||||||
|
--- @example
|
||||||
|
--- local filename = myTabardModel:GetLowerBackgroundFileName()
|
||||||
|
GetLowerBackgroundFileName = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the filename for the lower emblem texture.
|
||||||
|
--- @return string filename The filename.
|
||||||
|
--- @example
|
||||||
|
--- local filename = myTabardModel:GetLowerEmblemFileName()
|
||||||
|
GetLowerEmblemFileName = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the lower emblem texture.
|
||||||
|
--- @param textureName string The name of the texture.
|
||||||
|
--- @return Texture texture The texture object.
|
||||||
|
--- @example
|
||||||
|
--- local texture = myTabardModel:GetLowerEmblemTexture("BACKGROUND")
|
||||||
|
GetLowerEmblemTexture = function(self, textureName) end,
|
||||||
|
|
||||||
|
--- Gets the filename for the upper background texture.
|
||||||
|
--- @return string filename The filename.
|
||||||
|
--- @example
|
||||||
|
--- local filename = myTabardModel:GetUpperBackgroundFileName()
|
||||||
|
GetUpperBackgroundFileName = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the filename for the upper emblem texture.
|
||||||
|
--- @return string filename The filename.
|
||||||
|
--- @example
|
||||||
|
--- local filename = myTabardModel:GetUpperEmblemFileName()
|
||||||
|
GetUpperEmblemFileName = function(self) end,
|
||||||
|
|
||||||
|
--- Gets the upper emblem texture.
|
||||||
|
--- @param textureName string The name of the texture.
|
||||||
|
--- @return Texture texture The texture object.
|
||||||
|
--- @example
|
||||||
|
--- local texture = myTabardModel:GetUpperEmblemTexture("BACKGROUND")
|
||||||
|
GetUpperEmblemTexture = function(self, textureName) end,
|
||||||
|
|
||||||
|
--- Initializes the tabard colors.
|
||||||
|
--- @example
|
||||||
|
--- myTabardModel:InitializeTabardColors()
|
||||||
|
InitializeTabardColors = function(self) end,
|
||||||
|
|
||||||
|
--- Saves the current tabard design.
|
||||||
|
--- @example
|
||||||
|
--- myTabardModel:Save()
|
||||||
|
Save = function(self) end,
|
||||||
|
}
|
@@ -1,217 +0,0 @@
|
|||||||
---@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,
|
|
||||||
}
|
|
17
ui/Translation.lua
Normal file
17
ui/Translation.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class Translation : Animation
|
||||||
|
Translation = {
|
||||||
|
--- Gets the offset values.
|
||||||
|
--- @return number offsetX, number offsetY The x and y offsets.
|
||||||
|
--- @example
|
||||||
|
--- local offsetX, offsetY = myTranslation:GetOffset()
|
||||||
|
GetOffset = function(self) end,
|
||||||
|
|
||||||
|
--- Sets the offset values.
|
||||||
|
--- @param offsetX number The x offset.
|
||||||
|
--- @param offsetY number The y offset.
|
||||||
|
--- @example
|
||||||
|
--- myTranslation:SetOffset(100, 50)
|
||||||
|
SetOffset = function(self, offsetX, offsetY) end,
|
||||||
|
}
|
7
ui/WorldFrame.lua
Normal file
7
ui/WorldFrame.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---@meta
|
||||||
|
|
||||||
|
---@class WorldFrame : Frame
|
||||||
|
WorldFrame = {
|
||||||
|
--- The WorldFrame is a special frame that displays the 3D game world.
|
||||||
|
--- It inherits all methods from Frame but has no additional methods of its own.
|
||||||
|
}
|
Reference in New Issue
Block a user