Updated LibOpenRaid and DetailsFramework
This commit is contained in:
+46
-46
@@ -28,19 +28,19 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
local f = DetailsPlaterIntegrationPanel or DF:CreateSimplePanel (UIParent, 700, 480, "Details! Plater Nameplates Integration", "DetailsPlaterIntegrationPanel")
|
||||
|
||||
--background
|
||||
f.bg1 = f:CreateTexture (nil, "background")
|
||||
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1 = f:CreateTexture(nil, "background")
|
||||
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1:SetAlpha (0.8)
|
||||
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.bg1:SetVertTile (true)
|
||||
f.bg1:SetHorizTile (true)
|
||||
f.bg1:SetSize (790, 454)
|
||||
f.bg1:SetSize(790, 454)
|
||||
f.bg1:SetAllPoints()
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--> anchor text function
|
||||
--anchor text function
|
||||
local anchor_names = {"Top Left", "Left", "Bottom Left", "Bottom", "Bottom Right", "Right", "Top Right", "Top", "Center", "Inner Left", "Inner Right", "Inner Top", "Inner Bottom"}
|
||||
local build_anchor_side_table = function(member)
|
||||
local t = {}
|
||||
@@ -63,7 +63,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
|
||||
{type = "label", get = function() return "Add Real Time DPS Info in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
|
||||
--> real time dps from all sources
|
||||
--real time dps from all sources
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.realtime_dps_enabled end,
|
||||
@@ -73,7 +73,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
Details:RefreshPlaterIntegration()
|
||||
|
||||
if (not value) then
|
||||
Details:Msg ("a /reload might be needed to disable this setting.")
|
||||
Details:Msg("a /reload might be needed to disable this setting.")
|
||||
else
|
||||
if (Plater) then
|
||||
Plater.RefreshDBUpvalues()
|
||||
@@ -83,7 +83,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Show Real Time Dps",
|
||||
desc = "Show Real Time DPS on the nameplate.\n\nReal time DPS is how much damage has been inflicted to the unit in the last 5 seconds.",
|
||||
},
|
||||
--> text size
|
||||
--text size
|
||||
{
|
||||
type = "range",
|
||||
get = function() return Details.plater.realtime_dps_size end,
|
||||
@@ -99,7 +99,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Size",
|
||||
desc = "Text Size",
|
||||
},
|
||||
--> text color
|
||||
--text color
|
||||
{
|
||||
type = "color",
|
||||
get = function()
|
||||
@@ -117,7 +117,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Color",
|
||||
text_template = options_text_template,
|
||||
},
|
||||
--> text shadow
|
||||
--text shadow
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.realtime_dps_shadow end,
|
||||
@@ -130,7 +130,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Shadow",
|
||||
desc = "Text Shadow",
|
||||
},
|
||||
--> text anchor
|
||||
--text anchor
|
||||
--anchor location
|
||||
{
|
||||
type = "select",
|
||||
@@ -175,7 +175,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
{type = "breakline"},
|
||||
{type = "label", get = function() return "Add Real Time DPS Info Only From You in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
|
||||
--> real time dps from the player only
|
||||
--real time dps from the player only
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.realtime_dps_player_enabled end,
|
||||
@@ -185,7 +185,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
Details:RefreshPlaterIntegration()
|
||||
|
||||
if (not value) then
|
||||
Details:Msg ("a /reload might be needed to disable this setting.")
|
||||
Details:Msg("a /reload might be needed to disable this setting.")
|
||||
else
|
||||
if (Plater) then
|
||||
Plater.RefreshDBUpvalues()
|
||||
@@ -195,7 +195,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Show Real Time Dps (From You)",
|
||||
desc = "Show Real Time DPS you are currently applying in the unit.\n\nReal time DPS is how much damage has been inflicted to the unit in the last 5 seconds.",
|
||||
},
|
||||
--> text size
|
||||
--text size
|
||||
{
|
||||
type = "range",
|
||||
get = function() return Details.plater.realtime_dps_player_size end,
|
||||
@@ -211,7 +211,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Size",
|
||||
desc = "Text Size",
|
||||
},
|
||||
--> text color
|
||||
--text color
|
||||
{
|
||||
type = "color",
|
||||
get = function()
|
||||
@@ -229,7 +229,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Color",
|
||||
text_template = options_text_template,
|
||||
},
|
||||
--> text shadow
|
||||
--text shadow
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.realtime_dps_player_shadow end,
|
||||
@@ -242,7 +242,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Shadow",
|
||||
desc = "Text Shadow",
|
||||
},
|
||||
--> text anchor
|
||||
--text anchor
|
||||
--anchor location
|
||||
{
|
||||
type = "select",
|
||||
@@ -287,7 +287,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
{type = "breakline"},
|
||||
{type = "label", get = function() return "Add Total Damage Taken in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
|
||||
--> total damage taken from all sources
|
||||
--total damage taken from all sources
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.damage_taken_enabled end,
|
||||
@@ -297,7 +297,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
Details:RefreshPlaterIntegration()
|
||||
|
||||
if (not value) then
|
||||
Details:Msg ("a /reload might be needed to disable this setting.")
|
||||
Details:Msg("a /reload might be needed to disable this setting.")
|
||||
else
|
||||
if (Plater) then
|
||||
Plater.RefreshDBUpvalues()
|
||||
@@ -307,7 +307,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Show Total Damage Taken",
|
||||
desc = "Show the total damage taken by the unit",
|
||||
},
|
||||
--> text size
|
||||
--text size
|
||||
{
|
||||
type = "range",
|
||||
get = function() return Details.plater.damage_taken_size end,
|
||||
@@ -323,7 +323,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Size",
|
||||
desc = "Text Size",
|
||||
},
|
||||
--> text color
|
||||
--text color
|
||||
{
|
||||
type = "color",
|
||||
get = function()
|
||||
@@ -341,7 +341,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Color",
|
||||
text_template = options_text_template,
|
||||
},
|
||||
--> text shadow
|
||||
--text shadow
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.damage_taken_shadow end,
|
||||
@@ -354,7 +354,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Shadow",
|
||||
desc = "Text Shadow",
|
||||
},
|
||||
--> text anchor
|
||||
--text anchor
|
||||
--anchor location
|
||||
{
|
||||
type = "select",
|
||||
@@ -403,46 +403,46 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
local titleBackground = CreateFrame ("frame", nil, f,"BackdropTemplate")
|
||||
titleBackground:SetPoint ("topleft", f, "topleft", 10, -30)
|
||||
titleBackground:SetPoint ("topright", f, "topright", -10, -30)
|
||||
titleBackground:SetHeight (80)
|
||||
local titleBackground = CreateFrame("frame", nil, f,"BackdropTemplate")
|
||||
titleBackground:SetPoint("topleft", f, "topleft", 10, -30)
|
||||
titleBackground:SetPoint("topright", f, "topright", -10, -30)
|
||||
titleBackground:SetHeight(80)
|
||||
|
||||
--background
|
||||
titleBackground.bg1 = titleBackground:CreateTexture (nil, "background")
|
||||
titleBackground.bg1:SetTexture ([[Interface\AddOns\Details\images\background]])
|
||||
titleBackground.bg1 = titleBackground:CreateTexture(nil, "background")
|
||||
titleBackground.bg1:SetTexture([[Interface\AddOns\Details\images\background]])
|
||||
titleBackground.bg1:SetAlpha (0.8)
|
||||
titleBackground.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
titleBackground.bg1:SetVertTile (true)
|
||||
titleBackground.bg1:SetHorizTile (true)
|
||||
titleBackground.bg1:SetSize (790, 454)
|
||||
titleBackground.bg1:SetSize(790, 454)
|
||||
titleBackground.bg1:SetAllPoints()
|
||||
titleBackground:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titleBackground:SetBackdropColor (.5, .5, .5, .7)
|
||||
titleBackground:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
titleBackground:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titleBackground:SetBackdropColor(.5, .5, .5, .7)
|
||||
titleBackground:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
local platerTitle = DF:CreateLabel (titleBackground, "Plater Nameplates Integration", 16, "white")
|
||||
local platerDesc1 = DF:CreateLabel (titleBackground, "Add DPS and Damage information directly into the nameplate", 11, "silver")
|
||||
local platerDesc2 = DF:CreateLabel (titleBackground, "See how much damage the enemy is taking in real time!", 11, "silver")
|
||||
local platerTitle = DF:CreateLabel(titleBackground, "Plater Nameplates Integration", 16, "white")
|
||||
local platerDesc1 = DF:CreateLabel(titleBackground, "Add DPS and Damage information directly into the nameplate", 11, "silver")
|
||||
local platerDesc2 = DF:CreateLabel(titleBackground, "See how much damage the enemy is taking in real time!", 11, "silver")
|
||||
local platerImage = DF:CreateImage (titleBackground, "Interface\\AddOns\\Details\\images\\plater_image")
|
||||
platerImage:SetSize (256, 64)
|
||||
platerImage:SetSize(256, 64)
|
||||
|
||||
platerImage:SetPoint ("topright", f, "topright", -150, -35)
|
||||
platerTitle:SetPoint (10, -15)
|
||||
platerDesc1:SetPoint (10, -35)
|
||||
platerDesc2:SetPoint (10, -47)
|
||||
platerImage:SetPoint("topright", f, "topright", -150, -35)
|
||||
platerTitle:SetPoint(10, -15)
|
||||
platerDesc1:SetPoint(10, -35)
|
||||
platerDesc2:SetPoint(10, -47)
|
||||
|
||||
DF:BuildMenu (f, menu_table, 10, -140, 460, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
|
||||
|
||||
if (not Plater) then
|
||||
for _, widget in ipairs (f.widget_list) do
|
||||
for _, widget in ipairs(f.widget_list) do
|
||||
if (widget.Disable) then
|
||||
widget:Disable()
|
||||
end
|
||||
end
|
||||
|
||||
local PlaterDisabled1 = DF:CreateLabel (f, "Plater isn't installed! you may download it from the Curseforge app.", 16, "red")
|
||||
PlaterDisabled1:SetPoint (10, -330)
|
||||
local PlaterDisabled1 = DF:CreateLabel(f, "Plater isn't installed! you may download it from the Curseforge app.", 16, "red")
|
||||
PlaterDisabled1:SetPoint(10, -330)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user