- Testing new sort method on Cooldowns and Customs, this is a try to fix the row changing places when actors have the same amount done.

- Minimalistic is now the skin default used by Details! after its instalation.
- Many improvements over Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.
- Added 'Logos' and 'Raid & Dungeons' sections for Wallpapers.
- Added a option to load a image from the computer to use as wallpaper.
- Revamp on Image Editor, many bugs solves and now it is usable.
- Few tweaks done on shortcut panel, now the buttons they are smaller and the panel can hold more.
- Fixed 'While in Combat' hiding schema.
- Fixed the report window alert when opening the report window and it already is opened.
- Fixed the gap between last row created and the end of the window.
- Fixed all tooltips bugs on Wallpaper Section on Options Panel.
This commit is contained in:
tercio
2014-06-25 16:11:19 -03:00
parent c36f87a3b6
commit 7632bcdaec
23 changed files with 545 additions and 141 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
_detalhes.userversion = "v1.17.0a"
_detalhes.userversion = "v1.17.2"
_detalhes.version = "Alpha 020"
_detalhes.realversion = 20
+1 -1
View File
@@ -965,7 +965,7 @@ end
local new_actor = _setmetatable ({
nome = actor.nome,
classe = actor.classe,
value = 0,
value = _detalhes:GetAlphabeticalOrderNumber (actor.nome),
}, atributo_custom.mt)
new_actor.displayName = new_actor.nome
+3 -3
View File
@@ -957,8 +957,8 @@ end
--local skin = fazer aqui o esquema de resgatar a skin salva no profile.
new_instance:ChangeSkin ("Minimalistic")
new_instance:ChangeSkin ("Default Skin")
new_instance:ChangeSkin ("Minimalistic")
--> apply standard skin if have one saved
if (_detalhes.standard_skin) then
@@ -2333,7 +2333,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
if (_thisActor) then
local amount = _thisActor [keyName]
local amount = _math_floor (_thisActor [keyName])
local name = _thisActor.nome.." "
if (_detalhes.remove_realm_from_name and name:find ("-")) then
@@ -2442,7 +2442,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
for i = container_amount, this_amt, -1 do
local _thisActor = container [i]
local amount = _thisActor [keyName]
local amount = _math_floor (_thisActor [keyName])
local name = _thisActor.nome.." "
+2 -2
View File
@@ -34,7 +34,7 @@ end
_detalhes.instance_defaults = {
--skin
skin = "Default Skin",
skin = "Minimalistic",
--baseframe backdrop
bg_alpha = 0.7,
bg_r = 0.0941,
@@ -67,7 +67,7 @@ _detalhes.instance_defaults = {
--instance button info
instancebutton_config = {size = {20, 16}, anchor = {2, 0}, highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]], textcolor = {1, 1, 1, 1}, textsize = 11, textfont = "Friz Quadrata TT", textshadow = false},
--close button info
closebutton_config = {size = {18, 18}, anchor = {0, 0}, normal_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Up]], highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]], pushed_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Down]]},
closebutton_config = {size = {18, 18}, alpha = 1, anchor = {0, 0}, normal_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Up]], highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]], pushed_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Down]]},
--menus:
--anchor store the anchor point of main menu
menu_anchor = {5, 1, side = 1}, --mode segment attribute report on top position
+1 -1
View File
@@ -659,7 +659,7 @@ function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, l
self.minha_barra = esta_barra
self.colocacao = lugar
local meu_total = self [keyName] --> total de dano que este jogador deu
local meu_total = _math_floor (self [keyName] or 0) --> total
if (not meu_total) then
return
end
+2 -4
View File
@@ -330,7 +330,7 @@
--> hide / alpha / switch in combat
for index, instancia in ipairs (_detalhes.tabela_instancias) do
if (instancia.ativa) then
instancia:SetCombatAlpha (nil, nil, true)
--instancia:SetCombatAlpha (nil, nil, true) --passado para o regen disable
instancia:CheckSwitchOnCombatStart()
end
end
@@ -565,9 +565,7 @@
--> hide / alpha in combat
for index, instancia in ipairs (_detalhes.tabela_instancias) do
if (instancia.ativa) then
instancia:SetCombatAlpha (nil, nil, true)
--instancia:SetCombatAlpha (nil, nil, true) --passado para o regen enabled
if (instancia.auto_switch_to_old) then
instancia:CheckSwitchOnCombatEnd()
end
+24 -3
View File
@@ -1457,14 +1457,14 @@
------------------------------------------------------------------------------------------------
--> build containers on the fly
if (not este_jogador.cooldowns_defensive) then
este_jogador.cooldowns_defensive = 0
este_jogador.cooldowns_defensive = _detalhes:GetAlphabeticalOrderNumber (who_name)
este_jogador.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
este_jogador.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades
if (not este_jogador.shadow.cooldowns_defensive_targets) then
este_jogador.shadow.cooldowns_defensive = 0
este_jogador.shadow.cooldowns_defensive = _detalhes:GetAlphabeticalOrderNumber (who_name)
este_jogador.shadow.cooldowns_defensive_targets = container_combatentes:NovoContainer (container_damage_target) --> pode ser um container de alvo de dano, pois irá usar apenas o .total
este_jogador.shadow.cooldowns_defensive_spell_tables = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas
end
@@ -2345,9 +2345,15 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
--test
--function parser:spell_fail (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, error, msg2, msg3)
-- print (token, who_name, spellid, spellname, spellschool, error, msg2, msg3)
--end
local token_list = {
-- neutral
["SPELL_SUMMON"] = parser.summon,
--["SPELL_CAST_FAILED"] = parser.spell_fail
}
--serach key: ~capture
@@ -2679,6 +2685,12 @@
local esta_instancia = _detalhes.tabela_instancias[_detalhes.solo]
esta_instancia.atualizando = true
end
for index, instancia in ipairs (_detalhes.tabela_instancias) do
if (instancia.ativa) then
instancia:SetCombatAlpha (nil, nil, true)
end
end
end
function _detalhes.parser_functions:PLAYER_REGEN_ENABLED (...)
@@ -2710,6 +2722,12 @@
_detalhes.historico:adicionar_overall (_detalhes.tabela_vigente)
end
for index, instancia in ipairs (_detalhes.tabela_instancias) do
if (instancia.ativa) then
instancia:SetCombatAlpha (nil, nil, true)
end
end
end
function _detalhes.parser_functions:GROUP_ROSTER_UPDATE (...)
@@ -2851,6 +2869,9 @@
function _detalhes:OnParserEvent (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...)
local funcao = token_list [token]
--print (token, ...)
if (funcao) then
return funcao (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, ... )
else
+9 -2
View File
@@ -18,8 +18,10 @@
local _string_format = string.format --lua local
local _math_floor = math.floor --lua local
local _math_max = math.max --lua local
local _math_abs = math.abs --lua local
local _type = type --lua local
local _string_match = string.match --lua local
local _string_byte = string.byte
local loadstring = loadstring --lua local
local _UnitClass = UnitClass --wow api local
@@ -37,6 +39,11 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> details api functions
--> get the fractional number representing the alphabetical letter
function _detalhes:GetAlphabeticalOrderNumber (who_name)
return _math_abs (_string_byte (_upper (who_name))-91)/1000000
end
--> set all table keys to lower
local temptable = {}
function _detalhes:LowerizeKeys (_table)
@@ -482,8 +489,8 @@
self.frame:Hide()
end
if (frame.FlashAnimation.onFinishFunc) then
frame.FlashAnimation:onFinishFunc (frame)
if (self.onFinishFunc) then
self:onFinishFunc (self.frame)
end
end
+9 -4
View File
@@ -16,6 +16,11 @@
local _UIParent = UIParent --wow api local
local gump = _detalhes.gump --details local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local end_window_spacement = 1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
@@ -164,7 +169,7 @@
self.ponto3 = {x = _x + metade_largura, y = _y - metade_altura + statusbar_y_mod} --bottomright
self.ponto4 = {x = _x + metade_largura, y = _y + metade_altura + (statusbar_y_mod*-1)} --topright
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> checar isso
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight() - end_window_spacement --> espaço para o final da janela
return {altura = self.baseframe:GetHeight(), largura = self.baseframe:GetWidth(), x = xOfs/_UIscale, y = yOfs/_UIscale}
end
@@ -190,7 +195,7 @@
self.baseframe:SetWidth (self.posicao[self.mostrando].w) --slider frame
self.baseframe:SetHeight (self.posicao[self.mostrando].h)
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> checar isso
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight() - end_window_spacement --> espaço para o final da janela
end
function _detalhes:RestoreMainWindowPositionNoResize (pre_defined, x, y)
@@ -213,7 +218,7 @@
self.baseframe:ClearAllPoints()
self.baseframe:SetPoint ("CENTER", _UIParent, "CENTER", novo_x + x, novo_y + y)
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> checar isso
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight() - end_window_spacement --> espaço para o final da janela
end
function _detalhes:ResetaGump (instancia, tipo, segmento)
@@ -295,7 +300,7 @@
end
-- -4 difere a precisão de quando a barra será adicionada ou apagada da barra
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight() - end_window_spacement
local T = self.rows_fit_in_window
if (not T) then --> primeira vez que o gump esta sendo reajustado
+19
View File
@@ -1589,6 +1589,24 @@ function DetailsCreateCoolTip()
--> set cooltip type
--> parameters: type (1 = tooltip | 2 = tooltip with bars | 3 = menu)
function CoolTip:IsMenu()
return CoolTip.frame1:IsShown() and CoolTip.Type == 3
end
function CoolTip:IsTooltip()
return CoolTip.frame1:IsShown() and (CoolTip.Type == 1 or CoolTip.Type == 2)
end
function CoolTip:GetType()
if (CoolTip.Type == 1 or CoolTip.Type == 2) then
return "tooltip"
elseif (CoolTip.Type == 3) then
return "menu"
else
return "none"
end
end
function CoolTip:SetType (newType)
if (type (newType) == "string") then
if (newType == "tooltip") then
@@ -2547,6 +2565,7 @@ function DetailsCreateCoolTip()
CoolTip.Host = nil
gump:Fade (frame1, 1)
gump:Fade (frame2, 1)
end
--> old function call
+48 -20
View File
@@ -9,6 +9,8 @@ local _
tinsert (UISpecialFrames, "DetailsImageEdit")
window:SetFrameStrata ("TOOLTIP")
window:SetMaxResize (266, 226)
window.hooks = {}
local background = g:NewImage (window, nil, nil, nil, "background", nil, nil, "$parentBackground")
@@ -16,7 +18,26 @@ local _
background:SetTexture (0, 0, 0, .8)
local edit_texture = g:NewImage (window, nil, 300, 250, "artwork", nil, nil, "$parentImage")
edit_texture:SetPoint ("center", window, "center")
edit_texture:SetAllPoints()
local background_frame = CreateFrame ("frame", "DetailsImageEditBackground", DetailsImageEdit)
background_frame:SetPoint ("topleft", DetailsImageEdit, "topleft", -10, 12)
background_frame:SetFrameStrata ("DIALOG")
background_frame:SetSize (400, 252)
background_frame:SetResizable (true)
background_frame:SetMovable (true)
background_frame:SetScript ("OnMouseDown", function()
window:StartMoving()
end)
background_frame:SetScript ("OnMouseUp", function()
window:StopMovingOrSizing()
end)
local background_frame_image = background_frame:CreateTexture (nil, "background")
background_frame_image:SetAllPoints (background_frame)
background_frame_image:SetTexture ([[Interface\AddOns\Details\images\welcome]])
local haveHFlip = false
local haveVFlip = false
@@ -151,8 +172,9 @@ local _
--> Edit Buttons
local buttonsBackground = g:NewPanel (UIParent, nil, "DetailsImageEditButtonsBg", nil, 115, 225)
buttonsBackground:SetPoint ("topleft", window, "topright", 2, 0)
local buttonsBackground = g:NewPanel (UIParent, nil, "DetailsImageEditButtonsBg", nil, 115, 230)
--buttonsBackground:SetPoint ("topleft", window, "topright", 2, 0)
buttonsBackground:SetPoint ("topright", background_frame, "topright", -8, -10)
buttonsBackground:Hide()
--buttonsBackground:SetMovable (true)
tinsert (UISpecialFrames, "DetailsImageEditButtonsBg")
@@ -198,20 +220,20 @@ local _
end
local leftTexCoordButton = g:NewButton (buttonsBackground, nil, "$parentLeftTexButton", nil, 100, 20, enableTexEdit, "left", nil, nil, "Crop Left")
leftTexCoordButton:SetPoint ("topleft", window, "topright", 10, -10)
leftTexCoordButton:SetPoint ("topright", buttonsBackground, "topright", -8, -10)
local rightTexCoordButton = g:NewButton (buttonsBackground, nil, "$parentRightTexButton", nil, 100, 20, enableTexEdit, "right", nil, nil, "Crop Right")
rightTexCoordButton:SetPoint ("topleft", window, "topright", 10, -30)
rightTexCoordButton:SetPoint ("topright", buttonsBackground, "topright", -8, -30)
local topTexCoordButton = g:NewButton (buttonsBackground, nil, "$parentTopTexButton", nil, 100, 20, enableTexEdit, "top", nil, nil, "Crop Top")
topTexCoordButton:SetPoint ("topleft", window, "topright", 10, -50)
topTexCoordButton:SetPoint ("topright", buttonsBackground, "topright", -8, -50)
local bottomTexCoordButton = g:NewButton (buttonsBackground, nil, "$parentBottomTexButton", nil, 100, 20, enableTexEdit, "bottom", nil, nil, "Crop Bottom")
bottomTexCoordButton:SetPoint ("topleft", window, "topright", 10, -70)
bottomTexCoordButton:SetPoint ("topright", buttonsBackground, "topright", -8, -70)
leftTexCoordButton:InstallCustomTexture()
rightTexCoordButton:InstallCustomTexture()
topTexCoordButton:InstallCustomTexture()
bottomTexCoordButton:InstallCustomTexture()
local Alpha = g:NewButton (buttonsBackground, nil, "$parentBottomAlphaButton", nil, 100, 20, alpha, nil, nil, nil, "Transparency")
Alpha:SetPoint ("topleft", window, "topright", 10, -110)
Alpha:SetPoint ("topright", buttonsBackground, "topright", -8, -115)
Alpha:InstallCustomTexture()
--> overlay color
@@ -262,7 +284,7 @@ local _
end
local changeColorButton = g:NewButton (buttonsBackground, nil, "$parentOverlayColorButton", nil, 100, 20, changeColor, nil, nil, nil, "Overlay Color")
changeColorButton:SetPoint ("topleft", window, "topright", 10, -90)
changeColorButton:SetPoint ("topright", buttonsBackground, "topright", -8, -95)
changeColorButton:InstallCustomTexture()
alphaFrame = g:NewPanel (buttonsBackground, nil, "DetailsImageEditAlphaBg", nil, 40, 225)
@@ -310,8 +332,10 @@ local _
end)
local resizer = CreateFrame ("Button", nil, window.widget)
resizer:SetNormalTexture ("Interface\\AddOns\\Details\\images\\ResizeGripD")
resizer:SetHighlightTexture ("Interface\\AddOns\\Details\\images\\ResizeGripD")
resizer:SetNormalTexture ([[Interface\AddOns\Details\images\skins\default_skin]])
resizer:SetHighlightTexture ([[Interface\AddOns\Details\images\skins\default_skin]])
resizer:GetNormalTexture():SetTexCoord (0.00146484375, 0.01513671875, 0.24560546875, 0.25927734375)
resizer:GetHighlightTexture():SetTexCoord (0.00146484375, 0.01513671875, 0.24560546875, 0.25927734375)
resizer:SetWidth (16)
resizer:SetHeight (16)
resizer:SetPoint ("BOTTOMRIGHT", window.widget, "BOTTOMRIGHT", 0, 0)
@@ -351,9 +375,7 @@ local _
end
end)
--> change size
local resizeLabel = g:NewLabel (window, nil, "$parentResizerIndicator", nil, "RESIZE", nil, 9)
resizeLabel:SetPoint ("right", resizer, "left", -2, 0)
--> flip
local flip = function (side)
@@ -371,11 +393,11 @@ local _
end
local flipButtonH = g:NewButton (buttonsBackground, nil, "$parentFlipButton", nil, 100, 20, flip, 1, nil, nil, "Flip Horizontal")
flipButtonH:SetPoint ("topleft", window, "topright", 10, -140)
flipButtonH:SetPoint ("topright", buttonsBackground, "topright", -8, -140)
flipButtonH:InstallCustomTexture()
--
local flipButtonV = g:NewButton (buttonsBackground, nil, "$parentFlipButton2", nil, 100, 20, flip, 2, nil, nil, "Flip Vertical")
flipButtonV:SetPoint ("topleft", window, "topright", 10, -160)
flipButtonV:SetPoint ("topright", buttonsBackground, "topright", -8, -160)
flipButtonV:InstallCustomTexture()
--> accept
@@ -411,14 +433,16 @@ local _
end
local acceptButton = g:NewButton (buttonsBackground, nil, "$parentAcceptButton", nil, 100, 20, window.accept, nil, nil, nil, "DONE")
acceptButton:SetPoint ("topleft", window, "topright", 10, -200)
acceptButton:SetPoint ("topright", buttonsBackground, "topright", -8, -200)
acceptButton:InstallCustomTexture()
window:Hide()
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local ttexcoord
function g:ImageEditor (callback, texture, texcoord, colors, width, height, extraParam, alpha)
function g:ImageEditor (callback, texture, texcoord, colors, width, height, extraParam, alpha, maximize)
texcoord = texcoord or {0, 1, 0, 1}
ttexcoord = texcoord
@@ -430,6 +454,7 @@ window:Hide()
edit_texture:SetTexture (texture)
edit_texture.width = width
edit_texture.height = height
edit_texture.maximize = maximize
edit_texture:SetVertexColor (colors [1], colors [2], colors [3])
@@ -447,8 +472,11 @@ window:Hide()
function _detalhes:RefreshImageEditor()
window.width = edit_texture.width
window.height = edit_texture.height
if (edit_texture.maximize) then
DetailsImageEdit:SetSize (266, 226)
else
DetailsImageEdit:SetSize (edit_texture.width, edit_texture.height)
end
local l, r, t, b = unpack (ttexcoord)
+16 -15
View File
@@ -69,7 +69,7 @@ local _
--rows
row_info = {
texture = "Details D'ictum",
texture = "Details Serenity",
texture_class_colors = true,
alpha = 1,
texture_background_class_color = false,
@@ -128,17 +128,17 @@ local _
instance_cprops = {
hide_icon = true,
menu_anchor = {-55, -1, side = 2},
menu_anchor = {-60, 0, side = 2},
menu_anchor_down = {-55, -1},
menu2_anchor = {32, 2},
menu2_anchor = {32, 3},
menu2_anchor_down = {32, 2},
menu_icons_size = 0.8,
plugins_grow_direction = 1,
instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.8, .6, .0, 0.8}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]},
resetbutton_config = {size = {8, 16}, anchor = {1, 0}},
closebutton_config = {size = {17, 17}},
instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.8, .6, .0, 0.8}, textsize = 11, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]},
resetbutton_config = {size = {13, 13}, anchor = {2, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button2]], highlight_texture = [[Interface\Addons\Details\Images\reset_button2]]},
closebutton_config = {size = {19, 19}, alpha = 0.8},
show_sidebars = false,
show_statusbar = false,
@@ -149,7 +149,7 @@ local _
texture = "Blizzard Character Skills Bar",
font_face = "Arial Narrow",
},
attribute_text = {enabled = true, side = 1, text_size = 11, anchor = {-18, 3}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"},
attribute_text = {enabled = true, side = 1, text_size = 11, anchor = {-18, 4}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"},
},
callback = function (skin, instance, just_updating)
@@ -484,15 +484,16 @@ local _
--[[ for the complete cprop list see the file classe_instancia_include.lua]]
instance_cprops = {
instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.7, .7, .7, 1}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]},
resetbutton_config = {size = {8, 16}, anchor = {1, 0}},
closebutton_config = {size = {17, 17}},
instancebutton_config = {size = {20, 16}, anchor = {7, 0}, textcolor = {.7, .7, .7, 1}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]},
resetbutton_config = {size = {8, 16}, anchor = {2, 0}},
closebutton_config = {size = {17, 17}, alpha = 0.60, anchor = {1, 0}},
menu_icons_size = 0.85,
menu_anchor = {-58, 0, side = 2},
menu_anchor_down = {-58, 0},
menu2_anchor = {32, 2},
menu2_anchor_down = {32, 2},
menu_icons_size = 0.80,
menu2_icons_size = 1.10,
menu_anchor = {-55, 0, side = 2},
menu_anchor_down = {-60, 0},
menu2_anchor = {32, 3},
menu2_anchor_down = {32, 3},
plugins_grow_direction = 1,
attribute_text = {enabled = true, anchor = {-20, 4}, text_face = "Friz Quadrata TT", text_size = 10, text_color = {1, 1, 1, .7}, side = 1, shadow = true},
+254 -25
View File
@@ -1,5 +1,28 @@
--[[ options panel file --]]
--[[
1 - general
2 - combat
3 - skin
4 - row settings
5 - row texts
6 - window settings
7 - left menu
8 - right menu
9 - wallpaper
10 - performance teaks
11 - captures
12 - plugins
13 - profiles
14 - attribute text
15 - custom spells
16 - data for charts
17 - hide and show
18 - misc settings
19 - externals widgets
20 - tooltip
--]]
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
@@ -935,8 +958,10 @@ local menus = { --labels nos menus
local widget = _table [1]
local istitle = _table [3]
if (istitle and y ~= y_start) then
if (type (istitle) == "boolean" and istitle and y ~= y_start) then
y = y - 10
elseif (type (istitle) == "boolean" and not istitle and y ~= y_start) then
y = y + 5
end
if (type (widget) == "string") then
@@ -1482,7 +1507,7 @@ function window:CreateFrame18()
local BuildSwitchMenu = function()
window.lastSwitchList = {}
local t = {{value = 0, label = "NONE", onclick = Current_Switch_Func, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]]}}
local t = {{value = 0, label = "do not switch", color = {.7, .7, .7, 1}, onclick = Current_Switch_Func, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]]}}
local attributes = _detalhes.sub_atributos
local i = 1
@@ -1916,13 +1941,13 @@ function window:CreateFrame18()
local left_side = {
{"switchesAnchorLabel", 1, true},
{"autoSwitchLabel", 2},
{"AutoSwitchWipeLabel", 3},
{dps_icon1, 7},
{healer_icon1, 6},
{tank_icon1, 5},
{dps_icon2, 9},
{healer_icon2, 8},
{"autoSwitchLabel", 8},
{"AutoSwitchWipeLabel", 9},
{dps_icon1, 2},
{healer_icon1, 3},
{tank_icon1, 4},
{dps_icon2, 5},
{healer_icon2, 6},
{tank_icon2, 7},
{"autoCurrentLabel", 10},
@@ -5393,9 +5418,18 @@ function window:CreateFrame9()
local wp = tinstance.wallpaper
if (wp.texture:find ("TALENTFRAME")) then
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, tinstance.baseframe.wallpaper:GetWidth(), tinstance.baseframe.wallpaper:GetHeight(), nil, wp.alpha)
if (wp.anchor == "all") then
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, tinstance.baseframe.wallpaper:GetWidth(), tinstance.baseframe.wallpaper:GetHeight(), nil, wp.alpha, true)
else
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, tinstance.baseframe.wallpaper:GetWidth(), tinstance.baseframe.wallpaper:GetHeight(), nil, wp.alpha)
end
else
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, tinstance.baseframe.wallpaper:GetWidth(), tinstance.baseframe.wallpaper:GetHeight(), nil, wp.alpha)
if (wp.anchor == "all") then
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, tinstance.baseframe.wallpaper:GetWidth(), tinstance.baseframe.wallpaper:GetHeight(), nil, wp.alpha, true)
else
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, tinstance.baseframe.wallpaper:GetWidth(), tinstance.baseframe.wallpaper:GetHeight(), nil, wp.alpha)
end
end
end
g:NewButton (frame9, _, "$parentEditImage", "editImage", 200, 18, startImageEdit, nil, nil, nil, Loc ["STRING_OPTIONS_EDITIMAGE"])
@@ -5430,9 +5464,37 @@ function window:CreateFrame9()
local onSelectSecTexture = function (self, instance, texturePath)
if (texturePath:find ("TALENTFRAME")) then
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 0.703125})
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 0.703125}, nil, nil, {1, 1, 1, 1})
if (DetailsImageEdit and DetailsImageEdit:IsShown()) then
local wp = instance.wallpaper
if (wp.anchor == "all") then
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, instance.baseframe.wallpaper:GetWidth(), instance.baseframe.wallpaper:GetHeight(), nil, wp.alpha, true)
else
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, instance.baseframe.wallpaper:GetWidth(), instance.baseframe.wallpaper:GetHeight(), nil, wp.alpha)
end
end
elseif (texturePath:find ("EncounterJournal")) then
instance:InstanceWallpaper (texturePath, nil, nil, {0.06, 0.68, 0.1, 0.57}, nil, nil, {1, 1, 1, 1})
if (DetailsImageEdit and DetailsImageEdit:IsShown()) then
local wp = instance.wallpaper
if (wp.anchor == "all") then
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, instance.baseframe.wallpaper:GetWidth(), instance.baseframe.wallpaper:GetHeight(), nil, wp.alpha, true)
else
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, instance.baseframe.wallpaper:GetWidth(), instance.baseframe.wallpaper:GetHeight(), nil, wp.alpha)
end
end
else
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 1})
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 1}, nil, nil, {1, 1, 1, 1})
if (DetailsImageEdit and DetailsImageEdit:IsShown()) then
local wp = instance.wallpaper
if (wp.anchor == "all") then
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, instance.baseframe.wallpaper:GetWidth(), instance.baseframe.wallpaper:GetHeight(), nil, wp.alpha, true)
else
g:ImageEditor (callmeback, wp.texture, wp.texcoord, wp.overlay, instance.baseframe.wallpaper:GetWidth(), instance.baseframe.wallpaper:GetHeight(), nil, wp.alpha)
end
end
end
window:update_wallpaper_info()
@@ -5466,6 +5528,42 @@ function window:CreateFrame9()
{value = [[Interface\ARCHEOLOGY\ArchRare-ZinRokhDestroyer]], label = "ZinRokh Destroyer", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-ZinRokhDestroyer]], texcoord = nil},
},
["RAIDS"] = {
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockCaverns]], label = "Blackrock Caverns", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockCaverns]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockSpire]], label = "Blackrock Spire", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockSpire]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-DragonSoul]], label = "Dragon Soul", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-DragonSoul]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-EndTime]], label = "End Time", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-EndTime]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-Firelands1]], label = "Firelands", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-Firelands1]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-HallsofReflection]], label = "Halls of Reflection", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-HallsofReflection]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireCitadel]], label = "Hellfire Citadel", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireCitadel]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-Pandaria]], label = "Pandaria", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-Pandaria]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-RagefireChasm]], label = "Ragefire Chasm", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-RagefireChasm]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-SiegeofOrgrimmar]], label = "Siege of Orgrimmar", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-SiegeofOrgrimmar]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheNexus]], label = "The Nexus", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheNexus]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheOculus]], label = "The Oculus", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheOculus]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheStonecore]], label = "The Stonecore", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheStonecore]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-ThunderKingRaid]], label = "Throne of Thunder", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-ThunderKingRaid]], texcoord = nil},
},
["LOGOS"] = {
{value = [[Interface\Timer\Alliance-Logo]], label = "For the Alliance", onclick = onSelectSecTexture, icon = [[Interface\Timer\Alliance-Logo]], texcoord = nil},
{value = [[Interface\Timer\Horde-Logo]], label = "For the Horde", onclick = onSelectSecTexture, icon = [[Interface\Timer\Horde-Logo]], texcoord = nil},
{value = [[Interface\Destiny\EndscreenImage]], label = "Pandaria Logo", onclick = onSelectSecTexture, icon = [[Interface\Destiny\EndscreenImage]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\ARCH-RACE-ORC]], label = "Orc Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-ORC]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\ARCH-RACE-DWARF]], label = "Dwarf Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-DWARF]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\ARCH-RACE-NIGHTELF]], label = "Night Elf Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-NIGHTELF]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\Arch-Race-Pandaren]], label = "Padaren Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-Race-Pandaren]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\ARCH-RACE-TROLL]], label = "Troll Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-TROLL]], texcoord = nil},
{value = [[Interface\FlavorImages\BloodElfLogo-small]], label = "Blood Elf Crest", onclick = onSelectSecTexture, icon = [[Interface\FlavorImages\BloodElfLogo-small]], texcoord = nil},
{value = [[Interface\Glues\COMMON\Glues-Logo]], label = "Wow Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\Glues-Logo]], texcoord = nil},
{value = [[Interface\Glues\COMMON\GLUES-WOW-BCLOGO]], label = "Burning Cruzade Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\GLUES-WOW-BCLOGO]], texcoord = nil},
{value = [[Interface\Glues\COMMON\GLUES-WOW-CCLOGO]], label = "Cataclysm Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\GLUES-WOW-CCLOGO]], texcoord = nil},
{value = [[Interface\Glues\COMMON\Glues-WOW-WoltkLogo]], label = "WotLK Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\Glues-WOW-WoltkLogo]], texcoord = nil},
--{value = [[]], label = "", onclick = onSelectSecTexture, icon = [[]], texcoord = nil},
},
["CREDITS"] = {
{value = [[Interface\Glues\CREDITS\Arakkoa2]], label = "Arakkoa", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Arakkoa2]], texcoord = nil},
{value = [[Interface\Glues\CREDITS\Arcane_Golem2]], label = "Arcane Golem", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Arcane_Golem2]], texcoord = nil},
@@ -5500,7 +5598,7 @@ function window:CreateFrame9()
{value = [[Interface\Glues\CREDITS\Terrokkar6]], label = "Terrokkar", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Terrokkar6]], texcoord = nil},
{value = [[Interface\Glues\CREDITS\ThousandNeedles2]], label = "Thousand Needles", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\ThousandNeedles2]], texcoord = nil},
{value = [[Interface\Glues\CREDITS\Troll2]], label = "Troll", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Troll2]], texcoord = nil},
{value = [[Interface\Glues\CREDITS\LESSERELEMENTAL_FIRE_03B1]], label = "Fire Elemental", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\LESSERELEMENTAL_FIRE_03B1]], texcoord = nil},
{value = [[Interface\Glues\CREDITS\CATACLYSM\LESSERELEMENTAL_FIRE_03B1]], label = "Fire Elemental", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\CATACLYSM\LESSERELEMENTAL_FIRE_03B1]], texcoord = nil},
},
["DEATHKNIGHT"] = {
@@ -5599,8 +5697,10 @@ function window:CreateFrame9()
local backgroundTable = {
{value = "ARCHEOLOGY", label = "Archeology", onclick = onSelectMainTexture, icon = [[Interface\ARCHEOLOGY\Arch-Icon-Marker]]},
{value = "CREDITS", label = "Burning Crusade", onclick = onSelectMainTexture, icon = [[Interface\ICONS\TEMP]]},
{value = "DEATHKNIGHT", label = "Death Knight", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DEATHKNIGHT"]},
{value = "LOGOS", label = "Logos", onclick = onSelectMainTexture, icon = [[Interface\WorldStateFrame\ColumnIcon-FlagCapture0]]},
{value = "DRESSUP", label = "Race Background", onclick = onSelectMainTexture, icon = [[Interface\ICONS\INV_Chest_Cloth_17]]},
{value = "RAIDS", label = "Dungeons & Raids", onclick = onSelectMainTexture, icon = [[Interface\COMMON\friendship-FistHuman]]},
{value = "DEATHKNIGHT", label = "Death Knight", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DEATHKNIGHT"]},
{value = "DRUID", label = "Druid", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DRUID"]},
{value = "HUNTER", label = "Hunter", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["HUNTER"]},
{value = "MAGE", label = "Mage", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["MAGE"]},
@@ -5615,12 +5715,15 @@ function window:CreateFrame9()
local buildBackgroundMenu = function() return backgroundTable end
g:NewSwitch (frame9, _, "$parentUseBackgroundSlider", "useBackgroundSlider", 60, 20, _, _, _G.DetailsOptionsWindow.instance.wallpaper.enabled)
--category
local d = g:NewDropDown (frame9, _, "$parentBackgroundDropdown", "backgroundDropdown", DROPDOWN_WIDTH, 20, buildBackgroundMenu, nil)
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
d:SetBackdrop (dropdown_backdrop)
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
--wallpaper
local d = g:NewDropDown (frame9, _, "$parentBackgroundDropdown2", "backgroundDropdown2", DROPDOWN_WIDTH, 20, buildBackgroundMenu2, nil)
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
@@ -5663,8 +5766,8 @@ function window:CreateFrame9()
end
g:NewLabel (frame9, _, "$parentBackgroundLabel", "wallpapergroupLabel", Loc ["STRING_OPTIONS_WP_GROUP"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentBackgroundLabel", "selectwallpaperLabel", Loc ["STRING_OPTIONS_WP_GROUP2"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentBackgroundLabel1", "wallpapergroupLabel", Loc ["STRING_OPTIONS_WP_GROUP"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentBackgroundLabel2", "selectwallpaperLabel", Loc ["STRING_OPTIONS_WP_GROUP2"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentAnchorLabel", "anchorLabel", Loc ["STRING_OPTIONS_WP_ALIGN"], "GameFontHighlightLeft")
--
frame9.anchorDropdown:SetPoint ("left", frame9.anchorLabel, "right", 2)
@@ -5787,16 +5890,131 @@ function window:CreateFrame9()
preview:SetTexCoord (unpack (w.texcoord))
preview:SetVertexColor (unpack (w.overlay))
preview:SetAlpha (w.alpha)
frame9.wallpaperCurrentLabel.text = "Texture File: " .. (w.texture or "-- -- --") .. "\nAlpha: " .. a .. "\nOverlay: |cFFFFAAAAred|r: " .. math.floor(red/255*100) .. "% |cFFAAFFAAgreen|r: " .. math.floor(green/255*100) .. "% |cFFAAAAFFblue|r: " .. math.floor(blue/255*100) .. "%\nCut (|cFFC0C0C0top|r): " .. t .. "\nCut (|cFFC0C0C0bottom|r): " .. b .. "\nCut (|cFFC0C0C0left|r): " .. l .. "\nCut (|cFFC0C0C0right|r): " .. r
frame9.wallpaperCurrentLabel1text.text = w.texture or "-- -- --"
frame9.wallpaperCurrentLabel2text.text = a
frame9.wallpaperCurrentLabel3text.text = red
frame9.wallpaperCurrentLabel4text.text = green
frame9.wallpaperCurrentLabel5text.text = blue
frame9.wallpaperCurrentLabel6text.text = t
frame9.wallpaperCurrentLabel7text.text = b
frame9.wallpaperCurrentLabel8text.text = l
frame9.wallpaperCurrentLabel9text.text = r
end
--current settings
g:NewLabel (frame9, _, "$parentWallpaperCurrentAnchor", "wallpaperCurrentAnchorLabel", "Current:", "GameFontNormal")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel", "wallpaperCurrentLabel", "", "GameFontHighlightSmall")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel1", "wallpaperCurrentLabel1", Loc ["STRING_OPTIONS_WALLPAPER_FILE"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel2", "wallpaperCurrentLabel2", Loc ["STRING_OPTIONS_WALLPAPER_ALPHA"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel3", "wallpaperCurrentLabel3", Loc ["STRING_OPTIONS_WALLPAPER_RED"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel4", "wallpaperCurrentLabel4", Loc ["STRING_OPTIONS_WALLPAPER_GREEN"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel5", "wallpaperCurrentLabel5", Loc ["STRING_OPTIONS_WALLPAPER_BLUE"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel6", "wallpaperCurrentLabel6", Loc ["STRING_OPTIONS_WALLPAPER_CTOP"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel7", "wallpaperCurrentLabel7", Loc ["STRING_OPTIONS_WALLPAPER_CBOTTOM"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel8", "wallpaperCurrentLabel8", Loc ["STRING_OPTIONS_WALLPAPER_CLEFT"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel9", "wallpaperCurrentLabel9", Loc ["STRING_OPTIONS_WALLPAPER_CRIGHT"], "GameFontHighlightLeft")
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel1text", "wallpaperCurrentLabel1text", "", "GameFontHighlightSmall")
frame9.wallpaperCurrentLabel1text:SetPoint ("left", frame9.wallpaperCurrentLabel1, "right", 2, 0)
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel2text", "wallpaperCurrentLabel2text", "", "GameFontHighlightSmall")
frame9.wallpaperCurrentLabel2text:SetPoint ("left", frame9.wallpaperCurrentLabel2, "right", 2, 0)
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel3text", "wallpaperCurrentLabel3text", "", "GameFontHighlightSmall")
frame9.wallpaperCurrentLabel3text:SetPoint ("left", frame9.wallpaperCurrentLabel3, "right", 2, 0)
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel4text", "wallpaperCurrentLabel4text", "", "GameFontHighlightSmall")
frame9.wallpaperCurrentLabel4text:SetPoint ("left", frame9.wallpaperCurrentLabel4, "right", 2, 0)
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel5text", "wallpaperCurrentLabel5text", "", "GameFontHighlightSmall")
frame9.wallpaperCurrentLabel5text:SetPoint ("left", frame9.wallpaperCurrentLabel5, "right", 2, 0)
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel6text", "wallpaperCurrentLabel6text", "", "GameFontHighlightSmall")
frame9.wallpaperCurrentLabel6text:SetPoint ("left", frame9.wallpaperCurrentLabel6, "right", 2, 0)
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel7text", "wallpaperCurrentLabel7text", "", "GameFontHighlightSmall")
frame9.wallpaperCurrentLabel7text:SetPoint ("left", frame9.wallpaperCurrentLabel7, "right", 2, 0)
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel8text", "wallpaperCurrentLabel8text", "", "GameFontHighlightSmall")
frame9.wallpaperCurrentLabel8text:SetPoint ("left", frame9.wallpaperCurrentLabel8, "right", 2, 0)
g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel9text", "wallpaperCurrentLabel9text", "", "GameFontHighlightSmall")
frame9.wallpaperCurrentLabel9text:SetPoint ("left", frame9.wallpaperCurrentLabel9, "right", 2, 0)
--> Load Wallpaper
g:NewLabel (frame9, _, "$parentWallpaperLoadTitleAnchor", "WallpaperLoadTitleAnchor", Loc ["STRING_OPTIONS_WALLPAPER_LOAD_TITLE"], "GameFontNormal")
local load_image = function()
if (not DetailsLoadWallpaperImage) then
local f = CreateFrame ("frame", "DetailsLoadWallpaperImage", UIParent)
f:SetPoint ("center", UIParent, "center")
f:SetFrameStrata ("FULLSCREEN")
f:SetSize (512, 150)
f:EnableMouse (true)
f:SetMovable (true)
f:SetScript ("OnMouseDown", function() f:StartMoving() end)
f:SetScript ("OnMouseUp", function() f:StopMovingOrSizing() end)
local bg = f:CreateTexture (nil, "background")
bg:SetAllPoints()
bg:SetTexture ([[Interface\AddOns\Details\images\welcome]])
tinsert (UISpecialFrames, "DetailsLoadWallpaperImage")
local t = f:CreateFontString (nil, "overlay", "GameFontNormal")
t:SetText (Loc ["STRING_OPTIONS_WALLPAPER_LOAD_EXCLAMATION"])
t:SetPoint ("topleft", f, "topleft", 15, -15)
t:SetJustifyH ("left")
f.t = t
local filename = f:CreateFontString (nil, "overlay", "GameFontHighlightLeft")
filename:SetPoint ("topleft", f, "topleft", 15, -120)
filename:SetText (Loc ["STRING_OPTIONS_WALLPAPER_LOAD_FILENAME"])
local editbox = g:NewTextEntry (f, nil, "$parentFileName", "FileName", 160, 20, function() end)
editbox:SetPoint ("left", filename, "right", 2, 0)
editbox.tooltip = Loc ["STRING_OPTIONS_WALLPAPER_LOAD_FILENAME_DESC"]
local close = CreateFrame ("button", "DetailsLoadWallpaperImageOkey", f, "UIPanelCloseButton")
close:SetSize (32, 32)
close:SetPoint ("topright", f, "topright", -3, -1)
local okey = CreateFrame ("button", "DetailsLoadWallpaperImageOkey", f, "OptionsButtonTemplate")
okey:SetPoint ("left", editbox.widget, "right", 2, 0)
okey:SetText (Loc ["STRING_OPTIONS_WALLPAPER_LOAD_OKEY"])
okey:SetScript ("OnClick", function()
local text = editbox:GetText()
if (text == "") then
return
end
local instance = _G.DetailsOptionsWindow.instance
local path = "Interface\\" .. text
editbox:ClearFocus()
instance:InstanceWallpaper (path, "all", 0.50, {0, 1, 0, 1}, 256, 256, {1, 1, 1, 1})
_detalhes:OpenOptionsWindow (instance)
window:update_wallpaper_info()
end)
local throubleshoot = CreateFrame ("button", "DetailsLoadWallpaperImageOkey", f, "OptionsButtonTemplate")
throubleshoot:SetPoint ("left", okey, "right", 2, 0)
throubleshoot:SetText (Loc ["STRING_OPTIONS_WALLPAPER_LOAD_TROUBLESHOOT"])
throubleshoot:SetScript ("OnClick", function()
if (t:GetText() == Loc ["STRING_OPTIONS_WALLPAPER_LOAD_EXCLAMATION"]) then
t:SetText (Loc ["STRING_OPTIONS_WALLPAPER_LOAD_TROUBLESHOOT_TEXT"])
else
DetailsLoadWallpaperImage.t:SetText (Loc ["STRING_OPTIONS_WALLPAPER_LOAD_EXCLAMATION"])
end
end)
end
DetailsLoadWallpaperImage.t:SetText (Loc ["STRING_OPTIONS_WALLPAPER_LOAD_EXCLAMATION"])
DetailsLoadWallpaperImage:Show()
end
g:NewButton (frame9, _, "$parentLoadImage", "LoadImage", 200, 18, load_image, nil, nil, nil, Loc ["STRING_OPTIONS_WALLPAPER_LOAD"])
frame9.LoadImage:InstallCustomTexture()
window:CreateLineBackground2 (frame9, "LoadImage", "LoadImage", Loc ["STRING_OPTIONS_WALLPAPER_LOAD_DESC"])
--> Anchors
-- /script local f=CreateFrame("frame",nil,UIParent);f:SetSize(256,256);local t=f:CreateTexture(nil,"overlay");t:SetAllPoints();t:SetTexture([[Interface\wallpaper]]);f:SetPoint("center",UIParent,"center")
frame9.backgroundDropdown:SetPoint ("left", frame9.wallpapergroupLabel, "right", 2, 0)
frame9.backgroundDropdown2:SetPoint ("left", frame9.selectwallpaperLabel, "right", 2, 0)
@@ -5816,18 +6034,29 @@ function window:CreateFrame9()
{"anchorLabel", 5},
{"editImage", 6},
{"wallpaperCurrentAnchorLabel", 7, true},
{"wallpaperCurrentLabel", 8},
{"wallpaperCurrentLabel1", 8},
{"wallpaperCurrentLabel2", 9, false},
{"wallpaperCurrentLabel3", 10, false},
{"wallpaperCurrentLabel4", 11, false},
{"wallpaperCurrentLabel5", 12, false},
{"wallpaperCurrentLabel6", 13, false},
{"wallpaperCurrentLabel7", 14, false},
{"wallpaperCurrentLabel8", 15, false},
{"wallpaperCurrentLabel9", 16, false},
}
window:arrange_menu (frame9, left_side, x, -90)
local right_side = {
{"wallpaperPreviewAnchorLabel", 1, true},
--{"", 2},
}
window:arrange_menu (frame9, right_side, window.right_start_at, -90)
local right_side2 = {
{"WallpaperLoadTitleAnchor", 1, true},
{"LoadImage", 2},
}
window:arrange_menu (frame9, right_side2, window.right_start_at, -250)
--> wallpaper settings
@@ -6702,13 +6931,13 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow7MenuAnchorXSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow7MenuAnchorYSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow7:update_menuanchor_xy (instance)
_G.DetailsOptionsWindow7:update_menuanchor_xy (editing_instance)
--> window 8
_G.DetailsOptionsWindow8MenuAnchorXSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow8MenuAnchorYSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow8:update_menuanchor_xy (instance)
_G.DetailsOptionsWindow8:update_menuanchor_xy (editing_instance)
_G.DetailsOptionsWindow8DesaturateMenuSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow8DesaturateMenuSlider.MyObject:SetValue (editing_instance.desaturated_menu2)
+60 -23
View File
@@ -683,9 +683,14 @@ local function BGFrame_scripts (BG, baseframe, instancia)
instancia:SaveMainWindowPosition()
return
end
if (not baseframe.isLocked and button == "LeftButton") then
move_janela (baseframe, true, instancia) --> novo movedor da janela
if (BG.is_toolbar) then
if (instancia.attribute_text.enabled and instancia.attribute_text.side == 1 and instancia.toolbar_side == 1) then
instancia.menu_attribute_string:SetPoint ("bottomleft", instancia.baseframe.cabecalho.ball, "bottomright", instancia.attribute_text.anchor [1]+1, instancia.attribute_text.anchor [2]-1)
end
end
elseif (button == "RightButton") then
if (_detalhes.switch.current_instancia and _detalhes.switch.current_instancia == instancia) then
_detalhes.switch:CloseMe()
@@ -699,10 +704,16 @@ local function BGFrame_scripts (BG, baseframe, instancia)
if (baseframe.isMoving) then
move_janela (baseframe, false, instancia) --> novo movedor da janela
instancia:SaveMainWindowPosition()
if (BG.is_toolbar) then
if (instancia.attribute_text.enabled and instancia.attribute_text.side == 1 and instancia.toolbar_side == 1) then
instancia.menu_attribute_string:SetPoint ("bottomleft", instancia.baseframe.cabecalho.ball, "bottomright", instancia.attribute_text.anchor [1], instancia.attribute_text.anchor [2])
end
end
end
end)
end
function gump:RegisterForDetailsMove (frame, instancia)
frame:SetScript ("OnMouseDown", function (frame, button)
@@ -1465,8 +1476,12 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
gump:Fade (self, "ALPHA", 0)
end)
button:SetScript ("OnMouseDown", function (self)
button:SetScript ("OnMouseDown", function (self, button)
if (button ~= "LeftButton") then
return
end
if (instancia:IsSoloMode()) then
return
end
@@ -1544,7 +1559,11 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
_detalhes:SendEvent ("DETAILS_INSTANCE_STARTSTRETCH", nil, instancia)
end)
button:SetScript ("OnMouseUp", function(self)
button:SetScript ("OnMouseUp", function (self, button)
if (button ~= "LeftButton") then
return
end
if (instancia:IsSoloMode()) then
return
@@ -2314,8 +2333,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
baseframe.button_stretch:SetPoint ("bottom", baseframe, "top", 0, 20)
baseframe.button_stretch:SetPoint ("right", baseframe, "right", -27, 0)
baseframe.button_stretch:SetFrameLevel (15)
--baseframe.button_stretch:SetFrameStrata ("FULLSCREEN")
local stretch_texture = baseframe.button_stretch:CreateTexture (nil, "overlay")
stretch_texture:SetTexture (DEFAULT_SKIN)
stretch_texture:SetTexCoord (unpack (COORDS_STRETCH))
@@ -3815,6 +3833,12 @@ function _detalhes:ToolbarMenu2Buttons (_close, _instance, _reset)
end
end
if (button_config.alpha) then
button:GetNormalTexture():SetAlpha (button_config.alpha)
button:GetHighlightTexture():SetAlpha (button_config.alpha)
button:GetPushedTexture():SetAlpha (button_config.alpha)
end
lastIcon = button
button:SetParent (self.baseframe)
button:SetFrameLevel (self.baseframe.UPFrame:GetFrameLevel()+1)
@@ -4499,7 +4523,7 @@ function _detalhes:ChangeSkin (skin_name)
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
_detalhes:OpenOptionsWindow (self)
end
if (not just_updating or _detalhes.initializing) then
if (this_skin.callback) then
this_skin:callback (self, just_updating)
@@ -4519,6 +4543,22 @@ function _detalhes:ChangeSkin (skin_name)
end
function _detalhes:DelayedCheckCombatAlpha (instance)
if (UnitAffectingCombat ("player") or InCombatLockdown()) then
instance:SetWindowAlphaForCombat (true, true) --> hida a janela
else
instance:SetWindowAlphaForCombat (false) --> deshida a janela
end
end
function _detalhes:DelayedCheckOutOfCombatAlpha (instance)
if (UnitAffectingCombat ("player") or InCombatLockdown()) then
instance:SetWindowAlphaForCombat (false) --> deshida a janela
else
instance:SetWindowAlphaForCombat (true, true) --> hida a janela
end
end
function _detalhes:SetCombatAlpha (modify_type, alpha_amount, interacting)
if (interacting) then
@@ -4527,18 +4567,10 @@ function _detalhes:SetCombatAlpha (modify_type, alpha_amount, interacting)
return
elseif (self.hide_in_combat_type == 2) then --While In Combat
if (UnitAffectingCombat ("player") or InCombatLockdown()) then
self:SetWindowAlphaForCombat (true, true) --> hida a janela
else
self:SetWindowAlphaForCombat (false) --> deshida a janela
end
_detalhes:ScheduleTimer ("DelayedCheckCombatAlpha", 0.5, self)
elseif (self.hide_in_combat_type == 3) then --"While Out of Combat"
if (UnitAffectingCombat ("player") or InCombatLockdown()) then
self:SetWindowAlphaForCombat (false) --> deshida a janela
else
self:SetWindowAlphaForCombat (true, true) --> hida a janela
end
_detalhes:ScheduleTimer ("DelayedCheckOutOfCombatAlpha", 0.5, self)
elseif (self.hide_in_combat_type == 4) then --"While Out of a Group"
if (_detalhes.in_group) then
@@ -5619,6 +5651,7 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.UPFrame:SetPoint ("left", baseframe.cabecalho.ball, "right", 0, -53)
baseframe.UPFrame:SetPoint ("right", baseframe.cabecalho.ball_r, "left", 0, -53)
baseframe.UPFrame:SetHeight (20)
baseframe.UPFrame.is_toolbar = true
baseframe.UPFrame:Show()
baseframe.UPFrame:EnableMouse (true)
@@ -5635,6 +5668,8 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.UPFrameConnect:EnableMouse (true)
baseframe.UPFrameConnect:SetMovable (true)
baseframe.UPFrameConnect:SetResizable (true)
baseframe.UPFrameConnect.is_toolbar = true
BGFrame_scripts (baseframe.UPFrameConnect, baseframe, instancia)
baseframe.UPFrameLeftPart = CreateFrame ("frame", "DetailsUpFrameLeftPart"..instancia.meu_id, baseframe)
@@ -5643,6 +5678,8 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.UPFrameLeftPart:EnableMouse (true)
baseframe.UPFrameLeftPart:SetMovable (true)
baseframe.UPFrameLeftPart:SetResizable (true)
baseframe.UPFrameLeftPart.is_toolbar = true
BGFrame_scripts (baseframe.UPFrameLeftPart, baseframe, instancia)
--> anchors para os micro displays no lado de cima da janela
@@ -5684,7 +5721,7 @@ function gump:CriaCabecalho (baseframe, instancia)
--> SELEÇÃO DO MODO ----------------------------------------------------------------------------------------------------------------------------------------------------
baseframe.cabecalho.modo_selecao = gump:NewButton (baseframe, nil, "DetailsModeButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\GossipFrame\HealerGossipIcon]])
baseframe.cabecalho.modo_selecao = gump:NewButton (baseframe, nil, "DetailsModeButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\AddOns\Details\images\modo_icone]])
baseframe.cabecalho.modo_selecao:SetPoint ("bottomleft", baseframe.cabecalho.ball, "bottomright", instancia.menu_anchor [1], instancia.menu_anchor [2])
baseframe.cabecalho.modo_selecao:SetFrameLevel (baseframe:GetFrameLevel()+5)
@@ -5778,7 +5815,7 @@ function gump:CriaCabecalho (baseframe, instancia)
end)
--> SELECIONAR O SEGMENTO ----------------------------------------------------------------------------------------------------------------------------------------------------
baseframe.cabecalho.segmento = gump:NewButton (baseframe, nil, "DetailsSegmentButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\GossipFrame\TrainerGossipIcon]])
baseframe.cabecalho.segmento = gump:NewButton (baseframe, nil, "DetailsSegmentButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\AddOns\Details\images\segmentos_icone]])
baseframe.cabecalho.segmento:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1)
baseframe.cabecalho.segmento:SetHook ("OnMouseUp", function (button, buttontype)
@@ -6128,8 +6165,8 @@ function gump:CriaCabecalho (baseframe, instancia)
--> Inject
_G.GameCooltip:CoolTipInject (baseframe.cabecalho.novo)
-- ~delete ~erase
--> RESETAR HISTORICO ----------------------------------------------------------------------------------------------------------------------------------------------------
-- ~delete ~erase
--> RESETAR HISTORICO ----------------------------------------------------------------------------------------------------------------------------------------------------
baseframe.cabecalho.reset = CreateFrame ("button", "DetailsClearSegmentsButton" .. instancia.meu_id, baseframe)
baseframe.cabecalho.reset:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1)
@@ -6140,9 +6177,9 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.cabecalho.reset:SetScript ("OnEnter", reset_button_onenter)
baseframe.cabecalho.reset:SetScript ("OnLeave", reset_button_onleave)
baseframe.cabecalho.reset:SetNormalTexture ([[Interface\Addons\Details\Images\reset_button]])
baseframe.cabecalho.reset:SetHighlightTexture ([[Interface\Addons\Details\Images\reset_button]])
baseframe.cabecalho.reset:SetPushedTexture ([[Interface\Addons\Details\Images\reset_button]])
baseframe.cabecalho.reset:SetNormalTexture ([[Interface\Addons\Details\Images\reset_button2]])
baseframe.cabecalho.reset:SetHighlightTexture ([[Interface\Addons\Details\Images\reset_button2]])
baseframe.cabecalho.reset:SetPushedTexture ([[Interface\Addons\Details\Images\reset_button2]])
--> fim botão reset
+2 -2
View File
@@ -77,7 +77,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals
end
if (_detalhes.janela_report.ativa) then
_detalhes.janela_report:Flash (0.2, 0.2, 0.4, true, 0, 0)
_detalhes.janela_report:Flash (0.2, 0.2, 0.4, true, 0, 0, "NONE")
end
_detalhes.janela_report.ativa = true
@@ -175,7 +175,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals
end
if (_detalhes.janela_report.ativa) then
_detalhes.janela_report:Flash (0.2, 0.2, 0.4, true, 0, 0)
_detalhes.janela_report:Flash (0.2, 0.2, 0.4, true, 0, 0, "NONE")
end
_detalhes.janela_report.ativa = true
+2 -2
View File
@@ -140,7 +140,7 @@ function _detalhes:OpenWelcomeWindow ()
if (elapsed < 0.295) then
_detalhes.use_row_animations = true
_detalhes.update_speed = 0.05
_detalhes.update_speed = 0.2
elseif (elapsed < 0.375) then
_detalhes.use_row_animations = true
@@ -389,7 +389,7 @@ function _detalhes:OpenWelcomeWindow ()
skin_dropdown:SetPoint ("left", skin_label, "right", 2)
skin_label:SetPoint ("topleft", window, "topleft", 30, -140)
skin_dropdown:Select ("Default Skin")
--skin_dropdown:Select ("Default Skin")
--wallpapper
--> agora cria os 2 dropdown da categoria e wallpaper
+92 -33
View File
@@ -15,8 +15,8 @@ do
local gump_fundo_backdrop = {
bgFile = "Interface\\AddOns\\Details\\images\\background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = true, tileSize = 16, edgeSize = 4,
--edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = true, tileSize = 16, --edgeSize = 4,
insets = {left = 0, right = 0, top = 0, bottom = 0}}
local frame = _CreateFrame ("frame", "DetailsSwitchPanel", _UIParent)
@@ -32,6 +32,7 @@ do
function _detalhes.switch:CloseMe()
_detalhes.switch.frame:Hide()
GameCooltip:Hide()
_detalhes.switch.frame:SetBackdropColor (24/255, 24/255, 24/255, .8)
_detalhes.switch.current_instancia:StatusBarAlert (nil)
_detalhes.switch.current_instancia = nil
@@ -45,6 +46,7 @@ do
frame:Hide()
_detalhes.switch.frame = frame
_detalhes.switch.button_height = 20
end
_detalhes.switch.buttons = {}
@@ -53,7 +55,7 @@ _detalhes.switch.showing = 0
_detalhes.switch.table = _detalhes.switch.table or {}
_detalhes.switch.current_instancia = nil
_detalhes.switch.current_button = nil
_detalhes.switch.height_necessary = (30*_detalhes.switch.slots)/2
_detalhes.switch.height_necessary = (_detalhes.switch.button_height * _detalhes.switch.slots) / 2
local right_click_text = {text = Loc ["STRING_SHORTCUT_RIGHTCLICK"], size = 9, color = {.9, .9, .9}}
local right_click_texture = {[[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 14, 14, 0.0019531, 0.1484375, 0.6269531, 0.8222656}
@@ -67,15 +69,15 @@ function _detalhes.switch:ShowMe (instancia)
_detalhes.switch.current_instancia = instancia
--_detalhes.switch.frame:SetFrameLevel (instancia.baseframe:GetFrameLevel() + 5)
_detalhes.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 2, 0)
_detalhes.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", -2, 0)
_detalhes.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 0, 0)
_detalhes.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", 0, 0)
_detalhes.switch.frame:SetBackdropColor (0.094, 0.094, 0.094, .8)
local _r, _g, _b, _a = _detalhes.switch.frame:GetBackdropColor()
gump:GradientEffect (_detalhes.switch.frame, "frame", _r, _g, _b, _a, _r, _g, _b, 1, 1)
local altura = instancia.baseframe:GetHeight()
local mostrar_quantas = _math_floor (altura / 30) * 2
local mostrar_quantas = _math_floor (altura / _detalhes.switch.button_height) * 2
if (_detalhes.switch.mostrar_quantas ~= mostrar_quantas) then
for i = 1, #_detalhes.switch.buttons do
@@ -122,6 +124,7 @@ function _detalhes:FastSwitch (_this)
_detalhes:MontaAtributosOption (_detalhes.switch.current_instancia, _detalhes.switch.Config)
GameCooltip:SetColor (1, {.1, .1, .1, .3})
GameCooltip:SetColor (2, {.1, .1, .1, .3})
GameCooltip:SetOption ("HeightAnchorMod", -7)
GameCooltip:ShowCooltip()
else --> botão esquerdo
@@ -162,7 +165,7 @@ function _detalhes.switch:Update()
local slots = _detalhes.switch.slots
local x = 10
local y = 10
local y = 5
local jump = false
for i = 1, slots do
@@ -229,7 +232,7 @@ function _detalhes.switch:Update()
if (jump) then
x = x - 125
y = y + 30
y = y + _detalhes.switch.button_height
jump = false
else
x = x + 125
@@ -241,8 +244,8 @@ end
function _detalhes.switch:Resize()
local x = 10
local y = 10
local x = 7
local y = 5
local xPlus = (_detalhes.switch.current_instancia:GetSize()/2)-5
local frame = _detalhes.switch.frame
@@ -258,7 +261,7 @@ function _detalhes.switch:Resize()
button.line:SetWidth (xPlus - 15)
button.line2:SetWidth (xPlus - 15)
x = x - xPlus
y = y + 30
y = y + _detalhes.switch.button_height
jump = false
else
button:SetPoint ("topleft", frame, "topleft", x, -y)
@@ -277,6 +280,45 @@ function _detalhes.switch:Resize()
end
end
local onenter = function (self)
self.texto:SetTextColor (1, 1, 1, 1)
self.border:SetBlendMode ("ADD")
GameCooltip:Hide()
end
local onleave = function (self)
self.texto:SetTextColor (.8, .8, .8, 1)
self.border:SetBlendMode ("BLEND")
end
local oniconenter = function (self)
if (GameCooltip:IsMenu()) then
return
end
GameCooltip:Reset()
_detalhes:CooltipPreset (1)
GameCooltip:AddLine ("select attribute")
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 14, 0.0019531, 0.1484375, 0.6269531, 0.8222656)
GameCooltip:SetOwner (self)
GameCooltip:SetType ("tooltip")
GameCooltip:SetOption ("TextSize", 10)
GameCooltip:SetOption ("ButtonsYMod", 0)
GameCooltip:SetOption ("YSpacingMod", 0)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
GameCooltip:Show()
end
local oniconleave = function (self)
if (GameCooltip:IsTooltip()) then
GameCooltip:Hide()
end
end
function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
local paramTable = {
@@ -286,56 +328,73 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
["sub_atributo"] = nil
}
--botao dentro da caixa
local button = gump:NewDetailsButton (frame, frame, _, _detalhes.FastSwitch, nil, paramTable, 15, 15, "", "", "", "",
{rightFunc = {func = _detalhes.FastSwitch, param1 = nil, param2 = {atributo = nil, button = index}}, OnGrab = "PassClick"}, "DetailsSwitchPanelButton_1_"..index)
button:SetPoint ("topleft", frame, "topleft", x, -y)
button.rightButton = rightButton
button.fundo = button:CreateTexture (nil, "background")
button.MouseOnEnterHook = oniconenter
button.MouseOnLeaveHook = oniconleave
--borda
button.fundo = button:CreateTexture (nil, "overlay")
button.fundo:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
button.fundo:SetTexCoord (0.00390625, 0.27734375, 0.44140625,0.69531250)
button.fundo:SetWidth (34)
button.fundo:SetHeight (32)
button.fundo:SetPoint ("topleft", button, "topleft", -9, 9)
button.fundo:SetWidth (26)
button.fundo:SetHeight (24)
button.fundo:SetPoint ("topleft", button, "topleft", -5, 5)
--fundo marrom
local fundo_x = -3
local fundo_y = -5
button.line = button:CreateTexture (nil, "background")
button.line:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
button.line:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
button.line:SetWidth (85)
button.line:SetHeight (25)
button.line:SetPoint ("left", button, "right", 0, -3)
button.line:SetPoint ("topleft", button, "topright", fundo_x, 0)
button.line:SetPoint ("bottomleft", button, "bottomright", fundo_x, fundo_y)
--fundo marrom 2
button.line2 = button:CreateTexture (nil, "background")
button.line2:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
button.line2:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
button.line2:SetWidth (85)
button.line2:SetHeight (25)
button.line2:SetPoint ("left", button, "right", 0, -3)
button.line2:SetPoint ("topleft", button, "topright", fundo_x, 0)
button.line2:SetPoint ("bottomleft", button, "bottomright", fundo_x, fundo_y)
--botao do fundo marrom
local button2 = gump:NewDetailsButton (button, button, _, _detalhes.FastSwitch, nil, paramTable, 1, 1, button.line, "", "", button.line2,
{rightFunc = {func = _detalhes.switch.CloseMe, param1 = nil, param2 = nil}, OnGrab = "PassClick"}, "DetailsSwitchPanelButton_2_"..index)
button2:SetPoint ("topleft", button, "topright", 1, 0)
button2:SetPoint ("bottomright", button, "bottomright", 90, 0)
button.button2 = button2
button.textureNormal = frame:CreateTexture (nil, "overlay")
button.textureNormal:SetWidth (15)
button.textureNormal:SetHeight (15)
button.textureNormal:SetPoint ("topleft", frame, "topleft", x, -y)
--icone
button.textureNormal = button:CreateTexture (nil, "background")
button.textureNormal:SetAllPoints (button)
button.texturePushed = frame:CreateTexture (nil, "overlay")
button.texturePushed:SetWidth (15)
button.texturePushed:SetHeight (15)
button.texturePushed:SetPoint ("topleft", frame, "topleft", x, -y)
button.textureH = frame:CreateTexture (nil, "overlay")
button.textureH:SetWidth (15)
button.textureH:SetHeight (15)
button.textureH:SetPoint ("topleft", frame, "topleft", x, -y)
--icone pushed
button.texturePushed = button:CreateTexture (nil, "background")
button.texturePushed:SetAllPoints (button)
--highlight
button.textureH = button:CreateTexture (nil, "background")
button.textureH:SetAllPoints (button)
--texto do atributo
gump:NewLabel (button2, button2, nil, "texto", "", "GameFontHighlightSmall")
button2.texto:SetPoint ("left", button, "right", 4, -1)
button2.texto:SetPoint ("left", button, "right", 5, -1)
button2.texto:SetNonSpaceWrap (true)
button2.texto:SetTextColor (.8, .8, .8, 1)
button2.button1_icon = button.textureNormal
button2.button1_icon2 = button.texturePushed
button2.button1_icon3 = button.textureH
button2.border = button.fundo
button2.MouseOnEnterHook = onenter
button2.MouseOnLeaveHook = onleave
_detalhes.switch.buttons [index] = button
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.