Library Updates
This commit is contained in:
+31
-8
@@ -30,7 +30,7 @@ function DF:CreateCoolTip()
|
||||
|
||||
local defaultBackdrop = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,
|
||||
tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
|
||||
local defaultBackdropColor = {.2, .2, .2, 1}
|
||||
local defaultBackdropColor = {0.1215, 0.1176, 0.1294, 0.8000}
|
||||
local defaultBackdropBorderColor = {0.05, 0.05, 0.05, 1}
|
||||
|
||||
--initialize
|
||||
@@ -180,6 +180,16 @@ function DF:CreateCoolTip()
|
||||
self:SetBackdropColor(DF:ParseColors(defaultBackdropColor))
|
||||
self:SetBackdropBorderColor(DF:ParseColors(defaultBackdropBorderColor))
|
||||
|
||||
if (not self.innerBorderTexture) then
|
||||
self.innerBorderTexture = self:CreateTexture(nil, "overlay")
|
||||
self.innerBorderTexture:SetAllPoints()
|
||||
local atlasInfo = C_Texture.GetAtlasInfo("Options_InnerFrame")
|
||||
self.innerBorderTexture:SetTexture(atlasInfo.file)
|
||||
self.innerBorderTexture:SetTexCoord(atlasInfo.leftTexCoord + 0.05, atlasInfo.rightTexCoord - 0.05, atlasInfo.topTexCoord + 0.05, atlasInfo.bottomTexCoord - 0.05)
|
||||
self.innerBorderTexture:Hide()
|
||||
self.innerBorderTexture:SetAlpha(0) --not in use due to a failure in the texture
|
||||
end
|
||||
|
||||
if (not self.frameBackgroundTexture) then
|
||||
self.frameBackgroundTexture = self:CreateTexture("$parent_FrameBackgroundTexture", "BACKGROUND", nil, 2)
|
||||
self.frameBackgroundTexture:SetColorTexture(0, 0, 0, 0)
|
||||
@@ -2033,7 +2043,7 @@ function DF:CreateCoolTip()
|
||||
function CoolTip:SetColor(menuType, ...)
|
||||
local colorRed, colorGreen, colorBlue, colorAlpha = DF:ParseColors(...)
|
||||
if ((type(menuType) == "string" and menuType == CONST_MENU_TYPE_MAINMENU) or (type(menuType) == "number" and menuType == 1)) then
|
||||
frame1.frameBackgroundTexture:SetVertexColor(colorRed, colorGreen, colorBlue, colorAlpha)
|
||||
frame1.frameBackgroundTexture:SetColorTexture(colorRed, colorGreen, colorBlue, colorAlpha)
|
||||
|
||||
--hide textures from older versions if exists
|
||||
if (frame1.frameBackgroundLeft) then
|
||||
@@ -2043,7 +2053,7 @@ function DF:CreateCoolTip()
|
||||
end
|
||||
|
||||
elseif ((type(menuType) == "string" and menuType == CONST_MENU_TYPE_SUBMENU) or (type(menuType) == "number" and menuType == 2)) then
|
||||
frame2.frameBackgroundTexture:SetVertexColor(colorRed, colorGreen, colorBlue, colorAlpha)
|
||||
frame2.frameBackgroundTexture:SetColorTexture(colorRed, colorGreen, colorBlue, colorAlpha)
|
||||
|
||||
--hide textures from older versions if exists
|
||||
if (frame2.frameBackgroundLeft) then
|
||||
@@ -2171,7 +2181,12 @@ function DF:CreateCoolTip()
|
||||
frame1.frameBackgroundRight:Hide()
|
||||
frame1.frameBackgroundCenter:Hide()
|
||||
end
|
||||
frame1.frameBackgroundTexture:SetVertexColor(0, 0, 0, 0)
|
||||
|
||||
frame1.frameBackgroundTexture:SetColorTexture(0, 0, 0, 0)
|
||||
frame2.frameBackgroundTexture:SetColorTexture(0, 0, 0, 0)
|
||||
|
||||
frame1.innerBorderTexture:Hide()
|
||||
frame2.innerBorderTexture:Hide()
|
||||
|
||||
if (not fromPreset) then
|
||||
CoolTip:Preset(3, true)
|
||||
@@ -3106,7 +3121,7 @@ function DF:CreateCoolTip()
|
||||
self:SetOption("IgnoreButtonAutoHeight", true)
|
||||
self:SetColor(1, 0.5, 0.5, 0.5, 0.5)
|
||||
|
||||
elseif (presetId == 2) then
|
||||
elseif (presetId == 2) then --used by most of the widgets
|
||||
self:SetOption("TextFont", DF:GetBestFontForLanguage())
|
||||
self:SetOption("TextColor", "orange")
|
||||
self:SetOption("TextSize", 12)
|
||||
@@ -3114,22 +3129,30 @@ function DF:CreateCoolTip()
|
||||
self:SetOption("ButtonsYMod", -4)
|
||||
self:SetOption("YSpacingMod", -4)
|
||||
self:SetOption("IgnoreButtonAutoHeight", true)
|
||||
self:SetColor(1, "transparent")
|
||||
self:SetColor(1, defaultBackdropColor)
|
||||
self:SetColor(2, defaultBackdropColor)
|
||||
|
||||
self:SetBackdrop(1, defaultBackdrop, defaultBackdropColor, defaultBackdropBorderColor)
|
||||
self:SetBackdrop(2, defaultBackdrop, defaultBackdropColor, defaultBackdropBorderColor)
|
||||
|
||||
elseif (presetId == 3) then
|
||||
frame1.innerBorderTexture:Show()
|
||||
frame2.innerBorderTexture:Show()
|
||||
|
||||
elseif (presetId == 3) then --default used when Cooltip:Reset() is called
|
||||
self:SetOption("TextFont", DF:GetBestFontForLanguage())
|
||||
self:SetOption("TextColor", "orange")
|
||||
self:SetOption("TextSize", 12)
|
||||
self:SetOption("ButtonsYMod", -4)
|
||||
self:SetOption("YSpacingMod", -4)
|
||||
self:SetOption("IgnoreButtonAutoHeight", true)
|
||||
self:SetColor(1, "transparent")
|
||||
self:SetColor(1, defaultBackdropColor)
|
||||
self:SetColor(2, defaultBackdropColor)
|
||||
|
||||
self:SetBackdrop(1, defaultBackdrop, defaultBackdropColor, defaultBackdropBorderColor)
|
||||
self:SetBackdrop(2, defaultBackdrop, defaultBackdropColor, defaultBackdropBorderColor)
|
||||
|
||||
frame1.innerBorderTexture:Show()
|
||||
frame2.innerBorderTexture:Show()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+23
-25
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 359
|
||||
local dversion = 362
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
@@ -1071,47 +1071,45 @@ end
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> points
|
||||
|
||||
function DF:CheckPoints (v1, v2, v3, v4, v5, object)
|
||||
|
||||
function DF:CheckPoints(v1, v2, v3, v4, v5, object)
|
||||
if (not v1 and not v2) then
|
||||
return "topleft", object.widget:GetParent(), "topleft", 0, 0
|
||||
end
|
||||
|
||||
if (_type (v1) == "string") then
|
||||
local frameGlobal = _G [v1]
|
||||
if (frameGlobal and type (frameGlobal) == "table" and frameGlobal.GetObjectType) then
|
||||
return DF:CheckPoints (frameGlobal, v2, v3, v4, v5, object)
|
||||
|
||||
if (type(v1) == "string") then
|
||||
local frameGlobal = _G[v1]
|
||||
if (frameGlobal and type(frameGlobal) == "table" and frameGlobal.GetObjectType) then
|
||||
return DF:CheckPoints(frameGlobal, v2, v3, v4, v5, object)
|
||||
end
|
||||
|
||||
elseif (_type (v2) == "string") then
|
||||
local frameGlobal = _G [v2]
|
||||
if (frameGlobal and type (frameGlobal) == "table" and frameGlobal.GetObjectType) then
|
||||
return DF:CheckPoints (v1, frameGlobal, v3, v4, v5, object)
|
||||
|
||||
elseif (type(v2) == "string") then
|
||||
local frameGlobal = _G[v2]
|
||||
if (frameGlobal and type(frameGlobal) == "table" and frameGlobal.GetObjectType) then
|
||||
return DF:CheckPoints(v1, frameGlobal, v3, v4, v5, object)
|
||||
end
|
||||
end
|
||||
|
||||
if (_type (v1) == "string" and _type (v2) == "table") then --> :setpoint ("left", frame, _, _, _)
|
||||
if (not v3 or _type (v3) == "number") then --> :setpoint ("left", frame, 10, 10)
|
||||
|
||||
if (type(v1) == "string" and type(v2) == "table") then --setpoint("left", frame, _, _, _)
|
||||
if (not v3 or type(v3) == "number") then --setpoint("left", frame, 10, 10)
|
||||
v1, v2, v3, v4, v5 = v1, v2, v1, v3, v4
|
||||
end
|
||||
|
||||
elseif (_type (v1) == "string" and _type (v2) == "number") then --> :setpoint ("topleft", x, y)
|
||||
|
||||
elseif (type(v1) == "string" and type(v2) == "number") then --setpoint("topleft", x, y)
|
||||
v1, v2, v3, v4, v5 = v1, object.widget:GetParent(), v1, v2, v3
|
||||
|
||||
elseif (_type (v1) == "number") then --> :setpoint (x, y)
|
||||
|
||||
elseif (type(v1) == "number") then --setpoint(x, y)
|
||||
v1, v2, v3, v4, v5 = "topleft", object.widget:GetParent(), "topleft", v1, v2
|
||||
|
||||
elseif (_type (v1) == "table") then --> :setpoint (frame, x, y)
|
||||
elseif (type(v1) == "table") then --setpoint(frame, x, y)
|
||||
v1, v2, v3, v4, v5 = "topleft", v1, "topleft", v2, v3
|
||||
|
||||
end
|
||||
|
||||
|
||||
if (not v2) then
|
||||
v2 = object.widget:GetParent()
|
||||
elseif (v2.dframework) then
|
||||
v2 = v2.widget
|
||||
end
|
||||
|
||||
|
||||
return v1 or "topleft", v2, v3 or "topleft", v4 or 0, v5 or 0
|
||||
end
|
||||
|
||||
@@ -1247,7 +1245,7 @@ end
|
||||
return {r, g, b, a}
|
||||
|
||||
elseif (newFormat == "tablemembers") then
|
||||
return {["r"] = r, ["g"] = g, ["b"] = b, ["a"] = 1}
|
||||
return {["r"] = r, ["g"] = g, ["b"] = b, ["a"] = a}
|
||||
|
||||
elseif (newFormat == "numbers") then
|
||||
return r, g, b, a
|
||||
|
||||
@@ -6,6 +6,81 @@ end
|
||||
|
||||
local _
|
||||
|
||||
DF.DefaultMetaFunctionsGet = {
|
||||
parent = function(object)
|
||||
return object:GetParent()
|
||||
end,
|
||||
}
|
||||
|
||||
DF.DefaultMetaFunctionsSet = {
|
||||
parent = function(object, value)
|
||||
return object:SetParent(value)
|
||||
end,
|
||||
}
|
||||
|
||||
local doublePoint = {
|
||||
["lefts"] = true,
|
||||
["rights"] = true,
|
||||
["tops"] = true,
|
||||
["bottoms"] = true,
|
||||
["bottom-top"] = true,
|
||||
["top-bottom"] = true,
|
||||
}
|
||||
|
||||
DF.SetPointMixin = {
|
||||
SetPoint = function(object, anchorName1, anchorObject, anchorName2, xOffset, yOffset)
|
||||
if (doublePoint[anchorName1]) then
|
||||
object:SetAllPoints()
|
||||
local anchorTo
|
||||
if (anchorObject) then
|
||||
xOffset, yOffset = anchorName2 or 0, xOffset or 0
|
||||
anchorTo = anchorObject.widget or anchorObject
|
||||
else
|
||||
xOffset, yOffset = anchorObject or 0, anchorName2 or 0
|
||||
anchorTo = object:GetParent()
|
||||
end
|
||||
|
||||
--offset always inset to inner
|
||||
if (anchorName1 == "lefts") then
|
||||
object:SetPoint("topleft", anchorTo, "topleft", xOffset, -yOffset)
|
||||
object:SetPoint("bottomleft", anchorTo, "bottomleft", xOffset, yOffset)
|
||||
|
||||
elseif (anchorName1 == "rights") then
|
||||
object:SetPoint("topright", anchorTo, "topright", xOffset, -yOffset)
|
||||
object:SetPoint("bottomright", anchorTo, "bottomright", xOffset, yOffset)
|
||||
|
||||
elseif (anchorName1 == "tops") then
|
||||
object:SetPoint("topleft", anchorTo, "topleft", xOffset, -yOffset)
|
||||
object:SetPoint("topright", anchorTo, "topright", -xOffset, -yOffset)
|
||||
|
||||
elseif (anchorName1 == "bottoms") then
|
||||
object:SetPoint("bottomleft", anchorTo, "bottomleft", xOffset, yOffset)
|
||||
object:SetPoint("bottomright", anchorTo, "bottomright", -xOffset, yOffset)
|
||||
|
||||
elseif (anchorName1 == "bottom-top") then
|
||||
object:SetPoint("bottomleft", anchorTo, "topleft", xOffset, yOffset)
|
||||
object:SetPoint("bottomright", anchorTo, "topright", -xOffset, yOffset)
|
||||
|
||||
elseif (anchorName1 == "top-bottom") then
|
||||
object:SetPoint("topleft", anchorTo, "bottomleft", xOffset, -yOffset)
|
||||
object:SetPoint("topright", anchorTo, "bottomright", -xOffset, -yOffset)
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
xOffset = xOffset or 0
|
||||
yOffset = yOffset or 0
|
||||
|
||||
anchorName1, anchorObject, anchorName2, xOffset, yOffset = DF:CheckPoints(anchorName1, anchorObject, anchorName2, xOffset, yOffset, object)
|
||||
if (not anchorName1) then
|
||||
error("SetPoint: Invalid parameter.")
|
||||
return
|
||||
end
|
||||
return object.widget:SetPoint(anchorName1, anchorObject, anchorName2, xOffset, yOffset)
|
||||
end,
|
||||
}
|
||||
|
||||
--mixin for options functions
|
||||
DF.OptionsFunctions = {
|
||||
SetOption = function (self, optionName, optionValue)
|
||||
|
||||
+38
-39
@@ -3905,7 +3905,6 @@ local tab_container_on_show = function (self)
|
||||
end
|
||||
|
||||
function DF:CreateTabContainer (parent, title, frame_name, frameList, options_table, hookList)
|
||||
|
||||
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
@@ -3913,14 +3912,14 @@ function DF:CreateTabContainer (parent, title, frame_name, frameList, options_ta
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
options_table = options_table or {}
|
||||
local frameWidth = parent:GetWidth()
|
||||
local frame_height = parent:GetHeight()
|
||||
local parentFrameWidth = parent:GetWidth()
|
||||
local y_offset = options_table.y_offset or 0
|
||||
local button_width = options_table.button_width or 160
|
||||
local button_height = options_table.button_height or 20
|
||||
local buttonWidth = options_table.button_width or 160
|
||||
local buttonHeight = options_table.button_height or 20
|
||||
local buttonAnchorX = options_table.button_x or 230
|
||||
local buttonAnchorY = options_table.button_y or -32
|
||||
local button_text_size = options_table.button_text_size or 10
|
||||
local containerWidthOffset = options_table.container_width_offset or 0
|
||||
|
||||
local mainFrame = CreateFrame ("frame", frame_name, parent.widget or parent, "BackdropTemplate")
|
||||
mainFrame:SetAllPoints()
|
||||
@@ -3954,8 +3953,8 @@ function DF:CreateTabContainer (parent, title, frame_name, frameList, options_ta
|
||||
local title = DF:CreateLabel (f, frame.title, 16, "silver")
|
||||
title:SetPoint ("topleft", mainTitle, "bottomleft", 0, 0)
|
||||
|
||||
local tabButton = DF:CreateButton (mainFrame, DF.TabContainerFunctions.SelectIndex, button_width, button_height, frame.title, i, nil, nil, nil, "$parentTabButton" .. frame.name, false, button_tab_template)
|
||||
PixelUtil.SetSize (tabButton, button_width, button_height)
|
||||
local tabButton = DF:CreateButton (mainFrame, DF.TabContainerFunctions.SelectIndex, buttonWidth, buttonHeight, frame.title, i, nil, nil, nil, "$parentTabButton" .. frame.name, false, button_tab_template)
|
||||
PixelUtil.SetSize (tabButton, buttonWidth, buttonHeight)
|
||||
tabButton:SetFrameLevel (220)
|
||||
tabButton.textsize = button_text_size
|
||||
tabButton.mainFrame = mainFrame
|
||||
@@ -3993,22 +3992,20 @@ function DF:CreateTabContainer (parent, title, frame_name, frameList, options_ta
|
||||
local y = buttonAnchorY
|
||||
local spaceBetweenButtons = 3
|
||||
|
||||
local space_for_buttons = frameWidth - (#frameList * spaceBetweenButtons) - buttonAnchorX
|
||||
local amount_buttons_per_row = floor (space_for_buttons / button_width)
|
||||
|
||||
local last_button = mainFrame.AllButtons[1]
|
||||
local allocatedSpaceForButtons = parentFrameWidth - ((#frameList - 2) * spaceBetweenButtons) - buttonAnchorX + containerWidthOffset
|
||||
local amountButtonsPerRow = floor(allocatedSpaceForButtons / buttonWidth)
|
||||
|
||||
mainFrame.AllButtons[1]:SetPoint ("topleft", mainTitle, "topleft", x, y)
|
||||
x = x + button_width + 2
|
||||
mainFrame.AllButtons[1]:SetPoint("topleft", mainTitle, "topleft", x, y)
|
||||
x = x + buttonWidth + 2
|
||||
|
||||
for i = 2, #mainFrame.AllButtons do
|
||||
local button = mainFrame.AllButtons [i]
|
||||
PixelUtil.SetPoint (button, "topleft", mainTitle, "topleft", x, y)
|
||||
x = x + button_width + 2
|
||||
local button = mainFrame.AllButtons[i]
|
||||
PixelUtil.SetPoint(button, "topleft", mainTitle, "topleft", x, y)
|
||||
x = x + buttonWidth + 2
|
||||
|
||||
if (i % amount_buttons_per_row == 0) then
|
||||
if (i % amountButtonsPerRow == 0) then
|
||||
x = buttonAnchorX
|
||||
y = y - button_height - 1
|
||||
y = y - buttonHeight - 1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4858,34 +4855,36 @@ end
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- ~standard backdrop
|
||||
|
||||
function DF:ApplyStandardBackdrop (f, darkTheme, alphaScale)
|
||||
function DF:ApplyStandardBackdrop(frame, darkTheme, alphaScale)
|
||||
alphaScale = alphaScale or 1.0
|
||||
|
||||
if(not f.SetBackdrop)then
|
||||
if (not frame.SetBackdrop)then
|
||||
--print(debugstack(1,2,1))
|
||||
Mixin(f, BackdropTemplateMixin)
|
||||
Mixin(frame, BackdropTemplateMixin)
|
||||
end
|
||||
|
||||
if (darkTheme) then
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Cooldown\cooldown2]], tileSize = 32, tile = true})
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdropColor (.54, .54, .54, .54 * alphaScale)
|
||||
frame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Cooldown\cooldown2]], tileSize = 32, tile = true})
|
||||
frame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
frame:SetBackdropColor(.54, .54, .54, .54 * alphaScale)
|
||||
|
||||
else
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdropColor (0, 0, 0, 0.2 * alphaScale)
|
||||
frame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
frame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
frame:SetBackdropColor(0.1215, 0.1176, 0.1294, 0.2 * alphaScale)
|
||||
end
|
||||
|
||||
if (not f.__background) then
|
||||
f.__background = f:CreateTexture (nil, "background")
|
||||
if (not frame.__background) then
|
||||
frame.__background = frame:CreateTexture(nil, "background")
|
||||
frame.__background:SetColorTexture(0.1215, 0.1176, 0.1294, 0.99)
|
||||
frame.__background:SetAllPoints()
|
||||
end
|
||||
|
||||
f.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
|
||||
f.__background:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.__background:SetAlpha (0.8 * alphaScale)
|
||||
f.__background:SetVertTile (true)
|
||||
f.__background:SetHorizTile (true)
|
||||
f.__background:SetAllPoints()
|
||||
|
||||
--frame.innerBorderTexture = frame:CreateTexture(nil, "overlay")
|
||||
--frame.innerBorderTexture:SetAllPoints()
|
||||
--frame.innerBorderTexture:SetAtlas("Options_InnerFrame")
|
||||
|
||||
frame.__background:SetAlpha(0.8 * alphaScale)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -7062,9 +7061,9 @@ function DF:BuildStatusbarAuthorInfo (f, addonBy, authorsNameString)
|
||||
discordTextEntry:SetPoint ("left", discordLabel, "right", 2, 0)
|
||||
|
||||
--format
|
||||
authorName:SetAlpha (.4)
|
||||
discordLabel:SetAlpha (.4)
|
||||
discordTextEntry:SetAlpha (.4)
|
||||
authorName:SetAlpha (.6)
|
||||
discordLabel:SetAlpha (.6)
|
||||
discordTextEntry:SetAlpha (.6)
|
||||
discordTextEntry:SetBackdropBorderColor (1, 1, 1, 0)
|
||||
|
||||
discordTextEntry:SetHook ("OnEditFocusGained", function()
|
||||
|
||||
+292
-216
@@ -1,19 +1,12 @@
|
||||
|
||||
local DF = _G ["DetailsFramework"]
|
||||
if (not DF or not DetailsFrameworkCanLoad) then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local _setmetatable = setmetatable --> lua local
|
||||
local _unpack = unpack --> lua local
|
||||
local _type = type --> lua local
|
||||
local _math_floor = math.floor --> lua local
|
||||
local loadstring = loadstring --> lua local
|
||||
local loadstring = loadstring
|
||||
|
||||
local cleanfunction = function() end
|
||||
local APIImageFunctions = false
|
||||
|
||||
do
|
||||
@@ -28,7 +21,7 @@ do
|
||||
--check if there's a metaPrototype already existing
|
||||
if (_G[DF.GlobalWidgetControlNames["image"]]) then
|
||||
--get the already existing metaPrototype
|
||||
local oldMetaPrototype = _G[DF.GlobalWidgetControlNames ["image"]]
|
||||
local oldMetaPrototype = _G[DF.GlobalWidgetControlNames["image"]]
|
||||
--check if is older
|
||||
if ( (not oldMetaPrototype.dversion) or (oldMetaPrototype.dversion < DF.dversion) ) then
|
||||
--the version is older them the currently loading one
|
||||
@@ -39,277 +32,360 @@ do
|
||||
end
|
||||
else
|
||||
--first time loading the framework
|
||||
_G[DF.GlobalWidgetControlNames ["image"]] = metaPrototype
|
||||
_G[DF.GlobalWidgetControlNames["image"]] = metaPrototype
|
||||
end
|
||||
end
|
||||
|
||||
local ImageMetaFunctions = _G[DF.GlobalWidgetControlNames ["image"]]
|
||||
local ImageMetaFunctions = _G[DF.GlobalWidgetControlNames["image"]]
|
||||
|
||||
DF:Mixin(ImageMetaFunctions, DF.SetPointMixin)
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> metatables
|
||||
--metatables
|
||||
|
||||
ImageMetaFunctions.__call = function (_table, value)
|
||||
return self.image:SetTexture (value)
|
||||
ImageMetaFunctions.__call = function(object, value)
|
||||
return object.image:SetTexture(value)
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> members
|
||||
--members
|
||||
|
||||
--> shown
|
||||
local gmember_shown = function (_object)
|
||||
return _object:IsShown()
|
||||
--shown
|
||||
local gmember_shown = function(object)
|
||||
return object:IsShown()
|
||||
end
|
||||
--> frame width
|
||||
local gmember_width = function (_object)
|
||||
return _object.image:GetWidth()
|
||||
|
||||
--frame width
|
||||
local gmember_width = function(object)
|
||||
return object.image:GetWidth()
|
||||
end
|
||||
--> frame height
|
||||
local gmember_height = function (_object)
|
||||
return _object.image:GetHeight()
|
||||
|
||||
--frame height
|
||||
local gmember_height = function(object)
|
||||
return object.image:GetHeight()
|
||||
end
|
||||
--> texture
|
||||
local gmember_texture = function (_object)
|
||||
return _object.image:GetTexture()
|
||||
|
||||
--texture
|
||||
local gmember_texture = function(object)
|
||||
return object.image:GetTexture()
|
||||
end
|
||||
--> alpha
|
||||
local gmember_alpha = function (_object)
|
||||
return _object.image:GetAlpha()
|
||||
|
||||
--alpha
|
||||
local gmember_alpha = function(object)
|
||||
return object.image:GetAlpha()
|
||||
end
|
||||
|
||||
--saturation
|
||||
local gmember_saturation = function(object)
|
||||
return object.image:GetDesaturated()
|
||||
end
|
||||
|
||||
--atlas
|
||||
local gmember_atlas = function(object)
|
||||
return object.image:GetAtlas()
|
||||
end
|
||||
|
||||
--texcoords
|
||||
local gmember_texcoord = function(object)
|
||||
return object.image:GetTexCoord()
|
||||
end
|
||||
|
||||
local gmember_drawlayer = function(object)
|
||||
return object.image:GetDrawLayer()
|
||||
end
|
||||
|
||||
local gmember_sublevel = function(object)
|
||||
local _, subLevel = object.image:GetDrawLayer()
|
||||
return subLevel
|
||||
end
|
||||
|
||||
ImageMetaFunctions.GetMembers = ImageMetaFunctions.GetMembers or {}
|
||||
ImageMetaFunctions.GetMembers ["shown"] = gmember_shown
|
||||
ImageMetaFunctions.GetMembers ["alpha"] = gmember_alpha
|
||||
ImageMetaFunctions.GetMembers ["width"] = gmember_width
|
||||
ImageMetaFunctions.GetMembers ["height"] = gmember_height
|
||||
ImageMetaFunctions.GetMembers ["texture"] = gmember_texture
|
||||
DF:Mixin(ImageMetaFunctions.GetMembers, DF.DefaultMetaFunctionsGet)
|
||||
|
||||
ImageMetaFunctions.__index = function (_table, _member_requested)
|
||||
ImageMetaFunctions.GetMembers["shown"] = gmember_shown
|
||||
ImageMetaFunctions.GetMembers["alpha"] = gmember_alpha
|
||||
ImageMetaFunctions.GetMembers["width"] = gmember_width
|
||||
ImageMetaFunctions.GetMembers["height"] = gmember_height
|
||||
ImageMetaFunctions.GetMembers["texture"] = gmember_texture
|
||||
ImageMetaFunctions.GetMembers["blackwhite"] = gmember_saturation
|
||||
ImageMetaFunctions.GetMembers["desaturated"] = gmember_saturation
|
||||
ImageMetaFunctions.GetMembers["atlas"] = gmember_atlas
|
||||
ImageMetaFunctions.GetMembers["texcoord"] = gmember_texcoord
|
||||
ImageMetaFunctions.GetMembers["drawlayer"] = gmember_drawlayer
|
||||
ImageMetaFunctions.GetMembers["sublevel"] = gmember_sublevel
|
||||
|
||||
local func = ImageMetaFunctions.GetMembers [_member_requested]
|
||||
ImageMetaFunctions.__index = function(object, key)
|
||||
local func = ImageMetaFunctions.GetMembers[key]
|
||||
if (func) then
|
||||
return func (_table, _member_requested)
|
||||
return func(object, key)
|
||||
end
|
||||
|
||||
local fromMe = _rawget (_table, _member_requested)
|
||||
|
||||
local fromMe = rawget(object, key)
|
||||
if (fromMe) then
|
||||
return fromMe
|
||||
end
|
||||
|
||||
return ImageMetaFunctions [_member_requested]
|
||||
|
||||
return ImageMetaFunctions[key]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> show
|
||||
local smember_show = function (_object, _value)
|
||||
if (_value) then
|
||||
return _object:Show()
|
||||
--show
|
||||
local smember_show = function(object, value)
|
||||
if (value) then
|
||||
return object:Show()
|
||||
else
|
||||
return _object:Hide()
|
||||
return object:Hide()
|
||||
end
|
||||
end
|
||||
--> hide
|
||||
local smember_hide = function (_object, _value)
|
||||
if (not _value) then
|
||||
return _object:Show()
|
||||
|
||||
--hide
|
||||
local smember_hide = function(object, value)
|
||||
if (not value) then
|
||||
return object:Show()
|
||||
else
|
||||
return _object:Hide()
|
||||
return object:Hide()
|
||||
end
|
||||
end
|
||||
--> texture
|
||||
local smember_texture = function (_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
local r, g, b, a = DF:ParseColors (_value)
|
||||
_object.image:SetTexture (r, g, b, a or 1)
|
||||
|
||||
--texture
|
||||
local smember_texture = function(object, value)
|
||||
if (type (value) == "table") then
|
||||
local r, g, b, a = DF:ParseColors(value)
|
||||
object.image:SetTexture (r, g, b, a or 1)
|
||||
else
|
||||
if (DF:IsHtmlColor (_value)) then
|
||||
local r, g, b, a = DF:ParseColors (_value)
|
||||
_object.image:SetTexture (r, g, b, a or 1)
|
||||
if (DF:IsHtmlColor (value)) then
|
||||
local r, g, b, a = DF:ParseColors(value)
|
||||
object.image:SetTexture (r, g, b, a or 1)
|
||||
else
|
||||
_object.image:SetTexture (_value)
|
||||
object.image:SetTexture (value)
|
||||
end
|
||||
end
|
||||
end
|
||||
--> width
|
||||
local smember_width = function (_object, _value)
|
||||
return _object.image:SetWidth (_value)
|
||||
|
||||
--width
|
||||
local smember_width = function(object, value)
|
||||
return object.image:SetWidth(value)
|
||||
end
|
||||
--> height
|
||||
local smember_height = function (_object, _value)
|
||||
return _object.image:SetHeight (_value)
|
||||
|
||||
--height
|
||||
local smember_height = function(object, value)
|
||||
return object.image:SetHeight(value)
|
||||
end
|
||||
--> alpha
|
||||
local smember_alpha = function (_object, _value)
|
||||
return _object.image:SetAlpha (_value)
|
||||
end
|
||||
--> color
|
||||
local smember_color = function (_object, _value)
|
||||
local r, g, b, a = DF:ParseColors (_value)
|
||||
_object.image:SetColorTexture (r, g, b, a or 1)
|
||||
|
||||
--alpha
|
||||
local smember_alpha = function(object, value)
|
||||
return object.image:SetAlpha(value)
|
||||
end
|
||||
--> vertex color
|
||||
local smember_vertexcolor = function (_object, _value)
|
||||
local r, g, b, a = DF:ParseColors (_value)
|
||||
_object.image:SetVertexColor (r, g, b, a or 1)
|
||||
end
|
||||
--> desaturated
|
||||
local smember_desaturated = function (_object, _value)
|
||||
if (_value) then
|
||||
_object:SetDesaturated (true)
|
||||
|
||||
--color
|
||||
local smember_color = function(object, value)
|
||||
local r, g, b, a = DF:ParseColors(value)
|
||||
object.image:SetColorTexture(r, g, b, a or 1)
|
||||
end
|
||||
|
||||
--vertex color
|
||||
local smember_vertexcolor = function(object, value)
|
||||
local r, g, b, a = DF:ParseColors(value)
|
||||
object.image:SetVertexColor(r, g, b, a or 1)
|
||||
end
|
||||
|
||||
--desaturated
|
||||
local smember_desaturated = function(object, value)
|
||||
if (value) then
|
||||
object:SetDesaturated(true)
|
||||
else
|
||||
_object:SetDesaturated (false)
|
||||
object:SetDesaturated(false)
|
||||
end
|
||||
end
|
||||
--> texcoords
|
||||
local smember_texcoord = function (_object, _value)
|
||||
if (_value) then
|
||||
_object:SetTexCoord (unpack (_value))
|
||||
|
||||
--texcoords
|
||||
local smember_texcoord = function(object, value)
|
||||
if (value) then
|
||||
object:SetTexCoord(unpack(value))
|
||||
else
|
||||
_object:SetTexCoord (0, 1, 0, 1)
|
||||
object:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
end
|
||||
|
||||
--atlas
|
||||
local smember_atlas = function(object, value)
|
||||
if (value) then
|
||||
object:SetAtlas(value)
|
||||
end
|
||||
end
|
||||
|
||||
--draw layer
|
||||
local smember_drawlayer = function(object, value)
|
||||
object.image:SetDrawLayer(value)
|
||||
end
|
||||
|
||||
--sub level of the draw layer
|
||||
local smember_sublevel = function(object, value)
|
||||
local drawLayer = object:GetDrawLayer()
|
||||
object:SetDrawLayer(drawLayer, value)
|
||||
end
|
||||
|
||||
--gradient
|
||||
local smember_gradient = function(object, value)
|
||||
if (type(value) == "table" and value.gradient and value.fromColor and value.toColor) then
|
||||
object.image:SetColorTexture(1, 1, 1, 1)
|
||||
local fromColor = DF:FormatColor("tablemembers", value.fromColor)
|
||||
local toColor = DF:FormatColor("tablemembers", value.toColor)
|
||||
object.image:SetGradient(value.gradient, fromColor, toColor)
|
||||
else
|
||||
error("texture.gradient expect a table{gradient = 'gradient type', fromColor = 'color', toColor = 'color'}")
|
||||
end
|
||||
end
|
||||
|
||||
ImageMetaFunctions.SetMembers = ImageMetaFunctions.SetMembers or {}
|
||||
ImageMetaFunctions.SetMembers ["show"] = smember_show
|
||||
ImageMetaFunctions.SetMembers ["hide"] = smember_hide
|
||||
ImageMetaFunctions.SetMembers ["alpha"] = smember_alpha
|
||||
ImageMetaFunctions.SetMembers ["width"] = smember_width
|
||||
ImageMetaFunctions.SetMembers ["height"] = smember_height
|
||||
ImageMetaFunctions.SetMembers ["texture"] = smember_texture
|
||||
ImageMetaFunctions.SetMembers ["texcoord"] = smember_texcoord
|
||||
ImageMetaFunctions.SetMembers ["color"] = smember_color
|
||||
ImageMetaFunctions.SetMembers ["vertexcolor"] = smember_vertexcolor
|
||||
ImageMetaFunctions.SetMembers ["blackwhite"] = smember_desaturated
|
||||
DF:Mixin(ImageMetaFunctions.SetMembers, DF.DefaultMetaFunctionsSet)
|
||||
|
||||
ImageMetaFunctions.__newindex = function (_table, _key, _value)
|
||||
local func = ImageMetaFunctions.SetMembers [_key]
|
||||
ImageMetaFunctions.SetMembers["show"] = smember_show
|
||||
ImageMetaFunctions.SetMembers["hide"] = smember_hide
|
||||
ImageMetaFunctions.SetMembers["alpha"] = smember_alpha
|
||||
ImageMetaFunctions.SetMembers["width"] = smember_width
|
||||
ImageMetaFunctions.SetMembers["height"] = smember_height
|
||||
ImageMetaFunctions.SetMembers["texture"] = smember_texture
|
||||
ImageMetaFunctions.SetMembers["texcoord"] = smember_texcoord
|
||||
ImageMetaFunctions.SetMembers["color"] = smember_color
|
||||
ImageMetaFunctions.SetMembers["vertexcolor"] = smember_vertexcolor
|
||||
ImageMetaFunctions.SetMembers["blackwhite"] = smember_desaturated
|
||||
ImageMetaFunctions.SetMembers["desaturated"] = smember_desaturated
|
||||
ImageMetaFunctions.SetMembers["atlas"] = smember_atlas
|
||||
ImageMetaFunctions.SetMembers["drawlayer"] = smember_drawlayer
|
||||
ImageMetaFunctions.SetMembers["sublevel"] = smember_sublevel
|
||||
ImageMetaFunctions.SetMembers["gradient"] = smember_gradient
|
||||
|
||||
ImageMetaFunctions.__newindex = function(object, key, value)
|
||||
local func = ImageMetaFunctions.SetMembers[key]
|
||||
if (func) then
|
||||
return func (_table, _value)
|
||||
return func(object, value)
|
||||
else
|
||||
return _rawset (_table, _key, _value)
|
||||
return rawset(object, key, value)
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> methods
|
||||
--> show & hide
|
||||
function ImageMetaFunctions:IsShown()
|
||||
return self.image:IsShown()
|
||||
end
|
||||
function ImageMetaFunctions:Show()
|
||||
return self.image:Show()
|
||||
end
|
||||
function ImageMetaFunctions:Hide()
|
||||
return self.image:Hide()
|
||||
end
|
||||
|
||||
-- setpoint
|
||||
function ImageMetaFunctions:SetPoint (v1, v2, v3, v4, v5)
|
||||
v1, v2, v3, v4, v5 = DF:CheckPoints (v1, v2, v3, v4, v5, self)
|
||||
if (not v1) then
|
||||
print ("Invalid parameter for SetPoint")
|
||||
return
|
||||
end
|
||||
return self.widget:SetPoint (v1, v2, v3, v4, v5)
|
||||
end
|
||||
|
||||
-- sizes
|
||||
function ImageMetaFunctions:SetSize (w, h)
|
||||
if (w) then
|
||||
self.image:SetWidth (w)
|
||||
end
|
||||
if (h) then
|
||||
return self.image:SetHeight (h)
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> scripts
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> object constructor
|
||||
|
||||
function DF:CreateImage (parent, texture, w, h, layer, coords, member, name)
|
||||
return DF:NewImage (parent, texture, w, h, layer, coords, member, name)
|
||||
end
|
||||
|
||||
function DF:NewImage (parent, texture, w, h, layer, coords, member, name)
|
||||
|
||||
if (not parent) then
|
||||
return error ("Details! FrameWork: parent not found.", 2)
|
||||
end
|
||||
|
||||
if (not name) then
|
||||
name = "DetailsFrameworkPictureNumber" .. DF.PictureNameCounter
|
||||
DF.PictureNameCounter = DF.PictureNameCounter + 1
|
||||
end
|
||||
|
||||
if (name:find ("$parent")) then
|
||||
local parentName = DF.GetParentName (parent)
|
||||
name = name:gsub ("$parent", parentName)
|
||||
end
|
||||
|
||||
local ImageObject = {type = "image", dframework = true}
|
||||
|
||||
if (member) then
|
||||
parent [member] = ImageObject
|
||||
end
|
||||
|
||||
if (parent.dframework) then
|
||||
parent = parent.widget
|
||||
--methods
|
||||
--size
|
||||
function ImageMetaFunctions:SetSize(width, height)
|
||||
if (width) then
|
||||
self.image:SetWidth(width)
|
||||
end
|
||||
if (height) then
|
||||
return self.image:SetHeight(height)
|
||||
end
|
||||
end
|
||||
|
||||
texture = texture or ""
|
||||
|
||||
ImageObject.image = parent:CreateTexture (name, layer or "OVERLAY")
|
||||
ImageObject.widget = ImageObject.image
|
||||
DF:Mixin (ImageObject.image, DF.WidgetFunctions)
|
||||
|
||||
if (not APIImageFunctions) then
|
||||
APIImageFunctions = true
|
||||
local idx = getmetatable (ImageObject.image).__index
|
||||
for funcName, funcAddress in pairs (idx) do
|
||||
if (not ImageMetaFunctions [funcName]) then
|
||||
ImageMetaFunctions [funcName] = function (object, ...)
|
||||
local x = loadstring ( "return _G['"..object.image:GetName().."']:"..funcName.."(...)")
|
||||
return x (...)
|
||||
function ImageMetaFunctions:SetGradient(gradientType, fromColor, toColor)
|
||||
fromColor = DF:FormatColor("tablemembers", fromColor)
|
||||
toColor = DF:FormatColor("tablemembers", toColor)
|
||||
self.image:SetGradient(gradientType, fromColor, toColor)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--object constructor
|
||||
|
||||
function DF:CreateTexture(parent, texture, width, height, layer, coords, member, name)
|
||||
return DF:NewImage(parent, texture, width, height, layer, coords, member, name)
|
||||
end
|
||||
|
||||
function DF:CreateImage(parent, texture, width, height, layer, coords, member, name)
|
||||
return DF:NewImage(parent, texture, width, height, layer, coords, member, name)
|
||||
end
|
||||
|
||||
function DF:NewImage(parent, texture, width, height, layer, texCoord, member, name)
|
||||
if (not parent) then
|
||||
return error("Details! FrameWork: parent not found.", 2)
|
||||
end
|
||||
|
||||
if (not name) then
|
||||
name = "DetailsFrameworkPictureNumber" .. DF.PictureNameCounter
|
||||
DF.PictureNameCounter = DF.PictureNameCounter + 1
|
||||
end
|
||||
|
||||
if (name:find("$parent")) then
|
||||
local parentName = DF.GetParentName(parent)
|
||||
name = name:gsub("$parent", parentName)
|
||||
end
|
||||
|
||||
local ImageObject = {type = "image", dframework = true}
|
||||
|
||||
if (member) then
|
||||
parent[member] = ImageObject
|
||||
end
|
||||
|
||||
if (parent.dframework) then
|
||||
parent = parent.widget
|
||||
end
|
||||
|
||||
texture = texture or ""
|
||||
|
||||
ImageObject.image = parent:CreateTexture(name, layer or "OVERLAY")
|
||||
ImageObject.widget = ImageObject.image
|
||||
|
||||
DF:Mixin(ImageObject.image, DF.WidgetFunctions)
|
||||
|
||||
if (not APIImageFunctions) then
|
||||
APIImageFunctions = true
|
||||
local idx = getmetatable(ImageObject.image).__index
|
||||
for funcName, funcAddress in pairs(idx) do
|
||||
if (not ImageMetaFunctions[funcName]) then
|
||||
ImageMetaFunctions[funcName] = function(object, ...)
|
||||
local x = loadstring( "return _G['" .. object.image:GetName() .. "']:" .. funcName .. "(...)")
|
||||
return x(...)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ImageObject.image.MyObject = ImageObject
|
||||
|
||||
if (w) then
|
||||
ImageObject.image:SetWidth(w)
|
||||
end
|
||||
if (h) then
|
||||
ImageObject.image:SetHeight(h)
|
||||
end
|
||||
ImageObject.image.MyObject = ImageObject
|
||||
|
||||
if (texture) then
|
||||
if (type (texture) == "table") then
|
||||
local r, g, b = DF:ParseColors(texture)
|
||||
ImageObject.image:SetColorTexture(r,g,b)
|
||||
|
||||
else
|
||||
if (DF:IsHtmlColor (texture)) then
|
||||
local r, g, b = DF:ParseColors(texture)
|
||||
ImageObject.image:SetColorTexture(r, g, b)
|
||||
if (width) then
|
||||
ImageObject.image:SetWidth(width)
|
||||
end
|
||||
if (height) then
|
||||
ImageObject.image:SetHeight(height)
|
||||
end
|
||||
|
||||
if (texture) then
|
||||
if (type(texture) == "table") then
|
||||
if (texture.gradient) then
|
||||
ImageObject.image:SetColorTexture(1, 1, 1, 1)
|
||||
local fromColor = DF:FormatColor("tablemembers", texture.fromColor)
|
||||
local toColor = DF:FormatColor("tablemembers", texture.toColor)
|
||||
ImageObject.image:SetGradient(texture.gradient, fromColor, toColor)
|
||||
else
|
||||
local r, g, b, a = DF:ParseColors(texture)
|
||||
ImageObject.image:SetColorTexture(r, g, b, a)
|
||||
end
|
||||
|
||||
elseif (type(texture) == "string") then
|
||||
local isAtlas = C_Texture.GetAtlasInfo(texture)
|
||||
if (isAtlas) then
|
||||
ImageObject.image:SetAtlas(texture)
|
||||
else
|
||||
if (DF:IsHtmlColor(texture)) then
|
||||
local r, g, b = DF:ParseColors(texture)
|
||||
ImageObject.image:SetColorTexture(r, g, b)
|
||||
else
|
||||
ImageObject.image:SetTexture(texture)
|
||||
end
|
||||
end
|
||||
else
|
||||
ImageObject.image:SetTexture(texture)
|
||||
end
|
||||
end
|
||||
|
||||
if (texCoord and type(texCoord) == "table" and texCoord[4]) then
|
||||
ImageObject.image:SetTexCoord(unpack(texCoord))
|
||||
end
|
||||
|
||||
ImageObject.HookList = {
|
||||
}
|
||||
|
||||
setmetatable(ImageObject, ImageMetaFunctions)
|
||||
|
||||
return ImageObject
|
||||
end
|
||||
|
||||
if (coords and type (coords) == "table" and coords [4]) then
|
||||
ImageObject.image:SetTexCoord(unpack (coords))
|
||||
end
|
||||
|
||||
ImageObject.HookList = {
|
||||
}
|
||||
|
||||
setmetatable (ImageObject, ImageMetaFunctions)
|
||||
|
||||
return ImageObject
|
||||
end
|
||||
|
||||
@@ -54,7 +54,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not IsDragonflight()) then
|
||||
end
|
||||
|
||||
local major = "LibOpenRaid-1.0"
|
||||
local CONST_LIB_VERSION = 51
|
||||
local CONST_LIB_VERSION = 52
|
||||
LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
--declae the library within the LibStub
|
||||
|
||||
@@ -5,6 +5,8 @@ if (not LIB_OPEN_RAID_CAN_LOAD) then
|
||||
return
|
||||
end
|
||||
|
||||
local expansionId = GetExpansionLevel()
|
||||
|
||||
--localization
|
||||
local gameLanguage = GetLocale()
|
||||
|
||||
@@ -78,62 +80,80 @@ elseif (gameLanguage == "zhTW") then
|
||||
L["STRING_CRITICAL_ONLY"] = "致命"
|
||||
end
|
||||
|
||||
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
|
||||
if (expansionId == LE_EXPANSION_WRATH_OF_THE_LICH_KING) then
|
||||
LIB_OPEN_RAID_BLOODLUST = {
|
||||
[2825] = true, --bloodlust
|
||||
[32182] = true, --heroism
|
||||
[80353] = true, --timewarp
|
||||
[90355] = true, --ancient hysteria
|
||||
[309658] = true, --current exp drums
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_BLOODLUST = {
|
||||
[2825] = true, --bloodlust
|
||||
[32182] = true, --heroism
|
||||
[80353] = true, --timewarp
|
||||
[90355] = true, --ancient hysteria
|
||||
[309658] = true, --current exp drums
|
||||
}
|
||||
--which gear slots can be enchanted on the latest retail version of the game
|
||||
--when the value is a number, the slot only receives enchants for a specific attribute
|
||||
LIB_OPEN_RAID_ENCHANT_SLOTS = {
|
||||
--[INVSLOT_NECK] = true,
|
||||
[INVSLOT_BACK] = true, --for all
|
||||
[INVSLOT_CHEST] = true, --for all
|
||||
[INVSLOT_FINGER1] = true, --for all
|
||||
[INVSLOT_FINGER2] = true, --for all
|
||||
[INVSLOT_MAINHAND] = true, --for all
|
||||
|
||||
LIB_OPEN_RAID_AUGMENTATED_RUNE = 347901
|
||||
[INVSLOT_FEET] = 2, --agility only
|
||||
[INVSLOT_WRIST] = 1, --intellect only
|
||||
[INVSLOT_HAND] = 3, --strenth only
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_COVENANT_ICONS = {
|
||||
[[Interface\ICONS\UI_Sigil_Kyrian]], --kyrian
|
||||
[[Interface\ICONS\UI_Sigil_Venthyr]], --venthyr
|
||||
[[Interface\ICONS\UI_Sigil_NightFae]], --nightfae
|
||||
[[Interface\ICONS\UI_Sigil_Necrolord]], --necrolords
|
||||
}
|
||||
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 0
|
||||
LIB_OPEN_RAID_AUGMENTATED_RUNE = 0
|
||||
|
||||
LIB_OPEN_RAID_MELEE_SPECS = {
|
||||
[251] = "DEATHKNIGHT",
|
||||
[252] = "DEATHKNIGHT",
|
||||
[577] = "DEMONHUNTER",
|
||||
[103] = "DRUID",
|
||||
--[255] = "Survival", --not in the list due to the long interrupt time
|
||||
[269] = "MONK",
|
||||
[70] = "PALADIN",
|
||||
[259] = "ROGUE",
|
||||
[260] = "ROGUE",
|
||||
[261] = "ROGUE",
|
||||
[263] = "SHAMAN",
|
||||
[71] = "WARRIOR",
|
||||
[72] = "WARRIOR",
|
||||
}
|
||||
LIB_OPEN_RAID_COVENANT_ICONS = {}
|
||||
|
||||
--which gear slots can be enchanted on the latest retail version of the game
|
||||
--when the value is a number, the slot only receives enchants for a specific attribute
|
||||
LIB_OPEN_RAID_ENCHANT_SLOTS = {
|
||||
--[INVSLOT_NECK] = true,
|
||||
LIB_OPEN_RAID_ENCHANT_IDS = {}
|
||||
|
||||
[INVSLOT_BACK] = true, --for all
|
||||
[INVSLOT_CHEST] = true, --for all
|
||||
[INVSLOT_FINGER1] = true, --for all
|
||||
[INVSLOT_FINGER2] = true, --for all
|
||||
[INVSLOT_MAINHAND] = true, --for all
|
||||
LIB_OPEN_RAID_GEM_IDS = {}
|
||||
|
||||
[INVSLOT_FEET] = 2, --agility only
|
||||
[INVSLOT_WRIST] = 1, --intellect only
|
||||
[INVSLOT_HAND] = 3, --strenth only
|
||||
}
|
||||
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {}
|
||||
|
||||
-- how to get the enchantId:
|
||||
-- local itemLink = GetInventoryItemLink("player", slotId)
|
||||
-- local enchandId = select (3, strsplit(":", itemLink))
|
||||
-- print("enchantId:", enchandId)
|
||||
LIB_OPEN_RAID_ENCHANT_IDS = {
|
||||
elseif (expansionId == LE_EXPANSION_SHADOWLANDS) then
|
||||
LIB_OPEN_RAID_BLOODLUST = {
|
||||
[2825] = true, --bloodlust
|
||||
[32182] = true, --heroism
|
||||
[80353] = true, --timewarp
|
||||
[90355] = true, --ancient hysteria
|
||||
[309658] = true, --current exp drums
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
|
||||
LIB_OPEN_RAID_AUGMENTATED_RUNE = 347901
|
||||
|
||||
LIB_OPEN_RAID_COVENANT_ICONS = {
|
||||
[[Interface\ICONS\UI_Sigil_Kyrian]], --kyrian
|
||||
[[Interface\ICONS\UI_Sigil_Venthyr]], --venthyr
|
||||
[[Interface\ICONS\UI_Sigil_NightFae]], --nightfae
|
||||
[[Interface\ICONS\UI_Sigil_Necrolord]], --necrolords
|
||||
}
|
||||
|
||||
--which gear slots can be enchanted on the latest retail version of the game
|
||||
--when the value is a number, the slot only receives enchants for a specific attribute
|
||||
LIB_OPEN_RAID_ENCHANT_SLOTS = {
|
||||
--[INVSLOT_NECK] = true,
|
||||
[INVSLOT_BACK] = true, --for all
|
||||
[INVSLOT_CHEST] = true, --for all
|
||||
[INVSLOT_FINGER1] = true, --for all
|
||||
[INVSLOT_FINGER2] = true, --for all
|
||||
[INVSLOT_MAINHAND] = true, --for all
|
||||
|
||||
[INVSLOT_FEET] = 2, --agility only
|
||||
[INVSLOT_WRIST] = 1, --intellect only
|
||||
[INVSLOT_HAND] = 3, --strenth only
|
||||
}
|
||||
|
||||
-- how to get the enchantId:
|
||||
-- local itemLink = GetInventoryItemLink("player", slotId)
|
||||
-- local enchandId = select (3, strsplit(":", itemLink))
|
||||
-- print("enchantId:", enchandId)
|
||||
LIB_OPEN_RAID_ENCHANT_IDS = {
|
||||
--FEET
|
||||
--[6207] = INVSLOT_FEET, --[Enchant Boots - Speed of Soul]
|
||||
[6211] = INVSLOT_FEET, --[Enchant Boots - Eternal Agility] + 15 agi
|
||||
@@ -167,7 +187,7 @@ LIB_OPEN_RAID_ENCHANT_IDS = {
|
||||
[6217] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bounds] +20 int + 6% mana
|
||||
[6216] = INVSLOT_CHEST, --[Enchant Chest - Sacred Stats] +20 all stats
|
||||
[6230] = INVSLOT_CHEST, --[Enchant Chest - Eternal Stats] +30 all stats
|
||||
|
||||
|
||||
--MAINHAND
|
||||
[6223] = INVSLOT_MAINHAND, --[Enchant Weapon - Lightless Force] + shadow wave damage
|
||||
[6226] = INVSLOT_MAINHAND, --[Enchant Weapon - Eternal Grace] + burst of healing done
|
||||
@@ -182,33 +202,164 @@ LIB_OPEN_RAID_ENCHANT_IDS = {
|
||||
[3368] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Fallen Crusader]
|
||||
[3847] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Stoneskin Gargoyle]
|
||||
[6244] = INVSLOT_MAINHAND, --[Runeforging: Rune of Unending Thirst]
|
||||
}
|
||||
}
|
||||
|
||||
-- how to get the gemId:
|
||||
-- local itemLink = GetInventoryItemLink("player", slotId)
|
||||
-- local gemId = select (4, strsplit(":", itemLink))
|
||||
-- print("gemId:", gemId)
|
||||
LIB_OPEN_RAID_GEM_IDS = {
|
||||
[173126] = true, --Straddling Jewel Doublet (green, +12 speed)
|
||||
[173125] = true, --Revitalizing Jewel Doublet (green, +100 health)
|
||||
[173130] = true, --Masterful Jewel Cluster (blue, master)
|
||||
[173129] = true, --Versatile Jewel Cluster (blue, versatility)
|
||||
[173127] = true, --Deadly Jewel Cluster (blue, crit)
|
||||
[173128] = true, --Quick Jewel Cluster (blue, haste)
|
||||
[168636] = true, --Leviathan's Eye of Strength (purple, strength)
|
||||
[168638] = true, --Leviathan's Eye of Intellect (purple, intellect)
|
||||
[169220] = true, --Straddling Sage Agate (blue, movement speed)
|
||||
[173126] = true, --Straddling Jewel Doublet (green, movement speed)
|
||||
}
|
||||
-- how to get the gemId:
|
||||
-- local itemLink = GetInventoryItemLink("player", slotId)
|
||||
-- local gemId = select (4, strsplit(":", itemLink))
|
||||
-- print("gemId:", gemId)
|
||||
LIB_OPEN_RAID_GEM_IDS = {
|
||||
[173126] = true, --Straddling Jewel Doublet (green, +12 speed)
|
||||
[173125] = true, --Revitalizing Jewel Doublet (green, +100 health)
|
||||
[173130] = true, --Masterful Jewel Cluster (blue, master)
|
||||
[173129] = true, --Versatile Jewel Cluster (blue, versatility)
|
||||
[173127] = true, --Deadly Jewel Cluster (blue, crit)
|
||||
[173128] = true, --Quick Jewel Cluster (blue, haste)
|
||||
[168636] = true, --Leviathan's Eye of Strength (purple, strength)
|
||||
[168638] = true, --Leviathan's Eye of Intellect (purple, intellect)
|
||||
[169220] = true, --Straddling Sage Agate (blue, movement speed)
|
||||
}
|
||||
|
||||
--/dump GetWeaponEnchantInfo()
|
||||
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {
|
||||
[6188] = true, --shadowcore oil
|
||||
[6190] = true, --embalmer's oil
|
||||
[6201] = true, --weighted
|
||||
[6200] = true, --sharpened
|
||||
[5400] = true, --flametongue
|
||||
[5401] = true, --windfury
|
||||
--/dump GetWeaponEnchantInfo()
|
||||
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {
|
||||
[6188] = true, --shadowcore oil
|
||||
[6190] = true, --embalmer's oil
|
||||
[6201] = true, --weighted
|
||||
[6200] = true, --sharpened
|
||||
[5400] = true, --flametongue
|
||||
[5401] = true, --windfury
|
||||
}
|
||||
|
||||
elseif (expansionId == LE_EXPANSION_LEVEL_CURRENT) then --latest retail version after LE_EXPANSION_SHADOWLANDS
|
||||
LIB_OPEN_RAID_BLOODLUST = {
|
||||
[2825] = true, --bloodlust
|
||||
[32182] = true, --heroism
|
||||
[80353] = true, --timewarp
|
||||
[90355] = true, --ancient hysteria
|
||||
[309658] = true, --current exp drums
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
|
||||
LIB_OPEN_RAID_AUGMENTATED_RUNE = 347901
|
||||
|
||||
LIB_OPEN_RAID_COVENANT_ICONS = {
|
||||
[[Interface\ICONS\UI_Sigil_Kyrian]], --kyrian
|
||||
[[Interface\ICONS\UI_Sigil_Venthyr]], --venthyr
|
||||
[[Interface\ICONS\UI_Sigil_NightFae]], --nightfae
|
||||
[[Interface\ICONS\UI_Sigil_Necrolord]], --necrolords
|
||||
}
|
||||
|
||||
--which gear slots can be enchanted on the latest retail version of the game
|
||||
--when the value is a number, the slot only receives enchants for a specific attribute
|
||||
LIB_OPEN_RAID_ENCHANT_SLOTS = {
|
||||
--[INVSLOT_NECK] = true,
|
||||
[INVSLOT_BACK] = true, --for all
|
||||
[INVSLOT_CHEST] = true, --for all
|
||||
[INVSLOT_FINGER1] = true, --for all
|
||||
[INVSLOT_FINGER2] = true, --for all
|
||||
[INVSLOT_MAINHAND] = true, --for all
|
||||
|
||||
[INVSLOT_FEET] = 2, --agility only
|
||||
[INVSLOT_WRIST] = 1, --intellect only
|
||||
[INVSLOT_HAND] = 3, --strenth only
|
||||
}
|
||||
|
||||
-- how to get the enchantId:
|
||||
-- local itemLink = GetInventoryItemLink("player", slotId)
|
||||
-- local enchandId = select (3, strsplit(":", itemLink))
|
||||
-- print("enchantId:", enchandId)
|
||||
LIB_OPEN_RAID_ENCHANT_IDS = {
|
||||
--FEET
|
||||
--[6207] = INVSLOT_FEET, --[Enchant Boots - Speed of Soul]
|
||||
[6211] = INVSLOT_FEET, --[Enchant Boots - Eternal Agility] + 15 agi
|
||||
[6212] = INVSLOT_FEET, --[Enchant Boots - Agile Soulwalker] + 10 agi
|
||||
|
||||
--WRIST
|
||||
--[6222] = INVSLOT_WRIST, [Enchant Bracers - Shaded Hearthing]
|
||||
[6219] = INVSLOT_WRIST, --[Enchant Bracers - Illuminated Soul] + 10 int
|
||||
[6220] = INVSLOT_WRIST, --[Enchant Bracers - Eternal Intellect] + 15 int
|
||||
|
||||
--HAND
|
||||
--[6205] = INVSLOT_HAND, --[Enchant Gloves - Shadowlands Gathering]
|
||||
[6209] = INVSLOT_HAND, --[Enchant Gloves - Strength of Soul] +10 str
|
||||
[6210] = INVSLOT_HAND, --[Enchant Gloves - Eternal Strength] +15 str
|
||||
|
||||
--FINGER
|
||||
[6164] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Critical Strike] +16
|
||||
[6166] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Haste] +16
|
||||
[6168] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Mastery] +16
|
||||
[6170] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Versatility] +16
|
||||
|
||||
--BACK
|
||||
[6202] = INVSLOT_BACK, --[Enchant Cloak - Fortified Speed] +20 stam +30 speed
|
||||
[6203] = INVSLOT_BACK, --[Enchant Cloak - Fortified Avoidance] +20 stam +30 avoidance
|
||||
[6204] = INVSLOT_BACK, --[Enchant Cloak - Fortified Leech]
|
||||
[6208] = INVSLOT_BACK, --[Enchant Cloak - Soul Vitality]
|
||||
|
||||
--CHEST
|
||||
[6213] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bulwark] +25 armor +20 agi or str
|
||||
[6214] = INVSLOT_CHEST, --[Enchant Chest - Eternal Skirmish] +20 agi or str +more white damage
|
||||
[6217] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bounds] +20 int + 6% mana
|
||||
[6216] = INVSLOT_CHEST, --[Enchant Chest - Sacred Stats] +20 all stats
|
||||
[6230] = INVSLOT_CHEST, --[Enchant Chest - Eternal Stats] +30 all stats
|
||||
|
||||
--MAINHAND
|
||||
[6223] = INVSLOT_MAINHAND, --[Enchant Weapon - Lightless Force] + shadow wave damage
|
||||
[6226] = INVSLOT_MAINHAND, --[Enchant Weapon - Eternal Grace] + burst of healing done
|
||||
[6227] = INVSLOT_MAINHAND, --[Enchant Weapon - Ascended Vigor] + healing received increased
|
||||
[6228] = INVSLOT_MAINHAND, --[Enchant Weapon - Sinful Revelation] + 6% bleed damage
|
||||
[6229] = INVSLOT_MAINHAND, --[Enchant Weapon - Celestial Guidance] + 5% agility
|
||||
[6243] = INVSLOT_MAINHAND, --[Runeforging: Rune of Hysteria]
|
||||
[3370] = INVSLOT_MAINHAND, --[Runeforging: Rune of Razorice]
|
||||
[6241] = INVSLOT_MAINHAND, --[Runeforging: Rune of Sanguination]
|
||||
[6242] = INVSLOT_MAINHAND, --[Runeforging: Rune of Spellwarding]
|
||||
[6245] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Apocalypse]
|
||||
[3368] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Fallen Crusader]
|
||||
[3847] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Stoneskin Gargoyle]
|
||||
[6244] = INVSLOT_MAINHAND, --[Runeforging: Rune of Unending Thirst]
|
||||
}
|
||||
|
||||
-- how to get the gemId:
|
||||
-- local itemLink = GetInventoryItemLink("player", slotId)
|
||||
-- local gemId = select (4, strsplit(":", itemLink))
|
||||
-- print("gemId:", gemId)
|
||||
LIB_OPEN_RAID_GEM_IDS = {
|
||||
[173126] = true, --Straddling Jewel Doublet (green, +12 speed)
|
||||
[173125] = true, --Revitalizing Jewel Doublet (green, +100 health)
|
||||
[173130] = true, --Masterful Jewel Cluster (blue, master)
|
||||
[173129] = true, --Versatile Jewel Cluster (blue, versatility)
|
||||
[173127] = true, --Deadly Jewel Cluster (blue, crit)
|
||||
[173128] = true, --Quick Jewel Cluster (blue, haste)
|
||||
[168636] = true, --Leviathan's Eye of Strength (purple, strength)
|
||||
[168638] = true, --Leviathan's Eye of Intellect (purple, intellect)
|
||||
[169220] = true, --Straddling Sage Agate (blue, movement speed)
|
||||
}
|
||||
|
||||
--/dump GetWeaponEnchantInfo()
|
||||
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {
|
||||
[6188] = true, --shadowcore oil
|
||||
[6190] = true, --embalmer's oil
|
||||
[6201] = true, --weighted
|
||||
[6200] = true, --sharpened
|
||||
[5400] = true, --flametongue
|
||||
[5401] = true, --windfury
|
||||
}
|
||||
end
|
||||
|
||||
LIB_OPEN_RAID_MELEE_SPECS = {
|
||||
[251] = "DEATHKNIGHT",
|
||||
[252] = "DEATHKNIGHT",
|
||||
[577] = "DEMONHUNTER",
|
||||
[103] = "DRUID",
|
||||
--[255] = "Survival", --not in the list due to the long interrupt time
|
||||
[269] = "MONK",
|
||||
[70] = "PALADIN",
|
||||
[259] = "ROGUE",
|
||||
[260] = "ROGUE",
|
||||
[261] = "ROGUE",
|
||||
[263] = "SHAMAN",
|
||||
[71] = "WARRIOR",
|
||||
[72] = "WARRIOR",
|
||||
}
|
||||
|
||||
--tells the duration, requirements and cooldown
|
||||
@@ -226,7 +377,6 @@ LIB_OPEN_RAID_COOLDOWNS_INFO = {
|
||||
-- 5 personal utility cooldown
|
||||
-- 6 interrupt
|
||||
|
||||
|
||||
--interrupts
|
||||
[6552] = {class = "WARRIOR", specs = {71, 72, 73}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Pummel
|
||||
[2139] = {class = "MAGE", specs = {62, 63, 64}, cooldown = 24, silence = 6, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Counterspell
|
||||
@@ -577,6 +727,7 @@ else
|
||||
end
|
||||
|
||||
--interrupt list using proxy from cooldown list
|
||||
--this list should be expansion and combatlog safe
|
||||
LIB_OPEN_RAID_SPELL_INTERRUPT = {
|
||||
[6552] = LIB_OPEN_RAID_COOLDOWNS_INFO[6552], --Pummel
|
||||
|
||||
@@ -606,6 +757,7 @@ LIB_OPEN_RAID_SPELL_INTERRUPT = {
|
||||
[89766] = LIB_OPEN_RAID_COOLDOWNS_INFO[89766], --Axe Toss (pet felguard ability)
|
||||
}
|
||||
|
||||
--override list of spells with more than one effect, example: multiple types of polymorph
|
||||
LIB_OPEN_RAID_SPELL_DEFAULT_IDS = {
|
||||
--stampeding roar (druid)
|
||||
[106898] = 77761,
|
||||
@@ -634,7 +786,5 @@ LIB_OPEN_RAID_SPELL_DEFAULT_IDS = {
|
||||
[191427] = 200166,
|
||||
--187827 vengeance need to test these spellIds
|
||||
--191427 havoc
|
||||
|
||||
}
|
||||
|
||||
--need to add mass dispell (32375)
|
||||
|
||||
+9
-2
@@ -490,14 +490,21 @@
|
||||
local bigdog = _detalhes.gump:NewImage (menuBackground, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180*0.7, 200*0.7, "overlay", {0, 1, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog")
|
||||
bigdog:SetPoint ("bottomleft", custom_window, "bottomleft", 0, 1)
|
||||
bigdog:SetAlpha (0.3)
|
||||
|
||||
|
||||
local dogGradient = menuBackground:CreateTexture(nil, "artwork")
|
||||
dogGradient:SetPoint("bottomleft", menuBackground, "bottomleft", 0, 0)
|
||||
dogGradient:SetPoint("bottomright", menuBackground, "bottomright", 0, 0)
|
||||
dogGradient:SetColorTexture(1, 1, 1, 1)
|
||||
dogGradient:SetGradient("vertical", {["r"] = 0, ["g"] = 0, ["b"] = 0, ["a"] = 1}, {["r"] = 0, ["g"] = 0, ["b"] = 0, ["a"] = 0})
|
||||
dogGradient:SetHeight(95)
|
||||
|
||||
local bigdogRow = menuBackground:CreateTexture (nil, "artwork")
|
||||
bigdogRow:SetPoint ("bottomleft", menuBackground, "bottomleft", 1, 1)
|
||||
bigdogRow:SetPoint ("bottomright", menuBackground, "bottomright", -1, 1)
|
||||
bigdogRow:SetHeight (20)
|
||||
bigdogRow:SetColorTexture (.5, .5, .5, .1)
|
||||
bigdogRow:Hide()
|
||||
|
||||
|
||||
--
|
||||
--> plugins menu title bar
|
||||
local titlebar_plugins = CreateFrame ("frame", nil, menuBackground,"BackdropTemplate")
|
||||
|
||||
@@ -2126,7 +2126,7 @@ local icon_frame_on_enter = function (self)
|
||||
elseif (actor.dead_at) then
|
||||
|
||||
|
||||
elseif (actor.name) then --ensure it's an actor table
|
||||
elseif (actor.nome) then --ensure it's an actor table
|
||||
|
||||
local serial = actor.serial
|
||||
local name = actor:name()
|
||||
|
||||
Reference in New Issue
Block a user