168 lines
5.9 KiB
Lua
168 lines
5.9 KiB
Lua
---@meta
|
|
|
|
---@class Region : UIObject
|
|
Region = {
|
|
--- Gets the effective alpha (opacity) of the region.
|
|
--- @return number alpha The effective alpha value.
|
|
--- @example
|
|
--- local alpha = myRegion:GetEffectiveAlpha()
|
|
GetEffectiveAlpha = function(self) end,
|
|
|
|
--- Gets the height of the region.
|
|
--- @return number height The height in pixels.
|
|
--- @example
|
|
--- local height = myRegion:GetHeight()
|
|
GetHeight = function(self) end,
|
|
|
|
--- Gets the width of the region.
|
|
--- @return number width The width in pixels.
|
|
--- @example
|
|
--- local width = myRegion:GetWidth()
|
|
GetWidth = function(self) end,
|
|
|
|
--- Gets the region's numeric identifier.
|
|
--- @return number id The region's ID.
|
|
--- @example
|
|
--- local id = myRegion:GetID()
|
|
GetID = function(self) end,
|
|
|
|
--- Gets the number of points defined for the region.
|
|
--- @return number numPoints The number of points.
|
|
--- @example
|
|
--- local numPoints = myRegion:GetNumPoints()
|
|
GetNumPoints = function(self) end,
|
|
|
|
--- Gets the position and anchoring of the region at the specified point index.
|
|
--- @param pointIndex number The index of the point to query.
|
|
--- @return string point, Region relativeTo, string relativePoint, number xOffset, number yOffset
|
|
--- @example
|
|
--- local point, relativeTo, relativePoint, xOffset, yOffset = myRegion:GetPoint(1)
|
|
GetPoint = function(self, pointIndex) end,
|
|
|
|
--- Gets the scale factor of the region.
|
|
--- @return number scale The scale factor.
|
|
--- @example
|
|
--- local scale = myRegion:GetScale()
|
|
GetScale = function(self) end,
|
|
|
|
--- Sets the alpha (opacity) of the region.
|
|
--- @param alpha number The alpha value (0.0 to 1.0).
|
|
--- @example
|
|
--- myRegion:SetAlpha(0.5)
|
|
SetAlpha = function(self, alpha) end,
|
|
|
|
--- Sets the height of the region.
|
|
--- @param height number The height in pixels.
|
|
--- @example
|
|
--- myRegion:SetHeight(100)
|
|
SetHeight = function(self, height) end,
|
|
|
|
--- Sets the width of the region.
|
|
--- @param width number The width in pixels.
|
|
--- @example
|
|
--- myRegion:SetWidth(200)
|
|
SetWidth = function(self, width) end,
|
|
|
|
--- Sets both the width and height of the region.
|
|
--- @param width number The width in pixels.
|
|
--- @param height number The height in pixels.
|
|
--- @example
|
|
--- myRegion:SetSize(200, 100)
|
|
SetSize = function(self, width, height) end,
|
|
|
|
--- Sets the scale factor of the region.
|
|
--- @param scale number The scale factor.
|
|
--- @example
|
|
--- myRegion:SetScale(1.5)
|
|
SetScale = function(self, scale) end,
|
|
|
|
--- Clears all anchor points from the region.
|
|
--- @example
|
|
--- myRegion:ClearAllPoints()
|
|
ClearAllPoints = function(self) end,
|
|
|
|
--- Sets the position and anchoring of the region.
|
|
--- @param point string The point on this region to anchor from.
|
|
--- @param relativeTo Region|string The region or frameName to anchor to.
|
|
--- @param relativePoint string The point on the other region to anchor to.
|
|
--- @param xOffset number The x-axis offset.
|
|
--- @param yOffset number The y-axis offset.
|
|
--- @example
|
|
--- myRegion:SetPoint("TOPLEFT", otherRegion, "BOTTOMRIGHT", 10, -10)
|
|
SetPoint = function(self, point, relativeTo, relativePoint, xOffset, yOffset) end,
|
|
|
|
--- Returns the region's opacity.
|
|
--- @return number alpha The opacity of the region.
|
|
--- @example
|
|
--- local alpha = myRegion:GetAlpha()
|
|
GetAlpha = function(self) end,
|
|
|
|
--- Returns the layer in which the region is drawn.
|
|
--- @return string layer The layer of the region.
|
|
--- @return number sublayer The sublayer of the region.
|
|
--- @example
|
|
--- local layer, sublayer = myRegion:GetDrawLayer()
|
|
GetDrawLayer = function(self) end,
|
|
|
|
--- Returns the scale of the region after propagating from its parents.
|
|
--- @return number effectiveScale The effective scale of the region.
|
|
--- @example
|
|
--- local effectiveScale = myRegion:GetEffectiveScale()
|
|
GetEffectiveScale = function(self) end,
|
|
|
|
--- Returns the vertex color shading of the region.
|
|
--- @return number colorR The red component of the vertex color.
|
|
--- @return number colorG The green component of the vertex color.
|
|
--- @return number colorB The blue component of the vertex color.
|
|
--- @return number colorA The alpha component of the vertex color.
|
|
--- @example
|
|
--- local r, g, b, a = myRegion:GetVertexColor()
|
|
GetVertexColor = function(self) end,
|
|
|
|
--- Returns true if the region is ignoring parent alpha.
|
|
--- @return boolean isIgnoring True if the region is ignoring parent alpha.
|
|
--- @example
|
|
--- local isIgnoring = myRegion:IsIgnoringParentAlpha()
|
|
IsIgnoringParentAlpha = function(self) end,
|
|
|
|
--- Returns true if the region is ignoring parent scale.
|
|
--- @return boolean isIgnoring True if the region is ignoring parent scale.
|
|
--- @example
|
|
--- local isIgnoring = myRegion:IsIgnoringParentScale()
|
|
IsIgnoringParentScale = function(self) end,
|
|
|
|
--- Returns true if the region is fully loaded.
|
|
--- @return boolean isLoaded True if the region is loaded.
|
|
--- @example
|
|
--- local isLoaded = myRegion:IsObjectLoaded()
|
|
IsObjectLoaded = function(self) end,
|
|
|
|
--- Sets the layer in which the region is drawn.
|
|
--- @param layer string The layer to set.
|
|
--- @param sublevel number? Optional. The sublevel to set.
|
|
--- @example
|
|
--- myRegion:SetDrawLayer("ARTWORK", 1)
|
|
SetDrawLayer = function(self, layer, sublevel) end,
|
|
|
|
--- Sets whether the region should ignore its parent's alpha.
|
|
--- @param ignore boolean True to ignore parent alpha.
|
|
--- @example
|
|
--- myRegion:SetIgnoreParentAlpha(true)
|
|
SetIgnoreParentAlpha = function(self, ignore) end,
|
|
|
|
--- Sets whether the region should ignore its parent's scale.
|
|
--- @param ignore boolean True to ignore parent scale.
|
|
--- @example
|
|
--- myRegion:SetIgnoreParentScale(true)
|
|
SetIgnoreParentScale = function(self, ignore) end,
|
|
|
|
--- Sets the vertex shading color of the region.
|
|
--- @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
|
|
--- myRegion:SetVertexColor(1, 0, 0) -- Set to red
|
|
SetVertexColor = function(self, colorR, colorG, colorB, a) end,
|
|
}
|