- Fixed details crash when clicking directly on the sword button.

- Added new skin: Serenity.
- Removed skin: Flat Skin.
This commit is contained in:
tercio
2014-10-11 13:53:44 -03:00
parent 00c9e4de29
commit 0c3708677e
5 changed files with 56 additions and 12 deletions
+17 -1
View File
@@ -310,6 +310,10 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
break
end
if (skin.skin == "Flat Color") then
skin.skin = "Serenity"
end
--> get the instance
local instance = _detalhes:GetInstance (index)
if (not instance) then
@@ -332,6 +336,17 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
instance.verticalSnap = nil
instance:LockInstance (false)
--> fix for old versions
if (type (instance.segmento) ~= "number") then
instance.segmento = 0
end
if (type (instance.atributo) ~= "number") then
instance.atributo = 1
end
if (type (instance.sub_atributo) ~= "number") then
instance.sub_atributo = 1
end
--> load data saved for this character only
instance:LoadLocalInstanceConfig()
if (skin.__was_opened) then
@@ -366,7 +381,8 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
instance.posicao.normal = {x = 1, y = 1, w = 300, h = 200}
end
end
-- /dump _detalhes:GetInstance(1).sub_atributo
--> open the instance
if (instance:IsEnabled()) then
if (not instance.baseframe) then
+15 -4
View File
@@ -252,13 +252,23 @@ local _
}
})
_detalhes:InstallSkin ("Flat Color", {
local dark_serenity = function()
local instance = _G.DetailsOptionsWindow.instance
--> black color
instance:InstanceColor (0, 0, 0, 1)
--> flip wallpaper
local wtexc = instance.wallpaper.texcoord
wtexc[1], wtexc[2], wtexc[3], wtexc[4] = 0.04800000, 0.29800001, 0.75599998, 0.63099998
--> reload skin
instance:ChangeSkin()
end
_detalhes:InstallSkin ("Serenity", { --
file = [[Interface\AddOns\Details\images\skins\flat_skin]],
author = "Details!",
version = "1.0",
site = "unknown",
desc = "Pure white with opaque colors makes this skin very different and peculiar.",
desc = "White with a gradient wallpaper, this skin fits on almost all interfaces.\n\nFor ElvUI interfaces, change the window color to black to get an compatible visual.",
micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10, left = "DETAILS_STATUSBAR_PLUGIN_PATTRIBUTE"},
@@ -292,7 +302,7 @@ local _
0.9199999570846558, -- [4]
},
["menu_anchor"] = {
-59, -- [1]
-60, -- [1]
0, -- [2]
["side"] = 2,
},
@@ -450,6 +460,7 @@ local _
skin_options = {
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]},
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3"], func = set_tooltip_elvui2, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3_DESC"]},
{type = "button", name = "Serenity Dark Side", func = dark_serenity, desc = "Flip the colors showing the dark side of Serenity."},
}
})