- 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
+4 -5
View File
File diff suppressed because one or more lines are too long
+19 -2
View File
@@ -274,6 +274,16 @@ end
self.posicao = table_deepcopy (config.pos)
end
if (_type (config.attribute) ~= "number") then
config.attribute = 1
end
if (_type (config.sub_attribute) ~= "number") then
config.sub_attribute = 1
end
if (_type (config.segment) ~= "number") then
config.segment = 1
end
self.ativa = config.is_open
self.atributo = config.attribute
self.sub_atributo = config.sub_attribute
@@ -1856,20 +1866,27 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
local atributo_changed = false
--> verifica possiveis valores não passados
--> verifica se os valores passados são válidos
if (not segmento) then
segmento = instancia.segmento
elseif (_type (segmento) ~= "number") then
segmento = instancia.segmento
end
if (not atributo) then
atributo = instancia.atributo
elseif (_type (atributo) ~= "number") then
atributo = instancia.atributo
end
if (not sub_atributo) then
if (atributo == current_atributo) then
sub_atributo = instancia.sub_atributo
else
sub_atributo = instancia.sub_atributo_last [atributo]
end
elseif (_type (sub_atributo) ~= "number") then
sub_atributo = instancia.sub_atributo
end
--> já esta mostrando isso que esta pedindo
+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."},
}
})
+1
View File
@@ -126,6 +126,7 @@ function _detalhes:OpenWelcomeWindow ()
instance.baseframe:SetPoint ("left", DetailsWelcomeWindow, "right", 10, 0)
end
_detalhes:ScheduleTimer ("WelcomeSetLoc", 12)
--_detalhes:WelcomeSetLoc()
--/script local f=CreateFrame("frame");local g=false;f:SetScript("OnUpdate",function(s,e)if not g then local r=math.random for i=1,2500000 do local a=r(1,1000000);a=a+1 end g=true else print(string.format("cpu: %.3f",e));f:SetScript("OnUpdate",nil)end end)