Update
This commit is contained in:
109
ui/Region.lua
109
ui/Region.lua
@@ -1,7 +1,96 @@
|
||||
---@meta
|
||||
|
||||
---@class Region : ScriptRegion
|
||||
---@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
|
||||
@@ -21,12 +110,6 @@ Region = {
|
||||
--- local effectiveScale = myRegion:GetEffectiveScale()
|
||||
GetEffectiveScale = function(self) end,
|
||||
|
||||
--- Returns the scale of the region.
|
||||
--- @return number scale The scale of the region.
|
||||
--- @example
|
||||
--- local scale = myRegion:GetScale()
|
||||
GetScale = 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.
|
||||
@@ -54,12 +137,6 @@ Region = {
|
||||
--- local isLoaded = myRegion:IsObjectLoaded()
|
||||
IsObjectLoaded = function(self) end,
|
||||
|
||||
--- Sets the opacity of the region.
|
||||
--- @param alpha number The opacity value to set (0 to 1).
|
||||
--- @example
|
||||
--- myRegion:SetAlpha(0.5) -- Set to 50% opacity
|
||||
SetAlpha = function(self, alpha) 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.
|
||||
@@ -79,12 +156,6 @@ Region = {
|
||||
--- myRegion:SetIgnoreParentScale(true)
|
||||
SetIgnoreParentScale = function(self, ignore) end,
|
||||
|
||||
--- Sets the size scaling of the region.
|
||||
--- @param scale number The scale value to set.
|
||||
--- @example
|
||||
--- myRegion:SetScale(1.5) -- Scale to 150%
|
||||
SetScale = function(self, scale) 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.
|
||||
|
||||
Reference in New Issue
Block a user