- Added support for skins for Player Detail Window.
This commit is contained in:
@@ -506,6 +506,9 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
--> update tooltip settings
|
--> update tooltip settings
|
||||||
_detalhes:SetTooltipBackdrop()
|
_detalhes:SetTooltipBackdrop()
|
||||||
|
|
||||||
|
--> update player detail window
|
||||||
|
_detalhes:ApplyPDWSkin()
|
||||||
|
|
||||||
if (_detalhes.initializing) then
|
if (_detalhes.initializing) then
|
||||||
_detalhes.profile_loaded = true
|
_detalhes.profile_loaded = true
|
||||||
end
|
end
|
||||||
@@ -847,6 +850,13 @@ local default_profile = {
|
|||||||
disable_stretch_button = false,
|
disable_stretch_button = false,
|
||||||
damage_taken_everything = false,
|
damage_taken_everything = false,
|
||||||
|
|
||||||
|
--> info window
|
||||||
|
player_details_window = {
|
||||||
|
skin = "WoWClassic",
|
||||||
|
bar_texture = "Skyline",
|
||||||
|
scale = 1,
|
||||||
|
},
|
||||||
|
|
||||||
--> segments
|
--> segments
|
||||||
segments_amount = 12,
|
segments_amount = 12,
|
||||||
segments_amount_to_save = 5,
|
segments_amount_to_save = 5,
|
||||||
|
|||||||
+210
-35
@@ -232,7 +232,6 @@ function gump:TrocaBackgroundInfo()
|
|||||||
|
|
||||||
if (info.sub_atributo == 1 or info.sub_atributo == 2) then --> damage done / dps
|
if (info.sub_atributo == 1 or info.sub_atributo == 2) then --> damage done / dps
|
||||||
if (info.tipo ~= 1) then --> janela com as divisorias
|
if (info.tipo ~= 1) then --> janela com as divisorias
|
||||||
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
|
|
||||||
info.bg1_sec_texture:SetTexture (nil)
|
info.bg1_sec_texture:SetTexture (nil)
|
||||||
info.tipo = 1
|
info.tipo = 1
|
||||||
end
|
end
|
||||||
@@ -246,7 +245,6 @@ function gump:TrocaBackgroundInfo()
|
|||||||
|
|
||||||
elseif (info.sub_atributo == 3) then --> damage taken
|
elseif (info.sub_atributo == 3) then --> damage taken
|
||||||
if (info.tipo ~= 2) then --> janela com fundo diferente
|
if (info.tipo ~= 2) then --> janela com fundo diferente
|
||||||
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
|
|
||||||
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
|
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
|
||||||
info.bg3_sec_texture:Show()
|
info.bg3_sec_texture:Show()
|
||||||
info.bg2_sec_texture:Show()
|
info.bg2_sec_texture:Show()
|
||||||
@@ -259,7 +257,6 @@ function gump:TrocaBackgroundInfo()
|
|||||||
|
|
||||||
elseif (info.sub_atributo == 4) then --> friendly fire
|
elseif (info.sub_atributo == 4) then --> friendly fire
|
||||||
if (info.tipo ~= 3) then --> janela com fundo diferente
|
if (info.tipo ~= 3) then --> janela com fundo diferente
|
||||||
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
|
|
||||||
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
|
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
|
||||||
info.bg3_sec_texture:Show()
|
info.bg3_sec_texture:Show()
|
||||||
info.bg2_sec_texture:Show()
|
info.bg2_sec_texture:Show()
|
||||||
@@ -269,7 +266,6 @@ function gump:TrocaBackgroundInfo()
|
|||||||
|
|
||||||
elseif (info.sub_atributo == 6) then --> enemies
|
elseif (info.sub_atributo == 6) then --> enemies
|
||||||
if (info.tipo ~= 3) then --> janela com fundo diferente
|
if (info.tipo ~= 3) then --> janela com fundo diferente
|
||||||
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
|
|
||||||
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
|
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
|
||||||
info.bg3_sec_texture:Show()
|
info.bg3_sec_texture:Show()
|
||||||
info.bg2_sec_texture:Show()
|
info.bg2_sec_texture:Show()
|
||||||
@@ -281,7 +277,6 @@ function gump:TrocaBackgroundInfo()
|
|||||||
elseif (info.atributo == 2) then --> HEALING
|
elseif (info.atributo == 2) then --> HEALING
|
||||||
if (info.sub_atributo == 1 or info.sub_atributo == 2 or info.sub_atributo == 3) then --> damage done / dps
|
if (info.sub_atributo == 1 or info.sub_atributo == 2 or info.sub_atributo == 3) then --> damage done / dps
|
||||||
if (info.tipo ~= 1) then --> janela com as divisorias
|
if (info.tipo ~= 1) then --> janela com as divisorias
|
||||||
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
|
|
||||||
info.bg1_sec_texture:SetTexture (nil)
|
info.bg1_sec_texture:SetTexture (nil)
|
||||||
info.tipo = 1
|
info.tipo = 1
|
||||||
end
|
end
|
||||||
@@ -299,7 +294,6 @@ function gump:TrocaBackgroundInfo()
|
|||||||
|
|
||||||
elseif (info.sub_atributo == 4) then --> Healing taken
|
elseif (info.sub_atributo == 4) then --> Healing taken
|
||||||
if (info.tipo ~= 2) then --> janela com fundo diferente
|
if (info.tipo ~= 2) then --> janela com fundo diferente
|
||||||
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
|
|
||||||
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
|
info.bg1_sec_texture:SetTexture ([[Interface\AddOns\Details\images\info_window_damagetaken]])
|
||||||
info.bg3_sec_texture:Show()
|
info.bg3_sec_texture:Show()
|
||||||
info.bg2_sec_texture:Show()
|
info.bg2_sec_texture:Show()
|
||||||
@@ -313,7 +307,6 @@ function gump:TrocaBackgroundInfo()
|
|||||||
|
|
||||||
elseif (info.atributo == 3) then --> REGEN
|
elseif (info.atributo == 3) then --> REGEN
|
||||||
if (info.tipo ~= 2) then --> janela com fundo diferente
|
if (info.tipo ~= 2) then --> janela com fundo diferente
|
||||||
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
|
|
||||||
info.bg1_sec_texture:SetTexture (nil)
|
info.bg1_sec_texture:SetTexture (nil)
|
||||||
info.tipo = 2
|
info.tipo = 2
|
||||||
end
|
end
|
||||||
@@ -321,7 +314,6 @@ function gump:TrocaBackgroundInfo()
|
|||||||
|
|
||||||
elseif (info.atributo == 4) then --> MISC
|
elseif (info.atributo == 4) then --> MISC
|
||||||
if (info.tipo ~= 2) then --> janela com fundo diferente
|
if (info.tipo ~= 2) then --> janela com fundo diferente
|
||||||
info.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
|
|
||||||
info.bg1_sec_texture:SetTexture (nil)
|
info.bg1_sec_texture:SetTexture (nil)
|
||||||
info.tipo = 2
|
info.tipo = 2
|
||||||
end
|
end
|
||||||
@@ -423,7 +415,7 @@ local function seta_scripts (este_gump)
|
|||||||
este_gump.container_alvos.gump:SetScript ("OnMouseUp", mouse_up_func)
|
este_gump.container_alvos.gump:SetScript ("OnMouseUp", mouse_up_func)
|
||||||
|
|
||||||
--> botão fechar
|
--> botão fechar
|
||||||
este_gump.fechar:SetScript ("OnClick", function (self)
|
este_gump.close_button:SetScript ("OnClick", function (self)
|
||||||
_detalhes:FechaJanelaInfo()
|
_detalhes:FechaJanelaInfo()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@@ -766,14 +758,190 @@ local function cria_container_alvos (este_gump)
|
|||||||
este_gump.container_alvos = container_alvos_window
|
este_gump.container_alvos = container_alvos_window
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function _detalhes:InstallPDWSkin (skin_name, func)
|
||||||
|
if (not skin_name) then
|
||||||
|
return false -- sem nome
|
||||||
|
elseif (_detalhes.playerdetailwindow_skins [skin_name]) then
|
||||||
|
return false -- ja existe
|
||||||
|
end
|
||||||
|
|
||||||
|
_detalhes.playerdetailwindow_skins [skin_name] = func
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function _detalhes:ApplyPDWSkin (skin_name)
|
||||||
|
|
||||||
|
--already built
|
||||||
|
if (not DetailsPlayerDetailsWindow.Loaded) then
|
||||||
|
if (skin_name) then
|
||||||
|
_detalhes.player_details_window.skin = skin_name
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
--hide extra frames
|
||||||
|
local window = DetailsPlayerDetailsWindow
|
||||||
|
if (window.extra_frames) then
|
||||||
|
for framename, frame in pairs (window.extra_frames) do
|
||||||
|
frame:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--apply default first
|
||||||
|
local default_skin = _detalhes.playerdetailwindow_skins ["WoWClassic"]
|
||||||
|
pcall (default_skin.func)
|
||||||
|
|
||||||
|
--than do the change
|
||||||
|
if (not skin_name) then
|
||||||
|
skin_name = _detalhes.player_details_window.skin
|
||||||
|
end
|
||||||
|
|
||||||
|
local skin = _detalhes.playerdetailwindow_skins [skin_name]
|
||||||
|
if (skin) then
|
||||||
|
local successful, errortext = pcall (skin.func)
|
||||||
|
if (not successful) then
|
||||||
|
_detalhes:Msg ("error occurred on skin call():", errortext)
|
||||||
|
local former_skin = _detalhes.playerdetailwindow_skins [_detalhes.player_details_window.skin]
|
||||||
|
pcall (former_skin.func)
|
||||||
|
else
|
||||||
|
_detalhes.player_details_window.skin = skin_name
|
||||||
|
end
|
||||||
|
else
|
||||||
|
_detalhes:Msg ("skin not found.")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _detalhes:SetPlayerDetailsWindowTexture (texture)
|
||||||
|
DetailsPlayerDetailsWindow.bg1:SetTexture (texture)
|
||||||
|
end
|
||||||
|
|
||||||
|
function _detalhes:SetPDWBarConfig (texture)
|
||||||
|
local window = DetailsPlayerDetailsWindow
|
||||||
|
|
||||||
|
if (texture) then
|
||||||
|
_detalhes.player_details_window.bar_texture = texture
|
||||||
|
local texture = SharedMedia:Fetch ("statusbar", texture)
|
||||||
|
|
||||||
|
for _, bar in ipairs (window.barras1) do
|
||||||
|
bar.textura:SetStatusBarTexture (texture)
|
||||||
|
end
|
||||||
|
for _, bar in ipairs (window.barras2) do
|
||||||
|
bar.textura:SetStatusBarTexture (texture)
|
||||||
|
end
|
||||||
|
for _, bar in ipairs (window.barras3) do
|
||||||
|
bar.textura:SetStatusBarTexture (texture)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local default_skin = function()
|
||||||
|
local window = DetailsPlayerDetailsWindow
|
||||||
|
window.bg1:SetTexture ([[Interface\AddOns\Details\images\info_window_background]])
|
||||||
|
window.bg1:SetSize (1024, 512)
|
||||||
|
window.bg1:SetAlpha (1)
|
||||||
|
window.bg1:SetVertexColor (1, 1, 1)
|
||||||
|
window:SetBackdrop (nil)
|
||||||
|
window:SetBackdropColor (1, 1, 1, 1)
|
||||||
|
window:SetBackdropBorderColor (1, 1, 1, 1)
|
||||||
|
window.classe_icone:SetDrawLayer ("background")
|
||||||
|
window.bg_icone_bg:Show()
|
||||||
|
window.bg_icone:Show()
|
||||||
|
|
||||||
|
window.leftbars1_backgound:SetAlpha (1)
|
||||||
|
window.leftbars2_backgound:SetAlpha (1)
|
||||||
|
window.right_background1:SetAlpha (1)
|
||||||
|
window.right_background2:SetAlpha (1)
|
||||||
|
window.right_background3:SetAlpha (1)
|
||||||
|
window.right_background4:SetAlpha (1)
|
||||||
|
window.right_background5:SetAlpha (1)
|
||||||
|
|
||||||
|
window.close_button:GetNormalTexture():SetDesaturated (false)
|
||||||
|
|
||||||
|
window.title_string:ClearAllPoints()
|
||||||
|
window.title_string:SetPoint ("center", window, "center")
|
||||||
|
window.title_string:SetPoint ("top", window, "top", 0, -18)
|
||||||
|
window.title_string:SetParent (window)
|
||||||
|
|
||||||
|
window.classe_icone:SetParent (window)
|
||||||
|
|
||||||
|
window.close_button:SetWidth (32)
|
||||||
|
window.close_button:SetHeight (32)
|
||||||
|
window.close_button:SetPoint ("TOPRIGHT", window, "TOPRIGHT", 5, -8)
|
||||||
|
|
||||||
|
window.avatar:SetParent (window)
|
||||||
|
|
||||||
|
_detalhes:SetPDWBarConfig ("Skyline")
|
||||||
|
end
|
||||||
|
_detalhes:InstallPDWSkin ("WoWClassic", {func = default_skin, author = "Details! Team", version = "v1.0", desc = "Default skin."})
|
||||||
|
|
||||||
|
local elvui_skin = function()
|
||||||
|
local window = DetailsPlayerDetailsWindow
|
||||||
|
window.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
|
||||||
|
window.bg1:SetAlpha (0.7)
|
||||||
|
window.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||||
|
window.bg1:SetVertTile (true)
|
||||||
|
window.bg1:SetHorizTile (true)
|
||||||
|
window.bg1:SetSize (590, 354)
|
||||||
|
window.classe_icone:SetDrawLayer ("overlay")
|
||||||
|
window:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||||
|
window:SetBackdropColor (1, 1, 1, 1)
|
||||||
|
window:SetBackdropBorderColor (0, 0, 0, 1)
|
||||||
|
window.bg_icone_bg:Hide()
|
||||||
|
window.bg_icone:Hide()
|
||||||
|
|
||||||
|
local bgs_alpha = 0.6
|
||||||
|
window.leftbars1_backgound:SetAlpha (bgs_alpha)
|
||||||
|
window.leftbars2_backgound:SetAlpha (bgs_alpha)
|
||||||
|
|
||||||
|
window.right_background1:SetAlpha (bgs_alpha)
|
||||||
|
window.right_background2:SetAlpha (bgs_alpha)
|
||||||
|
window.right_background3:SetAlpha (bgs_alpha)
|
||||||
|
window.right_background4:SetAlpha (bgs_alpha)
|
||||||
|
window.right_background5:SetAlpha (bgs_alpha)
|
||||||
|
|
||||||
|
window.close_button:GetNormalTexture():SetDesaturated (true)
|
||||||
|
|
||||||
|
local titlebar = window.extra_frames ["ElvUITitleBar"]
|
||||||
|
if (not titlebar) then
|
||||||
|
titlebar = CreateFrame ("frame", nil, window)
|
||||||
|
titlebar:SetPoint ("topleft", window, "topleft", 2, -3)
|
||||||
|
titlebar:SetPoint ("topright", window, "topright", -2, -3)
|
||||||
|
titlebar:SetHeight (20)
|
||||||
|
titlebar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||||
|
titlebar:SetBackdropColor (.5, .5, .5, 1)
|
||||||
|
titlebar:SetBackdropBorderColor (0, 0, 0, 1)
|
||||||
|
window.extra_frames ["ElvUITitleBar"] = titlebar
|
||||||
|
else
|
||||||
|
titlebar:Show()
|
||||||
|
end
|
||||||
|
|
||||||
|
window.title_string:ClearAllPoints()
|
||||||
|
window.title_string:SetPoint ("center", window, "center")
|
||||||
|
window.title_string:SetPoint ("top", window, "top", 0, -8)
|
||||||
|
window.title_string:SetParent (titlebar)
|
||||||
|
|
||||||
|
window.classe_icone:SetParent (titlebar)
|
||||||
|
|
||||||
|
window.close_button:SetWidth (20)
|
||||||
|
window.close_button:SetHeight (20)
|
||||||
|
window.close_button:SetPoint ("TOPRIGHT", window, "TOPRIGHT", 0, -3)
|
||||||
|
|
||||||
|
window.avatar:SetParent (titlebar)
|
||||||
|
end
|
||||||
|
_detalhes:InstallPDWSkin ("ElvUI", {func = elvui_skin, author = "Details! Team", version = "v1.0", desc = "Skin compatible with ElvUI addon."})
|
||||||
|
|
||||||
--> search key: ~create ~inicio
|
--> search key: ~create ~inicio
|
||||||
function gump:CriaJanelaInfo()
|
function gump:CriaJanelaInfo()
|
||||||
|
|
||||||
--> cria a janela em si
|
--> cria a janela em si
|
||||||
local este_gump = info
|
local este_gump = info
|
||||||
|
este_gump.Loaded = true
|
||||||
|
|
||||||
este_gump:SetFrameStrata ("HIGH")
|
este_gump:SetFrameStrata ("HIGH")
|
||||||
este_gump:SetToplevel (true)
|
este_gump:SetToplevel (true)
|
||||||
|
|
||||||
|
este_gump.extra_frames = {}
|
||||||
|
|
||||||
--> fehcar com o esc
|
--> fehcar com o esc
|
||||||
tinsert (UISpecialFrames, este_gump:GetName())
|
tinsert (UISpecialFrames, este_gump:GetName())
|
||||||
|
|
||||||
@@ -789,8 +957,6 @@ function gump:CriaJanelaInfo()
|
|||||||
--> joga a janela para a global
|
--> joga a janela para a global
|
||||||
_detalhes.janela_info = este_gump
|
_detalhes.janela_info = este_gump
|
||||||
|
|
||||||
--> começa a montar as texturas <--
|
|
||||||
|
|
||||||
--> icone da classe no canto esquerdo superior
|
--> icone da classe no canto esquerdo superior
|
||||||
este_gump.classe_icone = este_gump:CreateTexture (nil, "BACKGROUND")
|
este_gump.classe_icone = este_gump:CreateTexture (nil, "BACKGROUND")
|
||||||
este_gump.classe_icone:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 4, 0)
|
este_gump.classe_icone:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 4, 0)
|
||||||
@@ -805,15 +971,10 @@ function gump:CriaJanelaInfo()
|
|||||||
este_gump.classe_iconePlus:SetDrawLayer ("BACKGROUND", 2)
|
este_gump.classe_iconePlus:SetDrawLayer ("BACKGROUND", 2)
|
||||||
|
|
||||||
--> top left
|
--> top left
|
||||||
este_gump.bg1 = este_gump:CreateTexture (nil, "BORDER")
|
este_gump.bg1 = este_gump:CreateTexture ("DetailsPSWBackground", "BORDER")
|
||||||
este_gump.bg1:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 0, 0)
|
este_gump.bg1:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 0, 0)
|
||||||
este_gump.bg1:SetDrawLayer ("BORDER", 1)
|
este_gump.bg1:SetDrawLayer ("BORDER", 1)
|
||||||
|
|
||||||
function _detalhes:SetPlayerDetailsWindowTexture (texture)
|
|
||||||
este_gump.bg1:SetTexture (texture)
|
|
||||||
end
|
|
||||||
_detalhes:SetPlayerDetailsWindowTexture ("Interface\\AddOns\\Details\\images\\info_window_background")
|
|
||||||
|
|
||||||
--
|
--
|
||||||
local alpha_bgs = 1
|
local alpha_bgs = 1
|
||||||
|
|
||||||
@@ -822,45 +983,50 @@ function gump:CriaJanelaInfo()
|
|||||||
leftbars1_backgound:SetPoint ("topleft", este_gump, "topleft", 19, -74)
|
leftbars1_backgound:SetPoint ("topleft", este_gump, "topleft", 19, -74)
|
||||||
leftbars1_backgound:SetSize (303, 149)
|
leftbars1_backgound:SetSize (303, 149)
|
||||||
leftbars1_backgound:SetAlpha (alpha_bgs)
|
leftbars1_backgound:SetAlpha (alpha_bgs)
|
||||||
|
este_gump.leftbars1_backgound = leftbars1_backgound
|
||||||
|
|
||||||
local leftbars2_backgound = este_gump:CreateTexture (nil, "background")
|
local leftbars2_backgound = este_gump:CreateTexture (nil, "background")
|
||||||
leftbars2_backgound:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
leftbars2_backgound:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
||||||
leftbars2_backgound:SetPoint ("topleft", este_gump, "topleft", 19, -226)
|
leftbars2_backgound:SetPoint ("topleft", este_gump, "topleft", 19, -226)
|
||||||
leftbars2_backgound:SetSize (303, 122)
|
leftbars2_backgound:SetSize (303, 122)
|
||||||
leftbars2_backgound:SetAlpha (alpha_bgs)
|
leftbars2_backgound:SetAlpha (alpha_bgs)
|
||||||
|
este_gump.leftbars2_backgound = leftbars2_backgound
|
||||||
--
|
--
|
||||||
local right_background1 = este_gump:CreateTexture (nil, "background")
|
local right_background1 = este_gump:CreateTexture (nil, "background")
|
||||||
right_background1:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
right_background1:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
||||||
right_background1:SetPoint ("topleft", este_gump, "topleft", 357, -85)
|
right_background1:SetPoint ("topleft", este_gump, "topleft", 357, -85)
|
||||||
right_background1:SetSize (220, 43)
|
right_background1:SetSize (220, 43)
|
||||||
right_background1:SetAlpha (alpha_bgs)
|
right_background1:SetAlpha (alpha_bgs)
|
||||||
|
este_gump.right_background1 = right_background1
|
||||||
|
|
||||||
local right_background2 = este_gump:CreateTexture (nil, "background")
|
local right_background2 = este_gump:CreateTexture (nil, "background")
|
||||||
right_background2:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
right_background2:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
||||||
right_background2:SetPoint ("topleft", este_gump, "topleft", 357, -135)
|
right_background2:SetPoint ("topleft", este_gump, "topleft", 357, -136)
|
||||||
right_background2:SetSize (220, 48)
|
right_background2:SetSize (220, 48)
|
||||||
right_background2:SetAlpha (alpha_bgs)
|
right_background2:SetAlpha (alpha_bgs)
|
||||||
|
este_gump.right_background2 = right_background2
|
||||||
|
|
||||||
local right_background3 = este_gump:CreateTexture (nil, "background")
|
local right_background3 = este_gump:CreateTexture (nil, "background")
|
||||||
right_background3:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
right_background3:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
||||||
right_background3:SetPoint ("topleft", este_gump, "topleft", 357, -191)
|
right_background3:SetPoint ("topleft", este_gump, "topleft", 357, -191)
|
||||||
right_background3:SetSize (220, 48)
|
right_background3:SetSize (220, 48)
|
||||||
right_background3:SetAlpha (alpha_bgs)
|
right_background3:SetAlpha (alpha_bgs)
|
||||||
|
este_gump.right_background3 = right_background3
|
||||||
|
|
||||||
local right_background4 = este_gump:CreateTexture (nil, "background")
|
local right_background4 = este_gump:CreateTexture (nil, "background")
|
||||||
right_background4:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
right_background4:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
||||||
right_background4:SetPoint ("topleft", este_gump, "topleft", 357, -246)
|
right_background4:SetPoint ("topleft", este_gump, "topleft", 357, -246)
|
||||||
right_background4:SetSize (220, 48)
|
right_background4:SetSize (220, 48)
|
||||||
right_background4:SetAlpha (alpha_bgs)
|
right_background4:SetAlpha (alpha_bgs)
|
||||||
|
este_gump.right_background4 = right_background4
|
||||||
|
|
||||||
local right_background5 = este_gump:CreateTexture (nil, "background")
|
local right_background5 = este_gump:CreateTexture (nil, "background")
|
||||||
right_background5:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
right_background5:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
|
||||||
right_background5:SetPoint ("topleft", este_gump, "topleft", 357, -301)
|
right_background5:SetPoint ("topleft", este_gump, "topleft", 357, -301)
|
||||||
right_background5:SetSize (220, 48)
|
right_background5:SetSize (220, 48)
|
||||||
right_background5:SetAlpha (alpha_bgs)
|
right_background5:SetAlpha (alpha_bgs)
|
||||||
|
este_gump.right_background5 = right_background5
|
||||||
--
|
--
|
||||||
|
|
||||||
este_gump.bg1_sec_texture = este_gump:CreateTexture (nil, "BORDER")
|
este_gump.bg1_sec_texture = este_gump:CreateTexture (nil, "BORDER")
|
||||||
este_gump.bg1_sec_texture:SetDrawLayer ("BORDER", 4)
|
este_gump.bg1_sec_texture:SetDrawLayer ("BORDER", 4)
|
||||||
este_gump.bg1_sec_texture:SetPoint ("topleft", este_gump.bg1, "topleft", 348, -86)
|
este_gump.bg1_sec_texture:SetPoint ("topleft", este_gump.bg1, "topleft", 348, -86)
|
||||||
@@ -884,12 +1050,12 @@ function gump:CriaJanelaInfo()
|
|||||||
este_gump.bg3_sec_texture:Hide()
|
este_gump.bg3_sec_texture:Hide()
|
||||||
|
|
||||||
--> botão de fechar
|
--> botão de fechar
|
||||||
este_gump.fechar = _CreateFrame ("Button", nil, este_gump, "UIPanelCloseButton")
|
este_gump.close_button = _CreateFrame ("Button", nil, este_gump, "UIPanelCloseButton")
|
||||||
este_gump.fechar:SetWidth (32)
|
este_gump.close_button:SetWidth (32)
|
||||||
este_gump.fechar:SetHeight (32)
|
este_gump.close_button:SetHeight (32)
|
||||||
este_gump.fechar:SetPoint ("TOPRIGHT", este_gump, "TOPRIGHT", 5, -8)
|
este_gump.close_button:SetPoint ("TOPRIGHT", este_gump, "TOPRIGHT", 5, -8)
|
||||||
este_gump.fechar:SetText ("X")
|
este_gump.close_button:SetText ("X")
|
||||||
este_gump.fechar:SetFrameLevel (este_gump:GetFrameLevel()+2)
|
este_gump.close_button:SetFrameLevel (este_gump:GetFrameLevel()+5)
|
||||||
|
|
||||||
este_gump.no_targets = este_gump:CreateTexture (nil, "overlay")
|
este_gump.no_targets = este_gump:CreateTexture (nil, "overlay")
|
||||||
este_gump.no_targets:SetPoint ("BOTTOMLEFT", este_gump, "BOTTOMLEFT", 20, 6)
|
este_gump.no_targets:SetPoint ("BOTTOMLEFT", este_gump, "BOTTOMLEFT", 20, 6)
|
||||||
@@ -905,9 +1071,9 @@ function gump:CriaJanelaInfo()
|
|||||||
este_gump.no_targets:Hide()
|
este_gump.no_targets:Hide()
|
||||||
|
|
||||||
--> titulo
|
--> titulo
|
||||||
gump:NewLabel (este_gump, este_gump, nil, "titulo", Loc ["STRING_PLAYER_DETAILS"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
gump:NewLabel (este_gump, este_gump, nil, "title_string", Loc ["STRING_PLAYER_DETAILS"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||||
este_gump.titulo:SetPoint ("center", este_gump, "center")
|
este_gump.title_string:SetPoint ("center", este_gump, "center")
|
||||||
este_gump.titulo:SetPoint ("top", este_gump, "top", 0, -18)
|
este_gump.title_string:SetPoint ("top", este_gump, "top", 0, -18)
|
||||||
|
|
||||||
--> cria os textos da janela
|
--> cria os textos da janela
|
||||||
cria_textos (este_gump)
|
cria_textos (este_gump)
|
||||||
@@ -970,6 +1136,8 @@ function gump:CriaJanelaInfo()
|
|||||||
este_gump.spell_icone:SetHeight (34)
|
este_gump.spell_icone:SetHeight (34)
|
||||||
este_gump.spell_icone:SetDrawLayer ("ARTWORK", 0)
|
este_gump.spell_icone:SetDrawLayer ("ARTWORK", 0)
|
||||||
este_gump.spell_icone:Show()
|
este_gump.spell_icone:Show()
|
||||||
|
este_gump.spell_icone:SetTexCoord (4/64, 60/64, 4/64, 60/64)
|
||||||
|
|
||||||
|
|
||||||
--> coisinhas do lado do icone
|
--> coisinhas do lado do icone
|
||||||
este_gump.apoio_icone_esquerdo = este_gump:CreateTexture (nil, "ARTWORK")
|
este_gump.apoio_icone_esquerdo = este_gump:CreateTexture (nil, "ARTWORK")
|
||||||
@@ -995,6 +1163,12 @@ function gump:CriaJanelaInfo()
|
|||||||
este_gump.report_direita:SetPoint ("TOPRIGHT", este_gump, "TOPRIGHT", -8, -57)
|
este_gump.report_direita:SetPoint ("TOPRIGHT", este_gump, "TOPRIGHT", -8, -57)
|
||||||
este_gump.report_direita:Hide()
|
este_gump.report_direita:Hide()
|
||||||
|
|
||||||
|
--> apply default skin
|
||||||
|
_detalhes:ApplyPDWSkin()
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
--> tabs
|
||||||
|
|
||||||
local red = "FFFFAAAA"
|
local red = "FFFFAAAA"
|
||||||
local green = "FFAAFFAA"
|
local green = "FFAAFFAA"
|
||||||
|
|
||||||
@@ -2437,7 +2611,7 @@ function gump:CriaJanelaInfo()
|
|||||||
else
|
else
|
||||||
local spellname = GetSpellInfo (spellid)
|
local spellname = GetSpellInfo (spellid)
|
||||||
local extra_search_found
|
local extra_search_found
|
||||||
for casted_spellid, amount in _pairs (player1_misc.spell_cast) do
|
for casted_spellid, amount in _pairs (player1_misc.spell_cast or {}) do
|
||||||
local casted_spellname = GetSpellInfo (casted_spellid)
|
local casted_spellname = GetSpellInfo (casted_spellid)
|
||||||
if (casted_spellname == spellname) then
|
if (casted_spellname == spellname) then
|
||||||
frame1.tooltip.casts_label2:SetText (amount)
|
frame1.tooltip.casts_label2:SetText (amount)
|
||||||
@@ -2552,7 +2726,7 @@ function gump:CriaJanelaInfo()
|
|||||||
local amt_casts = player2_misc.spell_cast and player2_misc.spell_cast [spellid]
|
local amt_casts = player2_misc.spell_cast and player2_misc.spell_cast [spellid]
|
||||||
if (not amt_casts) then
|
if (not amt_casts) then
|
||||||
local spellname = GetSpellInfo (spellid)
|
local spellname = GetSpellInfo (spellid)
|
||||||
for casted_spellid, amount in _pairs (player2_misc.spell_cast) do
|
for casted_spellid, amount in _pairs (player2_misc.spell_cast or {}) do
|
||||||
local casted_spellname = GetSpellInfo (casted_spellid)
|
local casted_spellname = GetSpellInfo (casted_spellid)
|
||||||
if (casted_spellname == spellname) then
|
if (casted_spellname == spellname) then
|
||||||
amt_casts = amount
|
amt_casts = amount
|
||||||
@@ -2688,7 +2862,7 @@ function gump:CriaJanelaInfo()
|
|||||||
local amt_casts = player3_misc.spell_cast and player3_misc.spell_cast [spellid]
|
local amt_casts = player3_misc.spell_cast and player3_misc.spell_cast [spellid]
|
||||||
if (not amt_casts) then
|
if (not amt_casts) then
|
||||||
local spellname = GetSpellInfo (spellid)
|
local spellname = GetSpellInfo (spellid)
|
||||||
for casted_spellid, amount in _pairs (player3_misc.spell_cast) do
|
for casted_spellid, amount in _pairs (player3_misc.spell_cast or {}) do
|
||||||
local casted_spellname = GetSpellInfo (casted_spellid)
|
local casted_spellname = GetSpellInfo (casted_spellid)
|
||||||
if (casted_spellname == spellname) then
|
if (casted_spellname == spellname) then
|
||||||
amt_casts = amount
|
amt_casts = amount
|
||||||
@@ -3740,9 +3914,10 @@ local function CriaTexturaBarra (instancia, barra)
|
|||||||
|
|
||||||
barra.textura:SetAllPoints (barra)
|
barra.textura:SetAllPoints (barra)
|
||||||
barra.textura:SetAlpha (0.5)
|
barra.textura:SetAlpha (0.5)
|
||||||
--barra.textura:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_serenity]])
|
|
||||||
barra.textura:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_skyline]])
|
local texture = SharedMedia:Fetch ("statusbar", _detalhes.player_details_window.bar_texture)
|
||||||
--barra.textura:SetStatusBarTexture (_detalhes.default_texture)
|
barra.textura:SetStatusBarTexture (texture)
|
||||||
|
|
||||||
barra.textura:SetStatusBarColor (.5, .5, .5, 0)
|
barra.textura:SetStatusBarColor (.5, .5, .5, 0)
|
||||||
barra.textura:SetMinMaxValues (0,100)
|
barra.textura:SetMinMaxValues (0,100)
|
||||||
|
|
||||||
|
|||||||
@@ -5239,6 +5239,35 @@ function window:CreateFrame3()
|
|||||||
|
|
||||||
window:CreateLineBackground2 (frame3, "ImportButton", "ImportButton", Loc ["STRING_OPTIONS_SAVELOAD_IMPORT_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
window:CreateLineBackground2 (frame3, "ImportButton", "ImportButton", Loc ["STRING_OPTIONS_SAVELOAD_IMPORT_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||||
|
|
||||||
|
--> player detail window
|
||||||
|
g:NewLabel (frame3, _, "$parentPDWAnchor", "PDWAnchor", Loc ["STRING_OPTIONS_PDW_ANCHOR"], "GameFontNormal")
|
||||||
|
|
||||||
|
--skin
|
||||||
|
local onSelectPDWSkin = function (_, instance, skin_name)
|
||||||
|
_detalhes:ApplyPDWSkin (skin_name)
|
||||||
|
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||||
|
end
|
||||||
|
|
||||||
|
local buildPDWSkinMenu = function()
|
||||||
|
local skinOptions = {}
|
||||||
|
for skin_name, skin_table in pairs (_detalhes.playerdetailwindow_skins) do
|
||||||
|
local desc = "Author: |cFFFFFFFF" .. skin_table.author .. "|r\nVersion: |cFFFFFFFF" .. skin_table.version .. "|r\n\nDesc: |cFFFFFFFF" .. skin_table.desc .. "|r"
|
||||||
|
skinOptions [#skinOptions+1] = {value = skin_name, label = skin_name, onclick = onSelectPDWSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", desc = desc}
|
||||||
|
end
|
||||||
|
return skinOptions
|
||||||
|
end
|
||||||
|
|
||||||
|
-- skin
|
||||||
|
local d = g:NewDropDown (frame3, _, "$parentPDWSkinDropdown", "PDWSkinDropdown", 160, dropdown_height, buildPDWSkinMenu, 1)
|
||||||
|
d.onenter_backdrop = dropdown_backdrop_onenter
|
||||||
|
d.onleave_backdrop = dropdown_backdrop_onleave
|
||||||
|
d:SetBackdrop (dropdown_backdrop)
|
||||||
|
d:SetBackdropColor (unpack (dropdown_backdrop_onleave)); d:SetBackdropBorderColor (unpack (dropdown_backdrop_border_color))
|
||||||
|
|
||||||
|
g:NewLabel (frame3, _, "$parentPDWSkinLabel", "PDWSkinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"], "GameFontHighlightLeft")
|
||||||
|
window:CreateLineBackground2 (frame3, "PDWSkinDropdown", "PDWSkinLabel", Loc ["STRING_OPTIONS_PDW_SKIN_DESC"])
|
||||||
|
frame3.PDWSkinDropdown:SetPoint ("left", frame3.PDWSkinLabel, "right", 2)
|
||||||
|
|
||||||
--> extra Options
|
--> extra Options
|
||||||
g:NewLabel (frame3, _, "$parentSkinExtraOptionsAnchor", "SkinExtraOptionsAnchor", Loc ["STRING_OPTIONS_SKIN_EXTRA_OPTIONS_ANCHOR"], "GameFontNormal")
|
g:NewLabel (frame3, _, "$parentSkinExtraOptionsAnchor", "SkinExtraOptionsAnchor", Loc ["STRING_OPTIONS_SKIN_EXTRA_OPTIONS_ANCHOR"], "GameFontNormal")
|
||||||
--frame3.SkinExtraOptionsAnchor:Hide()
|
--frame3.SkinExtraOptionsAnchor:Hide()
|
||||||
@@ -5271,7 +5300,10 @@ function window:CreateFrame3()
|
|||||||
{"ImportButton", 9, true},
|
{"ImportButton", 9, true},
|
||||||
{"makeDefault", 10},
|
{"makeDefault", 10},
|
||||||
{"applyToAll", 11},
|
{"applyToAll", 11},
|
||||||
--{"", 10},
|
|
||||||
|
{"PDWAnchor", 12, true},
|
||||||
|
{"PDWSkinLabel", 13},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window:arrange_menu (frame3, left_side, x, -90)
|
window:arrange_menu (frame3, left_side, x, -90)
|
||||||
@@ -10076,6 +10108,8 @@ end --> if not window
|
|||||||
_G.DetailsOptionsWindow3SkinDropdown.MyObject:SetFixedParameter (editing_instance)
|
_G.DetailsOptionsWindow3SkinDropdown.MyObject:SetFixedParameter (editing_instance)
|
||||||
_G.DetailsOptionsWindow3SkinDropdown.MyObject:Select (skin)
|
_G.DetailsOptionsWindow3SkinDropdown.MyObject:Select (skin)
|
||||||
|
|
||||||
|
_G.DetailsOptionsWindow3PDWSkinDropdown.MyObject:Select (_detalhes.player_details_window.skin)
|
||||||
|
|
||||||
local skin_object = editing_instance:GetSkin()
|
local skin_object = editing_instance:GetSkin()
|
||||||
local skin_name_formated = skin:gsub (" ", "")
|
local skin_name_formated = skin:gsub (" ", "")
|
||||||
|
|
||||||
|
|||||||
@@ -193,6 +193,8 @@ function _detalhes:OpenWelcomeWindow ()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
_detalhes.standard_skin = savedObject
|
_detalhes.standard_skin = savedObject
|
||||||
|
|
||||||
|
_detalhes:ApplyPDWSkin ("ElvUI")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- frame alert
|
-- frame alert
|
||||||
|
|||||||
+11
-7
@@ -161,8 +161,6 @@ function _G._detalhes:Start()
|
|||||||
|
|
||||||
function _detalhes:CheckWallpaperAfterStartup()
|
function _detalhes:CheckWallpaperAfterStartup()
|
||||||
|
|
||||||
--print ("1 Checking WallPaper...")
|
|
||||||
|
|
||||||
if (not _detalhes.profile_loaded) then
|
if (not _detalhes.profile_loaded) then
|
||||||
return _detalhes:ScheduleTimer ("CheckWallpaperAfterStartup", 2)
|
return _detalhes:ScheduleTimer ("CheckWallpaperAfterStartup", 2)
|
||||||
end
|
end
|
||||||
@@ -174,15 +172,10 @@ function _G._detalhes:Start()
|
|||||||
instance:InstanceWallpaper (false)
|
instance:InstanceWallpaper (false)
|
||||||
end
|
end
|
||||||
|
|
||||||
--print ("==== 2 Moving Window ", instance.meu_id, instance.ativa)
|
|
||||||
--vardump (instance.snap)
|
|
||||||
--print ("===============")
|
|
||||||
|
|
||||||
instance.do_not_snap = true
|
instance.do_not_snap = true
|
||||||
self.move_janela_func (instance.baseframe, true, instance, true)
|
self.move_janela_func (instance.baseframe, true, instance, true)
|
||||||
self.move_janela_func (instance.baseframe, false, instance, true)
|
self.move_janela_func (instance.baseframe, false, instance, true)
|
||||||
instance.do_not_snap = false
|
instance.do_not_snap = false
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.CheckWallpaperAfterStartup = nil
|
self.CheckWallpaperAfterStartup = nil
|
||||||
@@ -346,6 +339,17 @@ function _G._detalhes:Start()
|
|||||||
_detalhes:FillUserCustomSpells()
|
_detalhes:FillUserCustomSpells()
|
||||||
_detalhes:AddDefaultCustomDisplays()
|
_detalhes:AddDefaultCustomDisplays()
|
||||||
|
|
||||||
|
--> check elvui for the new player detail skin
|
||||||
|
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 69 and enable_reset_warning) then
|
||||||
|
function _detalhes:PDWElvuiCheck()
|
||||||
|
local ElvUI = _G.ElvUI
|
||||||
|
if (ElvUI) then
|
||||||
|
_detalhes:ApplyPDWSkin ("ElvUI")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
_detalhes:ScheduleTimer ("PDWElvuiCheck", 1)
|
||||||
|
end
|
||||||
|
|
||||||
--> Reset for the new structure
|
--> Reset for the new structure
|
||||||
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 66 and enable_reset_warning) then
|
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 66 and enable_reset_warning) then
|
||||||
function _detalhes:ResetDataStorage()
|
function _detalhes:ResetDataStorage()
|
||||||
|
|||||||
Reference in New Issue
Block a user