updates
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
_detalhes.userversion = "v1.12.00"
|
||||
_detalhes.userversion = "v1.12.3"
|
||||
_detalhes.version = "Alpha 016"
|
||||
_detalhes.realversion = 16
|
||||
|
||||
@@ -204,6 +204,7 @@ do
|
||||
SharedMedia:Register ("statusbar", "Details D'ictum", [[Interface\AddOns\Details\images\bar4]])
|
||||
SharedMedia:Register ("statusbar", "Details D'ictum (reverse)", [[Interface\AddOns\Details\images\bar4_reverse]])
|
||||
SharedMedia:Register ("statusbar", "Details Serenity", [[Interface\AddOns\Details\images\bar_serenity]])
|
||||
SharedMedia:Register ("background", "Details Ground", [[Interface\AddOns\Details\images\background]])
|
||||
|
||||
--> global 'vardump' for dump table contents over chat panel
|
||||
function vardump (t)
|
||||
|
||||
@@ -796,7 +796,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
conteudo = _detalhes.cache_damage_group
|
||||
|
||||
if (sub_atributo == 2) then
|
||||
if (sub_atributo == 2) then --> dps
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
|
||||
end
|
||||
@@ -818,7 +818,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
total = total + conteudo[i][keyName]
|
||||
end
|
||||
else
|
||||
if (sub_atributo == 2) then
|
||||
if (sub_atributo == 2) then --> dps
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
atributo_damage:ContainerRefreshDps (conteudo, combat_time)
|
||||
end
|
||||
@@ -1137,11 +1137,11 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
elseif (sub_atributo == 2) then --> mostrando dps
|
||||
dps = _math_floor (dps)
|
||||
if (_detalhes.ps_abbreviation == 2) then
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (dps) .. " " .. div_abre .. _detalhes:ToK (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
elseif (_detalhes.ps_abbreviation == 3) then
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK2 (dps) .. " " .. div_abre .. _detalhes:ToK (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
elseif (_detalhes.ps_abbreviation == 3) then
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK2 (dps) .. " " .. div_abre .. _detalhes:ToK2 (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
else
|
||||
esta_barra.texto_direita:SetText (_cstr ("%.1f", dps) .. " " .. div_abre .. _detalhes:ToK (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK2 (dps) .. " " .. div_abre .. damage_total .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
|
||||
end
|
||||
esta_porcentagem = _math_floor ((dps/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
@@ -1387,6 +1387,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
||||
do
|
||||
--> TOP HABILIDADES
|
||||
local ActorDamage = self.total_without_pet
|
||||
local ActorDamageWithPet = self.total
|
||||
if (ActorDamage == 0) then
|
||||
ActorDamage = 0.00000001
|
||||
end
|
||||
@@ -1452,7 +1453,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
|
||||
|
||||
for i = 1, _math_min (_detalhes.tooltip_max_targets, #ActorTargetsSortTable) do
|
||||
local este_inimigo = ActorTargetsSortTable [i]
|
||||
GameCooltip:AddLine (este_inimigo[1]..": ", _detalhes:comma_value (este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamage*100).."%)")
|
||||
GameCooltip:AddLine (este_inimigo[1]..": ", _detalhes:comma_value (este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
|
||||
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .2)
|
||||
end
|
||||
|
||||
+32
-4
@@ -152,6 +152,24 @@ function _detalhes:ContainerSortHeal (container, amount, keyName2)
|
||||
end
|
||||
end
|
||||
|
||||
function atributo_heal:ContainerRefreshHps (container, combat_time)
|
||||
|
||||
if (_detalhes.time_type == 2 or not _detalhes:CaptureGet ("heal")) then
|
||||
for _, actor in _ipairs (container) do
|
||||
if (actor.grupo) then
|
||||
actor.last_hps = actor.total / combat_time
|
||||
else
|
||||
actor.last_hps = actor.total / actor:Tempo()
|
||||
end
|
||||
end
|
||||
else
|
||||
for _, actor in _ipairs (container) do
|
||||
actor.last_hps = actor.total / actor:Tempo()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function atributo_heal:ReportSingleDamagePreventedLine (actor, instancia)
|
||||
local barra = instancia.barras [actor.minha_barra]
|
||||
|
||||
@@ -256,6 +274,11 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
|
||||
conteudo = _detalhes.cache_healing_group
|
||||
|
||||
if (sub_atributo == 2) then --> hps
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
atributo_heal:ContainerRefreshHps (conteudo, combat_time)
|
||||
end
|
||||
|
||||
if (#conteudo < 1) then
|
||||
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing)
|
||||
end
|
||||
@@ -268,11 +291,16 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
instancia.top = conteudo[1][keyName]
|
||||
amount = #conteudo
|
||||
end
|
||||
|
||||
|
||||
for i = 1, amount do
|
||||
total = total + conteudo[i][keyName]
|
||||
end
|
||||
|
||||
else
|
||||
if (sub_atributo == 2) then --> hps
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
atributo_heal:ContainerRefreshHps (conteudo, combat_time)
|
||||
end
|
||||
--_table_sort (conteudo, _detalhes.SortKeyGroup)
|
||||
_detalhes.SortGroupHeal (conteudo, keyName)
|
||||
end
|
||||
@@ -538,11 +566,11 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
|
||||
hps = _math_floor (hps)
|
||||
if (_detalhes.ps_abbreviation == 2) then
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (hps) .." ".. div_abre .. _detalhes:ToK (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
|
||||
elseif (_detalhes.ps_abbreviation == 2) then
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK2 (hps) .." ".. div_abre .. _detalhes:ToK (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
|
||||
elseif (_detalhes.ps_abbreviation == 3) then
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK2 (hps) .." ".. div_abre .. _detalhes:ToK2 (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
|
||||
else
|
||||
esta_barra.texto_direita:SetText (_cstr("%.1f", hps) .." ".. div_abre .. _detalhes:ToK (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK2 (hps) .." ".. div_abre .. healing_total .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
|
||||
end
|
||||
esta_porcentagem = _math_floor ((hps/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
|
||||
@@ -95,6 +95,18 @@ function _detalhes:GetLowerInstanceNumber()
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:IsLowerInstance()
|
||||
local lower = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower) then
|
||||
return lower == self.meu_id
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function _detalhes:IsInteracting()
|
||||
return self.is_interacting
|
||||
end
|
||||
|
||||
function _detalhes:GetMode()
|
||||
return self.modo
|
||||
end
|
||||
@@ -296,6 +308,8 @@ end
|
||||
gump:Fade (self.baseframe.cabecalho.ball, 0)
|
||||
gump:Fade (self.baseframe, 0)
|
||||
|
||||
self:SetMenuAlpha()
|
||||
|
||||
self.baseframe.cabecalho.fechar:Enable()
|
||||
|
||||
self:ChangeIcon()
|
||||
@@ -720,6 +734,18 @@ end
|
||||
|
||||
--> setup all config
|
||||
new_instance:ResetInstanceConfig()
|
||||
--> setup default wallpaper
|
||||
local spec = GetSpecialization()
|
||||
if (spec) then
|
||||
local id, name, description, icon, _background, role = GetSpecializationInfo (spec)
|
||||
if (_background) then
|
||||
local bg = "Interface\\TALENTFRAME\\" .. _background
|
||||
if (new_instance.wallpaper) then
|
||||
new_instance.wallpaper.texture = bg
|
||||
new_instance.wallpaper.texcoord = {0, 1, 0, 0.703125}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> internal stuff
|
||||
new_instance.barras = {} --container que irá armazenar todas as barras
|
||||
@@ -791,6 +817,7 @@ end
|
||||
--> internal stuff
|
||||
new_instance.row_height = new_instance.row_info.height + new_instance.row_info.space.between
|
||||
|
||||
new_instance.oldwith = new_instance.baseframe:GetWidth()
|
||||
new_instance.iniciada = true
|
||||
new_instance:SaveMainWindowPosition()
|
||||
new_instance:ReajustaGump()
|
||||
@@ -943,6 +970,7 @@ function _detalhes:RestauraJanela (index, temp)
|
||||
end
|
||||
|
||||
--> internal stuff
|
||||
self.oldwith = self.baseframe:GetWidth()
|
||||
self:RestoreMainWindowPosition()
|
||||
self:ReajustaGump()
|
||||
self:SaveMainWindowPosition()
|
||||
@@ -967,7 +995,7 @@ function _detalhes:ExportSkin()
|
||||
}
|
||||
|
||||
for key, value in pairs (self) do
|
||||
if (_detalhes.instance_defaults [key]) then
|
||||
if (_detalhes.instance_defaults [key] ~= nil) then
|
||||
if (type (value) == "table") then
|
||||
exported [key] = table_deepcopy (value)
|
||||
else
|
||||
@@ -1051,8 +1079,8 @@ function _detalhes:SetBackgroundAlpha (alpha)
|
||||
-- alpha = _detalhes:Scale (0, 1, 0.2, 1, alpha) - 0.8
|
||||
end
|
||||
|
||||
self.bgdisplay:SetBackdropColor (self.bg_r or _detalhes.default_bg_color, self.bg_g or _detalhes.default_bg_color, self.bg_b or _detalhes.default_bg_color, alpha)
|
||||
self.baseframe:SetBackdropColor (self.bg_r or _detalhes.default_bg_color, self.bg_g or _detalhes.default_bg_color, self.bg_b or _detalhes.default_bg_color, alpha)
|
||||
self.bgdisplay:SetBackdropColor (self.bg_r, self.bg_g, self.bg_b, alpha)
|
||||
self.baseframe:SetBackdropColor (self.bg_r, self.bg_g, self.bg_b, alpha)
|
||||
self.bg_alpha = alpha
|
||||
end
|
||||
|
||||
|
||||
@@ -35,17 +35,19 @@ _detalhes.instance_defaults = {
|
||||
|
||||
--skin
|
||||
skin = "Default Skin",
|
||||
--baseframe backdrop color
|
||||
--baseframe backdrop
|
||||
bg_alpha = 0.7,
|
||||
bg_r = 0.0941,
|
||||
bg_g = 0.0941,
|
||||
bg_b = 0.0941,
|
||||
backdrop_texture = "Details Ground",
|
||||
--auto current
|
||||
auto_current = true,
|
||||
--show sidebars
|
||||
show_sidebars = true,
|
||||
--show bottom statusbar
|
||||
show_statusbar = true,
|
||||
statusbar_info = {alpha = 1, overlay = {1, 1, 1}},
|
||||
--blackwhiite icons
|
||||
desaturated_menu = false,
|
||||
--hide main window attribute icon
|
||||
@@ -66,13 +68,20 @@ _detalhes.instance_defaults = {
|
||||
instancebutton_info = {text_color = {1, 0.82, 0, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}},
|
||||
--close button info
|
||||
closebutton_info = {color_overlay = {1, 1, 1, 1}},
|
||||
--menu anchor store the anchor point of main menu
|
||||
menu_anchor = {5, 1},
|
||||
--menus:
|
||||
--anchor store the anchor point of main menu
|
||||
menu_anchor = {5, 1, side = 1},
|
||||
--auto hide window borders
|
||||
menu_alpha = {enabled = false, iconstoo = true, onenter = 1, onleave = 1},
|
||||
--auto hide menu
|
||||
auto_hide_menu = {left = false, right = false},
|
||||
--attribute text
|
||||
attribute_text = {enabled = false, anchor = {5, 1}, text_face = "Friz Quadrata TT", text_size = 12, text_color = {1, 1, 1, 1}, side = 1},
|
||||
--instance button anchor store the anchor point of instance and delete button
|
||||
instance_button_anchor = {-27, 1},
|
||||
--total bar
|
||||
total_bar = {enabled = false, color = {1, 1, 1}, only_in_group = true, icon = [[Interface\ICONS\INV_Sigil_Thorim]]},
|
||||
|
||||
|
||||
--row info
|
||||
row_info = {
|
||||
--if true the texture of the bars will have the color of his actor class
|
||||
@@ -117,10 +126,13 @@ _detalhes.instance_defaults = {
|
||||
space = {left = 3, right = -5, between = 1},
|
||||
--icon file
|
||||
icon_file = [[Interface\AddOns\Details\images\classes_small]],
|
||||
no_icon = false,
|
||||
start_after_icon = true,
|
||||
|
||||
},
|
||||
--instance window color
|
||||
color = {1, 1, 1, 1},
|
||||
color_buttons = {1, 1, 1, 1},
|
||||
--hide in combat
|
||||
hide_in_combat = false,
|
||||
hide_in_combat_alpha = 0,
|
||||
|
||||
+2
-2
@@ -320,7 +320,7 @@
|
||||
for index, instancia in ipairs (_detalhes.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
if (instancia.hide_in_combat) then
|
||||
instancia:SetWindowAlpha (instancia.hide_in_combat_alpha / 100)
|
||||
instancia:SetWindowAlphaForCombat (true)
|
||||
end
|
||||
|
||||
if (instancia.auto_switch_to) then
|
||||
@@ -569,7 +569,7 @@
|
||||
for index, instancia in ipairs (_detalhes.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
if (instancia.hide_in_combat) then
|
||||
instancia:SetWindowAlpha (1, true)
|
||||
instancia:SetWindowAlphaForCombat (false)
|
||||
end
|
||||
if (instancia.auto_switch_to_old) then
|
||||
instancia:SwitchBack()
|
||||
|
||||
@@ -556,6 +556,8 @@
|
||||
esta_instancia.consolidateButtonTexture = nil
|
||||
esta_instancia.consolidateButton = nil
|
||||
esta_instancia.lastIcon = nil
|
||||
|
||||
esta_instancia.menu_attribute_string = nil
|
||||
|
||||
end
|
||||
|
||||
|
||||
+5
-2
@@ -2790,10 +2790,10 @@
|
||||
end
|
||||
|
||||
--if (UnitName ("player") == "Tiranaa" or UnitName ("player") == "Triciclo") then
|
||||
|
||||
_detalhes:SaveConfig()
|
||||
|
||||
_detalhes:SaveProfile()
|
||||
|
||||
_detalhes_database.nick_tag_cache = table_deepcopy (_detalhes_database.nick_tag_cache)
|
||||
|
||||
--_detalhes_global = nil
|
||||
--_detalhes_database = nil
|
||||
@@ -2845,6 +2845,9 @@
|
||||
_detalhes.listener:SetScript ("OnEvent", _detalhes.OnEvent)
|
||||
|
||||
function _detalhes:OnParserEvent (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...)
|
||||
|
||||
--print (alvo_name, alvo_flags2)
|
||||
|
||||
local funcao = token_list [token]
|
||||
if (funcao) then
|
||||
return funcao (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, ... )
|
||||
|
||||
@@ -167,6 +167,9 @@
|
||||
Frame:RegisterEvent ("ADDON_LOADED")
|
||||
Frame:RegisterEvent ("PLAYER_LOGOUT")
|
||||
Frame:SetScript ("OnEvent", function(event, ...) return NewPlugin:OnEvent (event, ...) end)
|
||||
|
||||
Frame:SetFrameStrata ("HIGH")
|
||||
Frame:SetFrameLevel (6)
|
||||
|
||||
Frame:Hide()
|
||||
Frame.__parent = NewPlugin
|
||||
|
||||
@@ -293,7 +293,8 @@
|
||||
|
||||
--> build-in function for create a frame for an plugin child
|
||||
function _detalhes.StatusBar:CreateChildFrame (instance, name, w, h)
|
||||
local frame = _detalhes.gump:NewPanel (instance.baseframe.cabecalho.fechar, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false)
|
||||
--local frame = _detalhes.gump:NewPanel (instance.baseframe.cabecalho.fechar, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false)
|
||||
local frame = _detalhes.gump:NewPanel (instance.baseframe.DOWNFrame, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false)
|
||||
|
||||
--create widgets
|
||||
local text = _detalhes.gump:NewLabel (frame, nil, "$parentText", "text", "0")
|
||||
|
||||
@@ -57,8 +57,6 @@
|
||||
|
||||
_detalhes.ToolBar.AllButtons [#_detalhes.ToolBar.AllButtons+1] = button
|
||||
|
||||
|
||||
|
||||
return button
|
||||
end
|
||||
|
||||
@@ -171,7 +169,8 @@
|
||||
|
||||
_detalhes:RegisterEvent (_detalhes.ToolBar, "DETAILS_INSTANCE_OPEN", "OnInstanceOpen")
|
||||
_detalhes:RegisterEvent (_detalhes.ToolBar, "DETAILS_INSTANCE_CLOSE", "OnInstanceClose")
|
||||
_detalhes.ToolBar.Enabled = true --> must have this member or will not receive the event
|
||||
_detalhes.ToolBar.Enabled = true --> must have this member or wont receive the event
|
||||
_detalhes.ToolBar.__enabled = true
|
||||
|
||||
function _detalhes.ToolBar:OnInstanceOpen()
|
||||
_detalhes.ToolBar:ReorganizeIcons()
|
||||
@@ -194,10 +193,6 @@
|
||||
|
||||
local instance = _detalhes:GetInstance (lower_instance)
|
||||
|
||||
if (just_refresh) then
|
||||
|
||||
end
|
||||
|
||||
_detalhes:ResetButtonSnapTo (instance)
|
||||
_detalhes.ResetButtonInstance = lower_instance
|
||||
|
||||
@@ -206,6 +201,7 @@
|
||||
local LastIcon
|
||||
|
||||
local x = 0
|
||||
local to_alpha = instance:GetInstanceIconsCurrentAlpha()
|
||||
|
||||
if (instance.plugins_grow_direction == 2) then --> right direction
|
||||
|
||||
@@ -228,7 +224,10 @@
|
||||
else
|
||||
ThisButton:SetPoint ("left", LastIcon, "right", ThisButton.x + x, ThisButton.y)
|
||||
end
|
||||
|
||||
ThisButton:Show()
|
||||
ThisButton:SetAlpha (to_alpha)
|
||||
|
||||
LastIcon = ThisButton
|
||||
end
|
||||
|
||||
@@ -245,12 +244,14 @@
|
||||
ThisButton:SetParent (instance.baseframe.UPFrame)
|
||||
|
||||
ThisButton:SetPoint ("right", LastIcon, "left", ThisButton.x + x, ThisButton.y)
|
||||
|
||||
ThisButton:Show()
|
||||
ThisButton:SetAlpha (to_alpha)
|
||||
|
||||
LastIcon = ThisButton
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
if (not just_refresh) then
|
||||
@@ -261,6 +262,8 @@
|
||||
end
|
||||
|
||||
instance:ChangeSkin()
|
||||
else
|
||||
instance:SetMenuAlpha()
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
+205
-16
@@ -141,23 +141,62 @@
|
||||
self = instance
|
||||
end
|
||||
|
||||
local xOfs, yOfs = self.baseframe:GetCenter()
|
||||
local mostrando = self.mostrando
|
||||
|
||||
local baseframe_width = math.floor (self.baseframe:GetWidth())
|
||||
local baseframe_height = math.floor (self.baseframe:GetHeight())
|
||||
|
||||
if (not baseframe_width) then
|
||||
return _detalhes:ScheduleTimer ("SaveMainWindowPosition", 1, self)
|
||||
end
|
||||
|
||||
--[[
|
||||
if (baseframe_width % 2 ~= 0) then
|
||||
if (self.posicao[mostrando].w > baseframe_width) then
|
||||
baseframe_width = baseframe_width +1
|
||||
else
|
||||
baseframe_width = baseframe_width -1
|
||||
end
|
||||
end
|
||||
self.baseframe:SetWidth (baseframe_width)
|
||||
if (baseframe_height % 2 ~= 0) then
|
||||
if (self.posicao[mostrando].h > baseframe_height) then
|
||||
baseframe_height = baseframe_height +1
|
||||
else
|
||||
baseframe_height = baseframe_height -1
|
||||
end
|
||||
end
|
||||
self.baseframe:SetHeight (baseframe_height)
|
||||
--]]
|
||||
|
||||
local xOfs, yOfs = self.baseframe:GetCenter()
|
||||
|
||||
if (not xOfs) then
|
||||
--> this is a small and unknow bug when resizing all windows throgh crtl key (all) the last window of a horizontal row can't 'GetCenter'.
|
||||
--> so, the trick is we start a timer to save pos later.
|
||||
return _detalhes:ScheduleTimer ("SaveMainWindowPosition", 1, self)
|
||||
end
|
||||
|
||||
--xOfs = math.floor (xOfs)
|
||||
--yOfs = math.floor (yOfs)
|
||||
|
||||
if (xOfs % 2 ~= 0) then
|
||||
--xOfs = xOfs -1
|
||||
end
|
||||
if (yOfs % 2 ~= 0) then
|
||||
--yOfs = yOfs -1
|
||||
end
|
||||
|
||||
local q, w = self.baseframe:GetCenter()
|
||||
|
||||
local _scale = self.baseframe:GetEffectiveScale()
|
||||
local _UIscale = _UIParent:GetScale()
|
||||
local mostrando = self.mostrando
|
||||
|
||||
xOfs = xOfs*_scale - _GetScreenWidth()*_UIscale/2
|
||||
yOfs = yOfs*_scale - _GetScreenHeight()*_UIscale/2
|
||||
|
||||
local _w = self.baseframe:GetWidth()
|
||||
local _h = self.baseframe:GetHeight()
|
||||
local _w = baseframe_width
|
||||
local _h = baseframe_height
|
||||
local _x = xOfs/_UIscale
|
||||
local _y = yOfs/_UIscale
|
||||
|
||||
@@ -267,10 +306,18 @@
|
||||
if (self.baseframe:GetWidth() < 215 or self.resetbutton_info.always_small) then
|
||||
gump:Fade (_detalhes.ResetButton, 1)
|
||||
gump:Fade (_detalhes.ResetButton2, 0)
|
||||
|
||||
local alpha = self:GetInstanceCurrentAlpha()
|
||||
_detalhes.ResetButton2:SetAlpha (alpha)
|
||||
|
||||
_detalhes.ResetButtonMode = 2
|
||||
else
|
||||
gump:Fade (_detalhes.ResetButton, 0)
|
||||
gump:Fade (_detalhes.ResetButton2, 1)
|
||||
|
||||
local alpha = self:GetInstanceCurrentAlpha()
|
||||
_detalhes.ResetButton2:SetAlpha (alpha)
|
||||
|
||||
_detalhes.ResetButtonMode = 1
|
||||
end
|
||||
end
|
||||
@@ -405,14 +452,16 @@
|
||||
end
|
||||
|
||||
for index = T+1, C do
|
||||
if (index <= X) then
|
||||
gump:Fade (self.barras[index], "out")
|
||||
else
|
||||
--gump:Fade (self.barras[index], "in")
|
||||
if (self.baseframe.isStretching or self.auto_resize) then
|
||||
gump:Fade (self.barras[index], 1)
|
||||
local barra = self.barras[index]
|
||||
if (barra) then
|
||||
if (index <= X) then
|
||||
gump:Fade (barra, "out")
|
||||
else
|
||||
gump:Fade (self.barras[index], "in", 0.1)
|
||||
if (self.baseframe.isStretching or self.auto_resize) then
|
||||
gump:Fade (barra, 1)
|
||||
else
|
||||
gump:Fade (barra, "in", 0.1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -436,11 +485,13 @@
|
||||
self.barraS[2] = fim_iterator
|
||||
|
||||
for index = T, C+1, -1 do
|
||||
--gump:Fade (self.barras[index], "in")
|
||||
if (self.baseframe.isStretching or self.auto_resize) then
|
||||
gump:Fade (self.barras[index], 1)
|
||||
else
|
||||
gump:Fade (self.barras[index], "in", 0.1)
|
||||
local barra = self.barras[index]
|
||||
if (barra) then
|
||||
if (self.baseframe.isStretching or self.auto_resize) then
|
||||
gump:Fade (barra, 1)
|
||||
else
|
||||
gump:Fade (barra, "in", 0.1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -663,3 +714,141 @@
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
--> create bubble
|
||||
local f = CreateFrame ("frame", "DetailsBubble", UIParent)
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetSize (100, 100)
|
||||
f:SetFrameStrata ("TOOLTIP")
|
||||
f.isHorizontalFlipped = false
|
||||
f.isVerticalFlipped = false
|
||||
|
||||
local t = f:CreateTexture (nil, "artwork")
|
||||
t:SetTexture ([[Interface\AddOns\Details\images\icons]])
|
||||
t:SetSize (131 * 1.2, 81 * 1.2)
|
||||
--377 328 508 409 0.0009765625
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
|
||||
t:SetPoint ("center", f, "center")
|
||||
|
||||
local line1 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line1:SetPoint ("topleft", t, "topleft", 24, -10)
|
||||
_detalhes:SetFontSize (line1, 9)
|
||||
line1:SetTextColor (.9, .9, .9, 1)
|
||||
line1:SetSize (110, 12)
|
||||
line1:SetJustifyV ("center")
|
||||
line1:SetJustifyH ("center")
|
||||
|
||||
local line2 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line2:SetPoint ("topleft", t, "topleft", 11, -20)
|
||||
_detalhes:SetFontSize (line2, 9)
|
||||
line2:SetTextColor (.9, .9, .9, 1)
|
||||
line2:SetSize (140, 12)
|
||||
line2:SetJustifyV ("center")
|
||||
line2:SetJustifyH ("center")
|
||||
|
||||
local line3 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line3:SetPoint ("topleft", t, "topleft", 7, -30)
|
||||
_detalhes:SetFontSize (line3, 9)
|
||||
line3:SetTextColor (.9, .9, .9, 1)
|
||||
line3:SetSize (144, 12)
|
||||
line3:SetJustifyV ("center")
|
||||
line3:SetJustifyH ("center")
|
||||
|
||||
local line4 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line4:SetPoint ("topleft", t, "topleft", 11, -40)
|
||||
_detalhes:SetFontSize (line4, 9)
|
||||
line4:SetTextColor (.9, .9, .9, 1)
|
||||
line4:SetSize (140, 12)
|
||||
line4:SetJustifyV ("center")
|
||||
line4:SetJustifyH ("center")
|
||||
|
||||
local line5 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line5:SetPoint ("topleft", t, "topleft", 24, -50)
|
||||
_detalhes:SetFontSize (line5, 9)
|
||||
line5:SetTextColor (.9, .9, .9, 1)
|
||||
line5:SetSize (110, 12)
|
||||
line5:SetJustifyV ("center")
|
||||
line5:SetJustifyH ("center")
|
||||
|
||||
f.lines = {line1, line2, line3, line4, line5}
|
||||
|
||||
--t:SetPoint ("center", UIParent, "center")
|
||||
|
||||
function f:FlipHorizontal()
|
||||
if (not f.isHorizontalFlipped) then
|
||||
if (f.isVerticalFlipped) then
|
||||
t:SetTexCoord (0.9912109375, 0.7373046875, 0.7978515625, 0.6416015625)
|
||||
else
|
||||
t:SetTexCoord (0.9912109375, 0.7373046875, 0.6416015625, 0.7978515625)
|
||||
end
|
||||
f.isHorizontalFlipped = true
|
||||
else
|
||||
if (f.isVerticalFlipped) then
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.7978515625, 0.6416015625)
|
||||
else
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
|
||||
end
|
||||
f.isHorizontalFlipped = false
|
||||
end
|
||||
end
|
||||
|
||||
function f:FlipVertical()
|
||||
|
||||
if (not f.isVerticalFlipped) then
|
||||
if (f.isHorizontalFlipped) then
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.7978515625, 0.6416015625)
|
||||
else
|
||||
t:SetTexCoord (0.9912109375, 0.7373046875, 0.7978515625, 0.6416015625)
|
||||
end
|
||||
f.isVerticalFlipped = true
|
||||
else
|
||||
if (f.isHorizontalFlipped) then
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
|
||||
else
|
||||
t:SetTexCoord (0.9912109375, 0.7373046875, 0.6416015625, 0.7978515625)
|
||||
end
|
||||
f.isVerticalFlipped = false
|
||||
end
|
||||
end
|
||||
|
||||
function f:SetBubbleText (line1, line2, line3, line4, line5)
|
||||
if (not line1) then
|
||||
for _, line in ipairs (f.lines) do
|
||||
line:SetText ("")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if (line1:find ("\n")) then
|
||||
line1, line2, line3, line4, line5 = strsplit ("\n", line1)
|
||||
end
|
||||
|
||||
f.lines[1]:SetText (line1)
|
||||
f.lines[2]:SetText (line2)
|
||||
f.lines[3]:SetText (line3)
|
||||
f.lines[4]:SetText (line4)
|
||||
f.lines[5]:SetText (line5)
|
||||
end
|
||||
|
||||
function f:SetOwner (frame, myPoint, hisPoint, x, y, alpha)
|
||||
f:ClearAllPoints()
|
||||
f:SetBubbleText (nil)
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
|
||||
f.isHorizontalFlipped = false
|
||||
f.isVerticalFlipped = false
|
||||
f:SetPoint (myPoint or "bottom", frame, hisPoint or "top", x or 0, y or 0)
|
||||
t:SetAlpha (alpha or 1)
|
||||
end
|
||||
|
||||
function f:ShowBubble()
|
||||
f:Show()
|
||||
end
|
||||
|
||||
function f:HideBubble()
|
||||
f:Hide()
|
||||
end
|
||||
|
||||
f:SetBubbleText (nil)
|
||||
|
||||
f:Hide()
|
||||
@@ -761,12 +761,17 @@ local set_colorpick_color = function (button, r, g, b, a)
|
||||
button.color_texture:SetVertexColor (r, g, b, a)
|
||||
end
|
||||
|
||||
local colorpick_cancel = function (self)
|
||||
ColorPickerFrame:Hide()
|
||||
end
|
||||
|
||||
function gump:NewColorPickButton (parent, name, member, callback, alpha)
|
||||
|
||||
--button
|
||||
local button = gump:NewButton (parent, _, name, member, color_button_width, color_button_height, pickcolor, alpha, "param2")
|
||||
button:InstallCustomTexture()
|
||||
button.color_callback = callback
|
||||
button.Cancel = colorpick_cancel
|
||||
button.SetColor = set_colorpick_color
|
||||
|
||||
button:SetBackdrop ({edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], edgeSize = 6,
|
||||
|
||||
+79
-33
@@ -2,6 +2,7 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local AceLocale = LibStub ("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
|
||||
|
||||
local gump = _detalhes.gump
|
||||
local _
|
||||
@@ -86,6 +87,7 @@ function DetailsCreateCoolTip()
|
||||
["StatusBarTexture"] = true,
|
||||
["TextSize"] = true,
|
||||
["TextFont"] = true,
|
||||
["TextColor"] = true,
|
||||
["LeftTextWidth"] = true,
|
||||
["RightTextWidth"] = true,
|
||||
["LeftTextHeight"] = true,
|
||||
@@ -126,6 +128,7 @@ function DetailsCreateCoolTip()
|
||||
["StatusBarTexture"] = nil,
|
||||
["TextSize"] = nil,
|
||||
["TextFont"] = nil,
|
||||
["TextColor"] = nil,
|
||||
["LeftTextWidth"] = nil,
|
||||
["RightTextWidth"] = nil,
|
||||
["LeftTextHeight"] = nil,
|
||||
@@ -592,7 +595,7 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
function CoolTip:TextAndIcon (index, frame, menuButton, leftTextTable, rightTextTable, leftIconTable, rightIconTable, isSub)
|
||||
|
||||
|
||||
--> reset width
|
||||
menuButton.leftText:SetWidth (0)
|
||||
menuButton.leftText:SetHeight (0)
|
||||
@@ -603,7 +606,19 @@ function DetailsCreateCoolTip()
|
||||
if (leftTextTable) then
|
||||
|
||||
menuButton.leftText:SetText (leftTextTable [1])
|
||||
menuButton.leftText:SetTextColor (leftTextTable [2], leftTextTable [3], leftTextTable [4], leftTextTable [5])
|
||||
|
||||
local r, g, b, a = leftTextTable [2], leftTextTable [3], leftTextTable [4], leftTextTable [5]
|
||||
|
||||
if (r == 0 and g == 0 and b == 0 and a == 0) then
|
||||
if (CoolTip.OptionsTable.TextColor) then
|
||||
r, g, b, a = gump:ParseColors (CoolTip.OptionsTable.TextColor)
|
||||
menuButton.leftText:SetTextColor (r, g, b, a)
|
||||
else
|
||||
menuButton.leftText:SetTextColor (1, 1, 1, 1)
|
||||
end
|
||||
else
|
||||
menuButton.leftText:SetTextColor (r, g, b, a)
|
||||
end
|
||||
|
||||
if (CoolTip.OptionsTable.TextSize and not leftTextTable [6]) then
|
||||
_detalhes:SetFontSize (menuButton.leftText, CoolTip.OptionsTable.TextSize)
|
||||
@@ -622,22 +637,31 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
if (CoolTip.OptionsTable.TextFont and not leftTextTable [7]) then
|
||||
menuButton.leftText:SetFontObject (CoolTip.OptionsTable.TextFont)
|
||||
end
|
||||
|
||||
local face, size, flags = menuButton.leftText:GetFont()
|
||||
if (_G [CoolTip.OptionsTable.TextFont]) then
|
||||
menuButton.leftText:SetFontObject (GameFontRed or CoolTip.OptionsTable.TextFont)
|
||||
else
|
||||
local font = SharedMedia:Fetch ("font", CoolTip.OptionsTable.TextFont)
|
||||
local _, size, flags = menuButton.leftText:GetFont()
|
||||
menuButton.leftText:SetFont (font, size, flags)
|
||||
end
|
||||
|
||||
if (_G [leftTextTable [7]]) then
|
||||
menuButton.leftText:SetFontObject (leftTextTable [7])
|
||||
local face, size, flags = menuButton.leftText:GetFont()
|
||||
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or size
|
||||
|
||||
menuButton.leftText:SetFont (face, size, flags)
|
||||
elseif (leftTextTable [7]) then
|
||||
if (_G [leftTextTable [7]]) then
|
||||
menuButton.leftText:SetFontObject (leftTextTable [7])
|
||||
local face, size, flags = menuButton.leftText:GetFont()
|
||||
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or size
|
||||
menuButton.leftText:SetFont (face, size, flags)
|
||||
else
|
||||
local font = SharedMedia:Fetch ("font", leftTextTable [7])
|
||||
local face, size, flags = menuButton.leftText:GetFont()
|
||||
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or size
|
||||
menuButton.leftText:SetFont (face, size, flags)
|
||||
end
|
||||
else
|
||||
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or 10
|
||||
face = leftTextTable [7] or [[Fonts\FRIZQT__.TTF]]
|
||||
flags = leftTextTable [8]
|
||||
|
||||
menuButton.leftText:SetFont (face, size, flags)
|
||||
end
|
||||
|
||||
@@ -647,7 +671,19 @@ function DetailsCreateCoolTip()
|
||||
|
||||
if (rightTextTable) then
|
||||
menuButton.rightText:SetText (rightTextTable [1])
|
||||
menuButton.rightText:SetTextColor (rightTextTable [2], rightTextTable [3], rightTextTable [4], rightTextTable [5])
|
||||
|
||||
local r, g, b, a = rightTextTable [2], rightTextTable [3], rightTextTable [4], rightTextTable [5]
|
||||
|
||||
if (r == 0 and g == 0 and b == 0 and a == 0) then
|
||||
if (CoolTip.OptionsTable.TextColor) then
|
||||
r, g, b, a = gump:ParseColors (CoolTip.OptionsTable.TextColor)
|
||||
menuButton.rightText:SetTextColor (r, g, b, a)
|
||||
else
|
||||
menuButton.rightText:SetTextColor (1, 1, 1, 1)
|
||||
end
|
||||
else
|
||||
menuButton.rightText:SetTextColor (r, g, b, a)
|
||||
end
|
||||
|
||||
if (CoolTip.OptionsTable.TextSize and not rightTextTable [6]) then
|
||||
_detalhes:SetFontSize (menuButton.rightText, CoolTip.OptionsTable.TextSize)
|
||||
@@ -666,19 +702,29 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
if (CoolTip.OptionsTable.TextFont and not rightTextTable [7]) then
|
||||
menuButton.rightText:SetFontObject (CoolTip.OptionsTable.TextFont)
|
||||
end
|
||||
if (_G [CoolTip.OptionsTable.TextFont]) then
|
||||
menuButton.rightText:SetFontObject (CoolTip.OptionsTable.TextFont)
|
||||
else
|
||||
local font = SharedMedia:Fetch ("font", CoolTip.OptionsTable.TextFont)
|
||||
local _, size, flags = menuButton.rightText:GetFont()
|
||||
menuButton.rightText:SetFont (font, size, flags)
|
||||
end
|
||||
|
||||
local face, size, flags = menuButton.rightText:GetFont()
|
||||
elseif (rightTextTable [7]) then
|
||||
if (_G [rightTextTable [7]]) then
|
||||
menuButton.rightText:SetFontObject (rightTextTable [7])
|
||||
local face, size, flags = menuButton.rightText:GetFont()
|
||||
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or size
|
||||
menuButton.rightText:SetFont (face, size, flags)
|
||||
else
|
||||
local font = SharedMedia:Fetch ("font", rightTextTable [7])
|
||||
local face, size, flags = menuButton.rightText:GetFont()
|
||||
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or size
|
||||
menuButton.rightText:SetFont (face, size, flags)
|
||||
end
|
||||
|
||||
if (_G [rightTextTable [7]]) then
|
||||
menuButton.rightText:SetFontObject (rightTextTable [7])
|
||||
local face, size, flags = menuButton.rightText:GetFont()
|
||||
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or size
|
||||
|
||||
menuButton.rightText:SetFont (face, size, flags)
|
||||
else
|
||||
size = rightTextTable [6] or 10
|
||||
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or 10
|
||||
face = rightTextTable [7] or [[Fonts\FRIZQT__.TTF]]
|
||||
flags = rightTextTable [8]
|
||||
menuButton.rightText:SetFont (face, size, flags)
|
||||
@@ -1784,10 +1830,10 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
lineTable_left [1] = leftText --> line text
|
||||
lineTable_left [2] = 1
|
||||
lineTable_left [3] = 1
|
||||
lineTable_left [4] = 1
|
||||
lineTable_left [5] = 1
|
||||
lineTable_left [2] = 0
|
||||
lineTable_left [3] = 0
|
||||
lineTable_left [4] = 0
|
||||
lineTable_left [5] = 0
|
||||
lineTable_left [6] = false
|
||||
lineTable_left [7] = false
|
||||
lineTable_left [8] = false
|
||||
@@ -1876,10 +1922,10 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
subMenuTablesTexts [1] = leftText --> line text
|
||||
subMenuTablesTexts [2] = 1
|
||||
subMenuTablesTexts [3] = 1
|
||||
subMenuTablesTexts [4] = 1
|
||||
subMenuTablesTexts [5] = 1
|
||||
subMenuTablesTexts [2] = 0
|
||||
subMenuTablesTexts [3] = 0
|
||||
subMenuTablesTexts [4] = 0
|
||||
subMenuTablesTexts [5] = 0
|
||||
subMenuTablesTexts [6] = false
|
||||
subMenuTablesTexts [7] = false
|
||||
subMenuTablesTexts [8] = false
|
||||
@@ -2233,7 +2279,7 @@ function DetailsCreateCoolTip()
|
||||
ColorR2, ColorG2, ColorB2, ColorA2, fontSize, fontFace, fontFlag = ColorG1, ColorB1, ColorA1, ColorR2, ColorG2, ColorB2, ColorA2
|
||||
|
||||
if (type (ColorR1) == "boolean" or not ColorR1) then
|
||||
ColorR1, ColorG1, ColorB1, ColorA1 = 1, 1, 1, 1
|
||||
ColorR1, ColorG1, ColorB1, ColorA1 = 0, 0, 0, 0
|
||||
else
|
||||
ColorR1, ColorG1, ColorB1, ColorA1 = gump:ParseColors (ColorR1)
|
||||
end
|
||||
@@ -2243,7 +2289,7 @@ function DetailsCreateCoolTip()
|
||||
fontSize, fontFace, fontFlag = ColorG2, ColorB2, ColorA2
|
||||
|
||||
if (type (ColorR2) == "boolean" or not ColorR2) then
|
||||
ColorR2, ColorG2, ColorB2, ColorA2 = 1, 1, 1, 1
|
||||
ColorR2, ColorG2, ColorB2, ColorA2 = 0, 0, 0, 0
|
||||
else
|
||||
ColorR2, ColorG2, ColorB2, ColorA2 = gump:ParseColors (ColorR2)
|
||||
end
|
||||
|
||||
+28
-12
@@ -613,7 +613,12 @@ function DetailsDropDownOnEnter (self)
|
||||
end
|
||||
end
|
||||
|
||||
self:SetBackdropColor (.2, .2, .2, .2)
|
||||
if (self.MyObject.onenter_backdrop) then
|
||||
self:SetBackdropColor (unpack (self.MyObject.onenter_backdrop))
|
||||
else
|
||||
self:SetBackdropColor (.2, .2, .2, .2)
|
||||
end
|
||||
|
||||
self.arrowTexture2:Show()
|
||||
|
||||
if (self.MyObject.have_tooltip) then
|
||||
@@ -635,15 +640,20 @@ function DetailsDropDownOnEnter (self)
|
||||
end
|
||||
|
||||
function DetailsDropDownOnLeave (self)
|
||||
self:SetBackdropColor (1, 1, 1, .5)
|
||||
self.arrowTexture2:Hide()
|
||||
|
||||
if (self.MyObject.OnLeaveHook) then
|
||||
local interrupt = self.MyObject.OnLeaveHook (self)
|
||||
if (interrupt) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if (self.MyObject.onleave_backdrop) then
|
||||
self:SetBackdropColor (unpack (self.MyObject.onleave_backdrop))
|
||||
else
|
||||
self:SetBackdropColor (1, 1, 1, .5)
|
||||
end
|
||||
|
||||
self.arrowTexture2:Hide()
|
||||
|
||||
if (self.MyObject.have_tooltip) then
|
||||
_detalhes.popup:ShowMe (false)
|
||||
@@ -790,17 +800,23 @@ function gump:NewDropDown (parent, container, name, member, w, h, func, default)
|
||||
|
||||
--> initialize first menu selected
|
||||
local menu = func()
|
||||
for i = default, #menu do
|
||||
local _table = menu [i]
|
||||
if (not _table) then
|
||||
break
|
||||
end
|
||||
if (isOptionVisible (_table)) then
|
||||
DropDownObject:Selected (_table)
|
||||
break
|
||||
if (type (default) == "string") then
|
||||
DropDownObject:Select (default)
|
||||
else
|
||||
for i = default, #menu do
|
||||
local _table = menu [i]
|
||||
if (not _table) then
|
||||
break
|
||||
end
|
||||
if (isOptionVisible (_table)) then
|
||||
DropDownObject:Selected (_table)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
return DropDownObject
|
||||
|
||||
end
|
||||
+32
-79
@@ -358,59 +358,11 @@ local _
|
||||
--> flip
|
||||
local flip = function (side)
|
||||
if (side == 1) then
|
||||
if (not haveHFlip) then
|
||||
if (not haveVFlip) then
|
||||
edit_texture:SetTexCoord (1, 0, 0, 1)
|
||||
else
|
||||
edit_texture:SetTexCoord (1, 0, 1, 0)
|
||||
end
|
||||
rightCoordTexture:Hide()
|
||||
leftCoordTexture:Hide()
|
||||
rightSlider:Hide()
|
||||
leftSlider:Hide()
|
||||
leftTexCoordButton:Disable()
|
||||
rightTexCoordButton:Disable()
|
||||
else
|
||||
if (not haveVFlip) then
|
||||
edit_texture:SetTexCoord (0, 1, 0, 1)
|
||||
else
|
||||
edit_texture:SetTexCoord (0, 1, 1, 0)
|
||||
end
|
||||
rightCoordTexture:Show()
|
||||
leftCoordTexture:Show()
|
||||
leftTexCoordButton:Enable()
|
||||
rightTexCoordButton:Enable()
|
||||
end
|
||||
haveHFlip = not haveHFlip
|
||||
if (window.callback_func) then
|
||||
window.accept (true)
|
||||
end
|
||||
|
||||
|
||||
elseif (side == 2) then
|
||||
if (not haveVFlip) then
|
||||
if (not haveHFlip) then
|
||||
edit_texture:SetTexCoord (0, 1, 1, 0)
|
||||
else
|
||||
edit_texture:SetTexCoord (1, 0, 1, 0)
|
||||
end
|
||||
topCoordTexture:Hide()
|
||||
bottomCoordTexture:Hide()
|
||||
topSlider:Hide()
|
||||
bottomSlider:Hide()
|
||||
topTexCoordButton:Disable()
|
||||
bottomTexCoordButton:Disable()
|
||||
else
|
||||
if (not haveHFlip) then
|
||||
edit_texture:SetTexCoord (0, 1, 0, 1)
|
||||
else
|
||||
edit_texture:SetTexCoord (1, 0, 0, 1)
|
||||
end
|
||||
topCoordTexture:Show()
|
||||
bottomCoordTexture:Show()
|
||||
topTexCoordButton:Enable()
|
||||
bottomTexCoordButton:Enable()
|
||||
end
|
||||
haveVFlip = not haveVFlip
|
||||
if (window.callback_func) then
|
||||
window.accept (true)
|
||||
@@ -437,20 +389,22 @@ local _
|
||||
end
|
||||
|
||||
local coords = {}
|
||||
local l, r, t, b = leftSlider.value/100, rightSlider.value/100, topSlider.value/100, bottomSlider.value/100
|
||||
|
||||
if (haveHFlip) then
|
||||
coords [1] = 1
|
||||
coords [2] = 0
|
||||
coords [1] = r
|
||||
coords [2] = l
|
||||
else
|
||||
coords [1] = leftSlider.value/100
|
||||
coords [2] = rightSlider.value /100
|
||||
coords [1] = l
|
||||
coords [2] = r
|
||||
end
|
||||
|
||||
if (haveVFlip) then
|
||||
coords [3] = 1
|
||||
coords [4] = 0
|
||||
coords [3] = b
|
||||
coords [4] = t
|
||||
else
|
||||
coords [3] = topSlider.value/100
|
||||
coords [4] = bottomSlider.value/100
|
||||
coords [3] = t
|
||||
coords [4] = b
|
||||
end
|
||||
|
||||
return window.callback_func (edit_texture.width, edit_texture.height, {edit_texture:GetVertexColor()}, edit_texture:GetAlpha(), coords, window.extra_param)
|
||||
@@ -459,22 +413,19 @@ local _
|
||||
local acceptButton = g:NewButton (buttonsBackground, nil, "$parentAcceptButton", nil, 100, 20, window.accept, nil, nil, nil, "DONE")
|
||||
acceptButton:SetPoint ("topleft", window, "topright", 10, -200)
|
||||
acceptButton:InstallCustomTexture()
|
||||
|
||||
-- fazer botao de editar a cor
|
||||
-- fazer botao de editar o tamanho
|
||||
-- fazer botao de okey e retornar os valores
|
||||
|
||||
|
||||
window:Hide()
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local ttexcoord
|
||||
function g:ImageEditor (callback, texture, texcoord, colors, width, height, extraParam)
|
||||
function g:ImageEditor (callback, texture, texcoord, colors, width, height, extraParam, alpha)
|
||||
|
||||
texcoord = texcoord or {0, 1, 0, 1}
|
||||
ttexcoord = texcoord
|
||||
|
||||
colors = colors or {1, 1, 1, 1}
|
||||
|
||||
alpha = alpha or 1
|
||||
|
||||
edit_texture:SetTexture (texture)
|
||||
edit_texture.width = width
|
||||
@@ -482,7 +433,7 @@ window:Hide()
|
||||
|
||||
edit_texture:SetVertexColor (colors [1], colors [2], colors [3])
|
||||
|
||||
edit_texture:SetAlpha (colors [4] or 1)
|
||||
edit_texture:SetAlpha (alpha)
|
||||
|
||||
_detalhes:ScheduleTimer ("RefreshImageEditor", 0.2)
|
||||
|
||||
@@ -499,26 +450,28 @@ window:Hide()
|
||||
window.width = edit_texture.width
|
||||
window.height = edit_texture.height
|
||||
|
||||
if (ttexcoord[1] == 1 and ttexcoord[2] == 0) then
|
||||
haveHFlip = false
|
||||
flip (1)
|
||||
else
|
||||
local l, r, t, b = unpack (ttexcoord)
|
||||
|
||||
if (l > r) then
|
||||
haveHFlip = true
|
||||
flip (1)
|
||||
leftSlider:SetValue (ttexcoord[1]*100)
|
||||
rightSlider:SetValue (ttexcoord[2]*100)
|
||||
end
|
||||
|
||||
if (ttexcoord[3] == 1 and ttexcoord[4] == 0) then
|
||||
haveVFlip = false
|
||||
flip (2)
|
||||
leftSlider:SetValue (r * 100)
|
||||
rightSlider:SetValue (l * 100)
|
||||
else
|
||||
haveVFlip = true
|
||||
flip (2)
|
||||
topSlider:SetValue (ttexcoord[3]*100)
|
||||
bottomSlider:SetValue (ttexcoord[4]*100)
|
||||
haveHFlip = false
|
||||
leftSlider:SetValue (l * 100)
|
||||
rightSlider:SetValue (r * 100)
|
||||
end
|
||||
|
||||
if (t > b) then
|
||||
haveVFlip = true
|
||||
topSlider:SetValue (b * 100)
|
||||
bottomSlider:SetValue (t * 100)
|
||||
else
|
||||
haveVFlip = false
|
||||
topSlider:SetValue (t * 100)
|
||||
bottomSlider:SetValue (b * 100)
|
||||
end
|
||||
|
||||
if (window.callback_func) then
|
||||
window.accept (true)
|
||||
end
|
||||
|
||||
+103
-51
@@ -11,6 +11,7 @@ local _math_floor = math.floor --> lua local
|
||||
local loadstring = loadstring --> lua local
|
||||
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
|
||||
|
||||
local cleanfunction = function() end
|
||||
local APISliderFunctions = false
|
||||
@@ -315,8 +316,11 @@ local SliderMetaFunctions = {}
|
||||
slider.thumb:SetAlpha (1)
|
||||
|
||||
if (slider.MyObject.have_tooltip) then
|
||||
GameCooltip:Reset()
|
||||
_detalhes:CooltipPreset (1)
|
||||
GameCooltip:AddLine (slider.MyObject.have_tooltip)
|
||||
if (slider.MyObject.have_tooltip == Loc ["STRING_RIGHTCLICK_TYPEVALUE"]) then
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 16, 16, 0.015625, 0.15671875, 0.640625, 0.798828125)
|
||||
end
|
||||
GameCooltip:ShowCooltip (slider, "tooltip")
|
||||
end
|
||||
|
||||
@@ -474,13 +478,73 @@ local SliderMetaFunctions = {}
|
||||
end
|
||||
slider.MyObject.ivalue = amt
|
||||
end
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> object constructor
|
||||
|
||||
function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defaultv, color_inverted)
|
||||
local SwitchOnClick = function (self, button, forced_value, value)
|
||||
|
||||
local slider = self.MyObject
|
||||
|
||||
if (forced_value) then
|
||||
rawset (slider, "value", not value)
|
||||
end
|
||||
|
||||
if (rawget (slider, "value")) then --actived
|
||||
|
||||
rawset (slider, "value", false)
|
||||
slider._text:SetText (slider._ltext)
|
||||
slider._thumb:ClearAllPoints()
|
||||
|
||||
slider:SetBackdropColor (1, 0, 0, 0.4)
|
||||
slider._thumb:SetPoint ("left", slider.widget, "left")
|
||||
|
||||
else
|
||||
|
||||
rawset (slider, "value", true)
|
||||
slider._text:SetText (slider._rtext)
|
||||
slider._thumb:ClearAllPoints()
|
||||
|
||||
slider:SetBackdropColor (0, 0, 1, 0.4)
|
||||
slider._thumb:SetPoint ("right", slider.widget, "right")
|
||||
|
||||
end
|
||||
|
||||
if (slider.OnSwitch and not forced_value) then
|
||||
local value = rawget (slider, "value")
|
||||
if (slider.return_func) then
|
||||
value = slider:return_func (value)
|
||||
end
|
||||
slider.OnSwitch (slider, slider.FixedValue, value)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local default_switch_func = function (self, passed_value)
|
||||
if (self.value) then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local switch_get_value = function (self)
|
||||
return self.value
|
||||
end
|
||||
|
||||
local switch_set_value = function (self, value)
|
||||
if (self.switch_func) then
|
||||
value = self:switch_func (value)
|
||||
end
|
||||
|
||||
SwitchOnClick (self.widget, nil, true, value)
|
||||
end
|
||||
|
||||
local switch_set_fixparameter = function (self, value)
|
||||
_rawset (self, "FixedValue", value)
|
||||
end
|
||||
|
||||
function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, default_value, color_inverted, switch_func, return_func)
|
||||
|
||||
--> early checks
|
||||
if (not name) then
|
||||
@@ -496,54 +560,47 @@ function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, de
|
||||
ltext = ltext or "OFF"
|
||||
rtext = rtext or "ON"
|
||||
|
||||
if (type (defaultv) == "boolean" and not defaultv) then
|
||||
defaultv = 1
|
||||
elseif (type (defaultv) == "boolean" and defaultv) then
|
||||
defaultv = 2
|
||||
else
|
||||
defaultv = defaultv or 1
|
||||
end
|
||||
|
||||
--> build frames
|
||||
local slider = gump:NewSlider (parent, container, name, member, w, h, 1, 2, 1, defaultv, nil, true)
|
||||
|
||||
local slider = gump:NewButton (parent, container, name, member, w, h)
|
||||
|
||||
slider.switch_func = switch_func
|
||||
slider.return_func = return_func
|
||||
slider.SetValue = switch_set_value
|
||||
slider.GetValue = switch_get_value
|
||||
slider.SetFixedParameter = switch_set_fixparameter
|
||||
|
||||
if (member) then
|
||||
parent [member] = slider
|
||||
end
|
||||
|
||||
slider:SetBackdrop ({edgeFile = [[Interface\Buttons\UI-SliderBar-Border]], edgeSize = 8,
|
||||
bgFile = [[Interface\AddOns\Details\images\background]], insets = {left = 3, right = 3, top = 5, bottom = 5}})
|
||||
|
||||
local thumb = slider:CreateTexture (nil, "artwork")
|
||||
thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
thumb:SetSize (34+(h*0.2), h*1.2)
|
||||
thumb:SetAlpha (0.7)
|
||||
thumb:SetPoint ("left", slider.widget, "left")
|
||||
|
||||
local text = slider:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
text:SetTextColor (.8, .8, .8, 1)
|
||||
text:SetPoint ("center", thumb, "center")
|
||||
|
||||
slider._text = text
|
||||
slider._thumb = thumb
|
||||
slider._ltext = ltext
|
||||
slider._rtext = rtext
|
||||
slider.thumb = thumb
|
||||
|
||||
slider.invert_colors = color_inverted
|
||||
|
||||
slider:SetHook ("OnValueChange", function (self)
|
||||
if (slider:GetValue() == 1) then
|
||||
slider.amt:SetText (ltext)
|
||||
if (slider.OnSwitch) then
|
||||
slider.OnSwitch (slider, slider.FixedValue, false)
|
||||
end
|
||||
if (not slider.invert_colors) then
|
||||
slider:SetBackdropColor (1, 0, 0, 0.4)
|
||||
else
|
||||
slider:SetBackdropColor (0, 0, 1, 0.4)
|
||||
end
|
||||
else
|
||||
slider.amt:SetText (rtext)
|
||||
if (slider.OnSwitch) then
|
||||
slider.OnSwitch (slider, slider.FixedValue, true)
|
||||
end
|
||||
|
||||
if (not slider.invert_colors) then
|
||||
slider:SetBackdropColor (0, 0, 1, 0.4)
|
||||
else
|
||||
slider:SetBackdropColor (1, 0, 0, 0.4)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end)
|
||||
|
||||
slider:SetValue (1)
|
||||
slider:SetValue (2)
|
||||
slider:SetValue (defaultv)
|
||||
|
||||
slider:SetScript ("OnClick", SwitchOnClick)
|
||||
|
||||
slider:SetValue (default_value)
|
||||
|
||||
slider.isSwitch = true
|
||||
|
||||
|
||||
return slider
|
||||
end
|
||||
|
||||
@@ -621,17 +678,12 @@ function gump:NewSlider (parent, container, name, member, w, h, min, max, step,
|
||||
SliderObject.slider:SetValueStep (step)
|
||||
SliderObject.slider:SetValue (defaultv)
|
||||
SliderObject.ivalue = defaultv
|
||||
|
||||
--SliderObject.amt = _G [name .. "_Amt"]
|
||||
--SliderObject.lock = _G [name .. "_LockTexture"]
|
||||
--SliderObject.thumb = _G [name .. "_ThumbTexture"]
|
||||
|
||||
|
||||
SliderObject.slider:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8})
|
||||
SliderObject.slider:SetBackdropColor (0.9, 0.7, 0.7, 1.0)
|
||||
|
||||
|
||||
SliderObject.thumb = SliderObject.slider:CreateTexture (nil, "artwork")
|
||||
SliderObject.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
--SliderObject.thumb:SetSize (30, 24)
|
||||
SliderObject.thumb:SetSize (30+(h*0.2), h*1.2)
|
||||
SliderObject.thumb:SetAlpha (0.7)
|
||||
SliderObject.slider:SetThumbTexture (SliderObject.thumb)
|
||||
|
||||
@@ -260,12 +260,9 @@ local TextEntryMetaFunctions = {}
|
||||
end
|
||||
|
||||
if (textentry.MyObject.have_tooltip) then
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:SetType ("tooltip")
|
||||
GameCooltip:SetColor ("main", "transparent")
|
||||
_detalhes:CooltipPreset (1)
|
||||
GameCooltip:AddLine (textentry.MyObject.have_tooltip)
|
||||
GameCooltip:SetOwner (textentry)
|
||||
GameCooltip:ShowCooltip()
|
||||
GameCooltip:ShowCooltip (textentry, "tooltip")
|
||||
end
|
||||
|
||||
textentry.mouse_over = true
|
||||
|
||||
+5
-1
@@ -143,7 +143,11 @@ do
|
||||
|
||||
--> return the boss portrit
|
||||
function _detalhes:GetBossPortrait (mapid, bossindex)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
|
||||
if (mapid and bossindex) then
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+15
-1
@@ -13,6 +13,10 @@ end
|
||||
|
||||
function _detalhes:SaveDataOnLogout()
|
||||
|
||||
if (true) then
|
||||
return
|
||||
end
|
||||
|
||||
if (_detalhes.wipe_full_config) then
|
||||
_detalhes_global = nil
|
||||
_detalhes_database = nil
|
||||
@@ -417,18 +421,28 @@ function _detalhes:WipeConfig()
|
||||
|
||||
end
|
||||
|
||||
local is_exception = {
|
||||
["nick_tag_cache"] = true
|
||||
}
|
||||
|
||||
function _detalhes:SaveConfig()
|
||||
|
||||
--> nicktag cache
|
||||
--_detalhes.copy_nick_tag = table_deepcopy (_detalhes_database.nick_tag_cache)
|
||||
|
||||
--> cleanup
|
||||
_detalhes:PrepareTablesForSave()
|
||||
_detalhes_database.tabela_instancias = _detalhes.tabela_instancias
|
||||
_detalhes_database.tabela_historico = _detalhes.tabela_historico
|
||||
|
||||
--> buffs
|
||||
_detalhes.Buffs:SaveBuffs()
|
||||
|
||||
--> salva o container do personagem
|
||||
for key, value in pairs (_detalhes.default_player_data) do
|
||||
_detalhes_database [key] = _detalhes [key]
|
||||
if (not is_exception [key]) then
|
||||
_detalhes_database [key] = _detalhes [key]
|
||||
end
|
||||
end
|
||||
|
||||
--> salva o container das globais
|
||||
|
||||
+19
-6
@@ -53,6 +53,7 @@ local _
|
||||
|
||||
instance_cprops = {
|
||||
menu_anchor = {5, 1},
|
||||
plugins_grow_direction = 2,
|
||||
}
|
||||
|
||||
})
|
||||
@@ -94,7 +95,7 @@ local _
|
||||
--overwrites
|
||||
instance_cprops = {
|
||||
hide_icon = true,
|
||||
menu_anchor = {-18, 1},
|
||||
menu_anchor = {-81, 1, side = 2},
|
||||
instance_button_anchor = {-12, 3},
|
||||
instancebutton_info = {text_color = {.8, .6, .0, 0.8}, text_face = "Friz Quadrata TT", text_size = 10, color_overlay = {1, 1, 1, 1}},
|
||||
resetbutton_info = {text_color = {.8, .8, .8, 0.8}, text_color_small = {0, 0, 0, 0}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}, always_small = true},
|
||||
@@ -102,6 +103,12 @@ local _
|
||||
show_statusbar = false,
|
||||
color = {.3, .3, .3, 1},
|
||||
bg_alpha = 0.2,
|
||||
plugins_grow_direction = 1,
|
||||
row_info = {
|
||||
texture = "Blizzard Character Skills Bar",
|
||||
font_face = "Arial Narrow",
|
||||
},
|
||||
attribute_text = {enabled = true, side = 1, text_size = 12, anchor = {-18, 4}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"},
|
||||
},
|
||||
|
||||
callback = function (skin)
|
||||
@@ -349,10 +356,14 @@ local _
|
||||
|
||||
--reset button
|
||||
reset_button_coords = {0.01904296875, 0.0673828125, 0.50244140625, 0.51708984375},
|
||||
reset_button_small_coords = {0.11669921875, 0.13720703125, 0.50244140625, 0.51708984375},
|
||||
|
||||
--reset_button_small_coords = {0.11669921875, 0.13720703125, 0.50244140625, 0.51708984375},
|
||||
reset_button_small_coords = {0.1162109375, 0.13671875, 0.50390625, 0.5146484375+0.00048828125+0.00048828125}, -- 119 516 140 527
|
||||
reset_button_small_size = {22, 12},
|
||||
--instance button
|
||||
instance_button_coords = {0.01904296875, 0.04736328125, 0.48388671875, 0.49853515625},
|
||||
--instance_button_coords = {0.01904296875, 0.04736328125, 0.48388671875, 0.49853515625},
|
||||
instance_button_coords = {0.0185546875, 0.046875+0.00048828125, 0.4833984375, 0.498046875+0.00048828125},--19 495 48 510
|
||||
instance_button_size = 12,
|
||||
--0.00048828125
|
||||
|
||||
--close button
|
||||
close_button_coords = {0.01904296875, 0.03369140625, 0.52197265625, 0.53662109375},
|
||||
@@ -399,15 +410,17 @@ local _
|
||||
space = {left = 1, right = -2, between = 0},
|
||||
},
|
||||
wallpaper = {
|
||||
overlay = {0, 0, 0, 0.498038113117218},
|
||||
overlay = {0, 0, 0},
|
||||
width = 227.1267691385938,
|
||||
texcoord = {0.001000000014901161, 0.1710000038146973, 0.001000000014901161, 0.3539316177368164},
|
||||
enabled = true,
|
||||
anchor = "all",
|
||||
height = 89.00001440917025,
|
||||
alpha = 0.4980392451398075,
|
||||
alpha = 0.6,
|
||||
texture = "Interface\\Glues\\CREDITS\\Badlands3",
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
--alpha = 0.4980392451398075,
|
||||
|
||||
@@ -250,6 +250,42 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
--vardump (_detalhes.ResetButton)
|
||||
|
||||
elseif (command == "buffsof") then
|
||||
|
||||
local playername, segment = rest:match("^(%S*)%s*(.-)$")
|
||||
segment = tonumber (segment or 0)
|
||||
print ("dumping buffs of ", playername, segment)
|
||||
|
||||
local c = _detalhes:GetCombat ("current")
|
||||
if (c) then
|
||||
|
||||
local playerActor
|
||||
|
||||
if (segment and segment ~= 0) then
|
||||
local c = _detalhes:GetCombat (segment)
|
||||
playerActor = c (4, playername)
|
||||
print ("using segment", segment, c, "player actor:", playerActor)
|
||||
else
|
||||
playerActor = c (4, playername)
|
||||
end
|
||||
|
||||
print ("actor table: ", playerActor)
|
||||
|
||||
if (not playerActor) then
|
||||
print ("actor table not found")
|
||||
return
|
||||
end
|
||||
|
||||
if (playerActor and playerActor.buff_uptime_spell_tables and playerActor.buff_uptime_spell_tables._ActorTable) then
|
||||
for spellid, spellTable in pairs (playerActor.buff_uptime_spell_tables._ActorTable) do
|
||||
local spellname = GetSpellInfo (spellid)
|
||||
if (spellname) then
|
||||
print (spellid, spellname, spellTable.uptime)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif (msg == "alert") then
|
||||
|
||||
local instancia = _detalhes.tabela_instancias [1]
|
||||
|
||||
@@ -967,6 +967,11 @@ do
|
||||
[115310] = {180, 0, 0}, -- Revival
|
||||
[119582] = {60, 0, 0}, -- Purifying Brew
|
||||
[116844] = {45, 8, 0}, --Ring of Peace
|
||||
[115308] = {0, 6, 0}, --Elusive Brew
|
||||
[122783] = {90, 6}, -- Diffuse Magic
|
||||
[122278] = {90, 45}, -- Dampen Harm
|
||||
[115176] = {180, 8}, -- Zen Meditation
|
||||
[115203] = {180, 20}, -- Fortifying Brew
|
||||
|
||||
--["PALADIN"] = {},
|
||||
[633] = {600, 0, 0}, --Lay on Hands
|
||||
@@ -1024,12 +1029,8 @@ do
|
||||
["MAGE"] = {45438},
|
||||
|
||||
-- Monk
|
||||
[115203] = {180, 20}, -- Fortifying Brew
|
||||
[122470] = {90, 10}, -- Touch of Karma
|
||||
[115176] = {180, 8}, -- Zen Meditation
|
||||
[115213] = {180, 6}, -- Avert Harm
|
||||
[122278] = {90, 45}, -- Dampen Harm
|
||||
[122783] = {90, 6}, -- Diffuse Magic
|
||||
["MONK"] = {115295, 115203, 122470, 115176, 116849, 115213, 122278, 122783},
|
||||
|
||||
-- Paladin
|
||||
|
||||
+125
-33
@@ -63,13 +63,45 @@ function _detalhes:AbreJanelaInfo (jogador)
|
||||
if (nome:find ("-")) then
|
||||
nome = nome:gsub (("-.*"), "")
|
||||
end
|
||||
info.nome:SetText (nome)
|
||||
|
||||
|
||||
if (info.instancia.atributo == 1 and info.instancia.sub_atributo == 6) then --> enemy
|
||||
atributo_nome = sub_atributos [info.atributo].lista [1] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"]
|
||||
end
|
||||
|
||||
|
||||
info.nome:SetText (nome)
|
||||
info.atributo_nome:SetText (atributo_nome)
|
||||
|
||||
local avatar = NickTag:GetNicknameTable (jogador.serial)
|
||||
if (avatar) then
|
||||
|
||||
info.avatar:SetTexture (avatar [2])
|
||||
info.avatar_bg:SetTexture (avatar [4])
|
||||
info.avatar_bg:SetTexCoord (unpack (avatar [5]))
|
||||
info.avatar_bg:SetVertexColor (unpack (avatar [6]))
|
||||
|
||||
info.avatar_nick:SetText (avatar [1] or nome)
|
||||
info.avatar_attribute:SetText (atributo_nome)
|
||||
info.avatar_attribute:SetPoint ("CENTER", info.avatar_nick, "CENTER", 0, 14)
|
||||
|
||||
info.avatar:Show()
|
||||
info.avatar_bg:Show()
|
||||
info.avatar_nick:Show()
|
||||
info.avatar_attribute:Show()
|
||||
|
||||
info.nome:Hide()
|
||||
info.atributo_nome:Hide()
|
||||
else
|
||||
info.avatar:Hide()
|
||||
info.avatar_bg:Hide()
|
||||
info.avatar_nick:Hide()
|
||||
info.avatar_attribute:Hide()
|
||||
|
||||
info.nome:Show()
|
||||
info.atributo_nome:Show()
|
||||
end
|
||||
|
||||
|
||||
|
||||
info.atributo_nome:SetPoint ("CENTER", info.nome, "CENTER", 0, 14)
|
||||
|
||||
gump:TrocaBackgroundInfo (info)
|
||||
@@ -547,6 +579,25 @@ local function cria_textos (este_gump)
|
||||
este_gump.targets = este_gump:CreateFontString (nil, "OVERLAY", "QuestFont_Large")
|
||||
este_gump.targets:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 24, -235)
|
||||
este_gump.targets:SetText (Loc ["STRING_TARGETS"] .. ":")
|
||||
|
||||
este_gump.avatar = este_gump:CreateTexture (nil, "overlay")
|
||||
este_gump.avatar_bg = este_gump:CreateTexture (nil, "overlay")
|
||||
este_gump.avatar_attribute = este_gump:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
este_gump.avatar_nick = este_gump:CreateFontString (nil, "overlay", "QuestFont_Large")
|
||||
este_gump.avatar:SetDrawLayer ("overlay", 3)
|
||||
este_gump.avatar_bg:SetDrawLayer ("overlay", 2)
|
||||
este_gump.avatar_nick:SetDrawLayer ("overlay", 4)
|
||||
|
||||
este_gump.avatar:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 70, -10)
|
||||
este_gump.avatar_bg:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 70, -12)
|
||||
este_gump.avatar_bg:SetSize (275, 60)
|
||||
|
||||
este_gump.avatar_nick:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 208, -54)
|
||||
|
||||
este_gump.avatar:Hide()
|
||||
este_gump.avatar_bg:Hide()
|
||||
este_gump.avatar_nick:Hide()
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -1087,25 +1138,50 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
--SPELLS
|
||||
local spells_texture = frame:CreateTexture (nil, "artwork")
|
||||
spells_texture:SetPoint ("topleft", frame, "topleft", 400, -100)
|
||||
spells_texture:SetPoint ("topleft", frame, "topleft", 400, -80)
|
||||
spells_texture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
spells_texture:SetSize (128, 16)
|
||||
local spells_text = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
spells_text:SetText ("Spells")
|
||||
spells_text :SetPoint ("left", spells_texture, "left", 2, 0)
|
||||
|
||||
for i = 1, 9 do
|
||||
local icon = frame:CreateTexture (nil, "artwork")
|
||||
local frame_tooltip_onenter = function (self)
|
||||
if (self.spellid) then
|
||||
self:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 512, edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", edgeSize = 8})
|
||||
self:SetBackdropColor (.5, .5, .5, .5)
|
||||
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
|
||||
GameTooltip:SetSpellByID (self.spellid)
|
||||
GameTooltip:Show()
|
||||
end
|
||||
end
|
||||
local frame_tooltip_onleave = function (self)
|
||||
if (self.spellid) then
|
||||
self:SetBackdrop (nil)
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 10 do
|
||||
local frame_tooltip = CreateFrame ("frame", nil, frame)
|
||||
frame_tooltip:SetPoint ("topleft", frame, "topleft", 405, -100 + ((i-1)*15)*-1)
|
||||
frame_tooltip:SetSize (150, 14)
|
||||
frame_tooltip:SetScript ("OnEnter", frame_tooltip_onenter)
|
||||
frame_tooltip:SetScript ("OnLeave", frame_tooltip_onleave)
|
||||
|
||||
local icon = frame_tooltip:CreateTexture (nil, "artwork")
|
||||
icon:SetSize (14, 14)
|
||||
icon:SetPoint ("topleft", frame, "topleft", 405, -120 + ((i-1)*15)*-1)
|
||||
local spell = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
icon:SetPoint ("left", frame_tooltip, "left")
|
||||
|
||||
local spell = frame_tooltip:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
spell:SetPoint ("left", icon, "right", 2, 0)
|
||||
spell:SetText ("spell name:") --> localize-me
|
||||
spell:SetTextColor (.8, .8, .8, 1)
|
||||
local spell_amt = frame:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
|
||||
local spell_amt = frame_tooltip:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
|
||||
spell_amt:SetPoint ("left", spell, "right", 2, 0)
|
||||
spell_amt:SetText ("0")
|
||||
tab ["spell" .. i] = {spell, spell_amt, icon}
|
||||
|
||||
tab ["spell" .. i] = {spell, spell_amt, icon, frame_tooltip}
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1139,19 +1215,24 @@ function gump:CriaJanelaInfo()
|
||||
return ps, diff
|
||||
end
|
||||
|
||||
local spells_by_class = {
|
||||
-- ~buff
|
||||
local spells_by_class = { --buffss uptime
|
||||
["DRUID"] = {
|
||||
[132402] = true, --savage defense
|
||||
[135286] = true, -- tooth and claw
|
||||
},
|
||||
["DEATHKNIGHT"] = {
|
||||
[145676] = true, --riposte
|
||||
[145677] = true, --riposte
|
||||
[77535] = true, --blood shield
|
||||
--[49222] = true, --bone shield
|
||||
[51460] = true, --runic corruption
|
||||
},
|
||||
["MONK"] = {
|
||||
[118604] = true, --guard
|
||||
[115295] = true, --guard
|
||||
[115307] = true, --shuffle
|
||||
[115308] = true, --elusive brew
|
||||
--[128939] = true, --elusive brew
|
||||
[125359] = true, --tiger power
|
||||
},
|
||||
["PALADIN"] = {
|
||||
[132403] = true, --shield of the righteous
|
||||
@@ -1182,7 +1263,9 @@ function gump:CriaJanelaInfo()
|
||||
tab.tankname:SetText ("Avoidance of\n" .. n) --> localize-me
|
||||
|
||||
--> damage taken
|
||||
local damagetaken = player.damage_taken
|
||||
local playerdamage = combat (1, player.nome)
|
||||
|
||||
local damagetaken = playerdamage.damage_taken
|
||||
local last_damage_received = 0
|
||||
if (last_actor) then
|
||||
last_damage_received = last_actor.damage_taken / last_combat:GetCombatTime()
|
||||
@@ -1194,11 +1277,11 @@ function gump:CriaJanelaInfo()
|
||||
tab.damagepersecond:SetText (_detalhes:comma_value (_math_floor (ps)) .. " (" .. diff .. ")")
|
||||
|
||||
--> absorbs
|
||||
local totalabsorbs = player.avoidance.overall.ABSORB_AMT
|
||||
local totalabsorbs = playerdamage.avoidance.overall.ABSORB_AMT
|
||||
local incomingtotal = damagetaken + totalabsorbs
|
||||
|
||||
local last_total_absorbs = 0
|
||||
if (last_actor) then
|
||||
if (last_actor and last_actor.avoidance) then
|
||||
last_total_absorbs = last_actor.avoidance.overall.ABSORB_AMT / last_combat:GetCombatTime()
|
||||
end
|
||||
|
||||
@@ -1208,32 +1291,32 @@ function gump:CriaJanelaInfo()
|
||||
tab.absorbstotalpersecond:SetText (_detalhes:comma_value (_math_floor (ps)) .. " (" .. diff .. ")")
|
||||
|
||||
--> dodge
|
||||
local totaldodge = player.avoidance.overall.DODGE
|
||||
local totaldodge = playerdamage.avoidance.overall.DODGE
|
||||
tab.dodge:SetText (totaldodge)
|
||||
|
||||
local last_total_dodge = 0
|
||||
if (last_actor) then
|
||||
if (last_actor and last_actor.avoidance) then
|
||||
last_total_dodge = last_actor.avoidance.overall.DODGE / last_combat:GetCombatTime()
|
||||
end
|
||||
local ps, diff = getpercent (totaldodge, last_total_dodge, elapsed_time, true)
|
||||
tab.dodgepersecond:SetText ( string.format ("%.2f", ps) .. " (" .. diff .. ")")
|
||||
|
||||
--> parry
|
||||
local totalparry = player.avoidance.overall.PARRY
|
||||
local totalparry = playerdamage.avoidance.overall.PARRY
|
||||
tab.parry:SetText (totalparry)
|
||||
|
||||
local last_total_parry = 0
|
||||
if (last_actor) then
|
||||
if (last_actor and last_actor.avoidance) then
|
||||
last_total_parry = last_actor.avoidance.overall.PARRY / last_combat:GetCombatTime()
|
||||
end
|
||||
local ps, diff = getpercent (totalparry, last_total_parry, elapsed_time, true)
|
||||
tab.parrypersecond:SetText (string.format ("%.2f", ps) .. " (" .. diff .. ")")
|
||||
|
||||
--> absorb
|
||||
local fullabsorb = player.avoidance.overall.FULL_ABSORBED
|
||||
local halfabsorb = player.avoidance.overall.PARTIAL_ABSORBED
|
||||
local halfabsorb_amt = player.avoidance.overall.PARTIAL_ABSORB_AMT
|
||||
local noabsorb = player.avoidance.overall.FULL_HIT
|
||||
local fullabsorb = playerdamage.avoidance.overall.FULL_ABSORBED
|
||||
local halfabsorb = playerdamage.avoidance.overall.PARTIAL_ABSORBED
|
||||
local halfabsorb_amt = playerdamage.avoidance.overall.PARTIAL_ABSORB_AMT
|
||||
local noabsorb = playerdamage.avoidance.overall.FULL_HIT
|
||||
|
||||
tab.fullsbsorbed:SetText (fullabsorb)
|
||||
tab.partiallyabsorbed:SetText (halfabsorb)
|
||||
@@ -1242,7 +1325,7 @@ function gump:CriaJanelaInfo()
|
||||
if (halfabsorb_amt > 0) then
|
||||
local average = halfabsorb_amt / halfabsorb --tenho o average
|
||||
local last_average = 0
|
||||
if (last_actor) then
|
||||
if (last_actor and last_actor.avoidance) then
|
||||
last_average = last_actor.avoidance.overall.PARTIAL_ABSORB_AMT / last_actor.avoidance.overall.PARTIAL_ABSORBED
|
||||
end
|
||||
|
||||
@@ -1372,7 +1455,8 @@ function gump:CriaJanelaInfo()
|
||||
local esta_habilidade = cooldowns_usados[i]
|
||||
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
|
||||
|
||||
local label1, label2, icon1 = unpack (tab ["spell" .. i])
|
||||
local label1, label2, icon1, framebg = unpack (tab ["spell" .. i])
|
||||
framebg.spellid = esta_habilidade[1]
|
||||
|
||||
label1:SetText (nome_magia .. ":")
|
||||
label2:SetText (esta_habilidade[2])
|
||||
@@ -1387,18 +1471,24 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
|
||||
|
||||
--> buffs de druida
|
||||
if (index_used < 9) then
|
||||
--> buffs uptime
|
||||
if (index_used < 11) then
|
||||
if (misc_player.buff_uptime_spell_tables) then
|
||||
local minha_tabela = misc_player.buff_uptime_spell_tables._ActorTable
|
||||
|
||||
local encounter_time = combat:GetCombatTime()
|
||||
|
||||
for _spellid, _tabela in pairs (minha_tabela) do
|
||||
if (spells_by_class [player.classe] [_spellid] and index_used < 9) then
|
||||
if (spells_by_class [player.classe] [_spellid] and index_used <= 10) then
|
||||
local nome_magia, _, icone_magia = GetSpellInfo (_spellid)
|
||||
local label1, label2, icon1 = unpack (tab ["spell" .. index_used])
|
||||
local label1, label2, icon1, framebg = unpack (tab ["spell" .. index_used])
|
||||
|
||||
framebg.spellid = _spellid
|
||||
|
||||
local t = _tabela.uptime / encounter_time * 100
|
||||
label1:SetText (nome_magia .. ":")
|
||||
local minutos, segundos = _math_floor (_tabela.uptime / 60), _math_floor (_tabela.uptime % 60)
|
||||
label2:SetText (minutos .. "m " .. segundos .. "s")
|
||||
label2:SetText (minutos .. "m " .. segundos .. "s" .. " (" .. _math_floor (t) .. "%)")
|
||||
icon1:SetTexture (icone_magia)
|
||||
icon1:SetTexCoord (0.0625, 0.953125, 0.0625, 0.953125)
|
||||
|
||||
@@ -1408,8 +1498,10 @@ function gump:CriaJanelaInfo()
|
||||
end
|
||||
end
|
||||
|
||||
for i = index_used, 9 do
|
||||
local label1, label2, icon1 = unpack (tab ["spell" .. i])
|
||||
for i = index_used, 10 do
|
||||
local label1, label2, icon1, framebg = unpack (tab ["spell" .. i])
|
||||
|
||||
framebg.spellid = nil
|
||||
label1:SetText ("-- -- -- --")
|
||||
label2:SetText ("")
|
||||
icon1:SetTexture (nil)
|
||||
|
||||
+989
-280
File diff suppressed because it is too large
Load Diff
+597
-71
@@ -35,10 +35,13 @@ local modo_alone = _detalhes._detalhes_props["MODO_ALONE"]
|
||||
local modo_grupo = _detalhes._detalhes_props["MODO_GROUP"]
|
||||
local modo_all = _detalhes._detalhes_props["MODO_ALL"]
|
||||
|
||||
--constants
|
||||
local baseframe_strata = "HIGH"
|
||||
local gump_fundo_backdrop = {
|
||||
bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0}}
|
||||
|
||||
|
||||
function _detalhes:ScheduleUpdate (instancia)
|
||||
instancia.barraS = {nil, nil}
|
||||
instancia.update = true
|
||||
@@ -300,6 +303,10 @@ end
|
||||
|
||||
local function OnLeaveMainWindow (instancia, self)
|
||||
|
||||
instancia.is_interacting = false
|
||||
instancia:SetMenuAlpha (nil, nil, nil, true)
|
||||
instancia:SetAutoHideMenu (nil, nil, true)
|
||||
|
||||
if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then
|
||||
|
||||
--> resizes and lock button
|
||||
@@ -325,6 +332,10 @@ _detalhes.OnLeaveMainWindow = OnLeaveMainWindow
|
||||
|
||||
local function OnEnterMainWindow (instancia, self)
|
||||
|
||||
instancia.is_interacting = true
|
||||
instancia:SetMenuAlpha (nil, nil, nil, true)
|
||||
instancia:SetAutoHideMenu (nil, nil, true)
|
||||
|
||||
if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then
|
||||
|
||||
--> resizes and lock button
|
||||
@@ -663,6 +674,7 @@ local function BFrame_scripts (baseframe, instancia)
|
||||
baseframe:SetScript("OnSizeChanged", function (self)
|
||||
instancia:SaveMainWindowPosition()
|
||||
instancia:ReajustaGump()
|
||||
instancia.oldwith = baseframe:GetWidth()
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_SIZECHANGED", nil, instancia)
|
||||
end)
|
||||
|
||||
@@ -1247,8 +1259,12 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
return _detalhes.switch:ShowMe (instancia)
|
||||
end
|
||||
|
||||
esta_barra.texto_esquerdo:SetPoint ("left", esta_barra.icone_classe, "right", 4, -1)
|
||||
esta_barra.texto_direita:SetPoint ("right", esta_barra.statusbar, "right", 1, -1)
|
||||
if (instancia.row_info.no_icon) then
|
||||
esta_barra.texto_esquerdo:SetPoint ("left", esta_barra.statusbar, "left", 3, -1)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetPoint ("left", esta_barra.icone_classe, "right", 4, -1)
|
||||
end
|
||||
|
||||
self.mouse_down = _GetTime()
|
||||
self.button = button
|
||||
@@ -1278,8 +1294,12 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
|
||||
end
|
||||
|
||||
esta_barra.texto_esquerdo:SetPoint ("left", esta_barra.icone_classe, "right", 3, 0)
|
||||
esta_barra.texto_direita:SetPoint ("right", esta_barra.statusbar, "right")
|
||||
if (instancia.row_info.no_icon) then
|
||||
esta_barra.texto_esquerdo:SetPoint ("left", esta_barra.statusbar, "left", 2, 0)
|
||||
else
|
||||
esta_barra.texto_esquerdo:SetPoint ("left", esta_barra.icone_classe, "right", 3, 0)
|
||||
end
|
||||
|
||||
local x, y = _GetCursorPosition()
|
||||
x = _math_floor (x)
|
||||
@@ -1445,7 +1465,7 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
|
||||
gump:GradientEffect (esta_instancia.baseframe.wallpaper, "texture", _r, _g, _b, _a, _r, _g, _b, esta_instancia.baseframe.wallpaper.alpha, 1.0)
|
||||
end
|
||||
|
||||
esta_instancia.baseframe:SetFrameStrata ("LOW")
|
||||
esta_instancia.baseframe:SetFrameStrata (baseframe_strata)
|
||||
esta_instancia.baseframe.button_stretch:SetFrameStrata ("FULLSCREEN")
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_ENDSTRETCH", nil, esta_instancia.baseframe)
|
||||
end
|
||||
@@ -1462,7 +1482,7 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
|
||||
gump:GradientEffect (baseframe.wallpaper, "texture", _r, _g, _b, _a, _r, _g, _b, instancia.wallpaper.alpha, 1.0)
|
||||
end
|
||||
|
||||
baseframe:SetFrameStrata ("LOW")
|
||||
baseframe:SetFrameStrata (baseframe_strata)
|
||||
baseframe.button_stretch:SetFrameStrata ("FULLSCREEN")
|
||||
|
||||
_detalhes:SnapTextures (false)
|
||||
@@ -1830,7 +1850,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
local baseframe = CreateFrame ("scrollframe", "DetailsBaseFrame"..ID, _UIParent) --> main frame
|
||||
baseframe.instance = instancia
|
||||
baseframe:SetFrameStrata ("LOW")
|
||||
baseframe:SetFrameStrata (baseframe_strata)
|
||||
baseframe:SetFrameLevel (2)
|
||||
|
||||
local backgroundframe = CreateFrame ("scrollframe", "Details_WindowFrame"..ID, baseframe) --> main window
|
||||
@@ -1954,7 +1974,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe:EnableMouse (true)
|
||||
baseframe:SetMovable (true)
|
||||
baseframe:SetResizable (true)
|
||||
baseframe:SetMinResize (150, 40)
|
||||
baseframe:SetMinResize (150, 7)
|
||||
baseframe:SetMaxResize (_detalhes.max_window_size.width, _detalhes.max_window_size.height)
|
||||
|
||||
baseframe:SetBackdrop (gump_fundo_backdrop)
|
||||
@@ -2022,8 +2042,8 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe.resize_direita:SetHeight (16)
|
||||
baseframe.resize_direita:SetPoint ("bottomright", baseframe, "bottomright", 0, 0)
|
||||
baseframe.resize_direita:EnableMouse (true)
|
||||
baseframe.resize_direita:SetFrameLevel (baseframe:GetFrameLevel() + 6)
|
||||
baseframe.resize_direita:SetFrameStrata ("HIGH")
|
||||
baseframe.resize_direita:SetFrameLevel (baseframe:GetFrameLevel() + 6)
|
||||
baseframe.resize_direita.side = 2
|
||||
|
||||
--> lock window button
|
||||
@@ -2039,6 +2059,8 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe.lock_button.label:SetText (Loc ["STRING_LOCK_WINDOW"])
|
||||
baseframe.lock_button:SetWidth (baseframe.lock_button.label:GetStringWidth()+2)
|
||||
baseframe.lock_button:SetScript ("OnClick", lockFunctionOnClick)
|
||||
baseframe.lock_button:SetFrameStrata ("HIGH")
|
||||
baseframe.lock_button:SetFrameLevel (baseframe:GetFrameLevel() + 6)
|
||||
|
||||
--> left resizer
|
||||
baseframe.resize_esquerda = CreateFrame ("button", "Details_Resize_Esquerda"..ID, baseframe)
|
||||
@@ -2055,8 +2077,8 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe.resize_esquerda:SetHeight (16)
|
||||
baseframe.resize_esquerda:SetPoint ("bottomleft", baseframe, "bottomleft", 0, 0)
|
||||
baseframe.resize_esquerda:EnableMouse (true)
|
||||
baseframe.resize_esquerda:SetFrameLevel (baseframe:GetFrameLevel() + 6)
|
||||
baseframe.resize_esquerda:SetFrameStrata ("HIGH")
|
||||
baseframe.resize_esquerda:SetFrameLevel (baseframe:GetFrameLevel() + 6)
|
||||
|
||||
baseframe.resize_esquerda:SetAlpha (0)
|
||||
baseframe.resize_direita:SetAlpha (0)
|
||||
@@ -2088,8 +2110,11 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
-- left and right side bars ------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- ~barra ~bordas ~border
|
||||
local floatingframe = CreateFrame ("frame", "DetailsInstance"..ID.."BorderHolder", baseframe)
|
||||
floatingframe:SetFrameLevel (baseframe:GetFrameLevel()+7)
|
||||
instancia.floatingframe = floatingframe
|
||||
--> left
|
||||
baseframe.barra_esquerda = baseframe.cabecalho.fechar:CreateTexture (nil, "artwork")
|
||||
baseframe.barra_esquerda = floatingframe:CreateTexture (nil, "artwork")
|
||||
baseframe.barra_esquerda:SetTexture (DEFAULT_SKIN)
|
||||
baseframe.barra_esquerda:SetTexCoord (unpack (COORDS_LEFT_SIDE_BAR))
|
||||
baseframe.barra_esquerda:SetWidth (64)
|
||||
@@ -2097,7 +2122,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe.barra_esquerda:SetPoint ("topleft", baseframe, "topleft", -56, 0)
|
||||
baseframe.barra_esquerda:SetPoint ("bottomleft", baseframe, "bottomleft", -56, -14)
|
||||
--> right
|
||||
baseframe.barra_direita = baseframe.cabecalho.fechar:CreateTexture (nil, "artwork")
|
||||
baseframe.barra_direita = floatingframe:CreateTexture (nil, "artwork")
|
||||
baseframe.barra_direita:SetTexture (DEFAULT_SKIN)
|
||||
baseframe.barra_direita:SetTexCoord (unpack (COORDS_RIGHT_SIDE_BAR))
|
||||
baseframe.barra_direita:SetWidth (64)
|
||||
@@ -2105,7 +2130,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe.barra_direita:SetPoint ("topright", baseframe, "topright", 56, 0)
|
||||
baseframe.barra_direita:SetPoint ("bottomright", baseframe, "bottomright", 56, -14)
|
||||
--> bottom
|
||||
baseframe.barra_fundo = baseframe.cabecalho.fechar:CreateTexture (nil, "artwork")
|
||||
baseframe.barra_fundo = floatingframe:CreateTexture (nil, "artwork")
|
||||
baseframe.barra_fundo:SetTexture (DEFAULT_SKIN)
|
||||
baseframe.barra_fundo:SetTexCoord (unpack (COORDS_BOTTOM_SIDE_BAR))
|
||||
baseframe.barra_fundo:SetWidth (512)
|
||||
@@ -2297,13 +2322,15 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
esta_barra:EnableMouse (true)
|
||||
esta_barra:RegisterForClicks ("LeftButtonDown", "RightButtonDown")
|
||||
|
||||
esta_barra.statusbar = CreateFrame ("StatusBar", nil, esta_barra)
|
||||
esta_barra.statusbar = CreateFrame ("StatusBar", "DetailsBarra_Statusbar_"..instancia.meu_id.."_"..index, esta_barra)
|
||||
--esta_barra.statusbar:SetAllPoints (esta_barra)
|
||||
|
||||
esta_barra.textura = esta_barra.statusbar:CreateTexture (nil, "artwork")
|
||||
esta_barra.textura:SetHorizTile (false)
|
||||
esta_barra.textura:SetVertTile (false)
|
||||
esta_barra.textura:SetTexture (instancia.row_info.texture_file)
|
||||
|
||||
local current_texture = SharedMedia:Fetch ("statusbar", instancia.row_info.texture)
|
||||
esta_barra.textura:SetTexture (current_texture)
|
||||
|
||||
esta_barra.background = esta_barra:CreateTexture (nil, "background")
|
||||
esta_barra.background:SetTexture()
|
||||
@@ -2318,7 +2345,7 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
local icone_classe = esta_barra.statusbar:CreateTexture (nil, "overlay")
|
||||
icone_classe:SetHeight (instancia.row_info.height)
|
||||
icone_classe:SetWidth (instancia.row_info.height)
|
||||
icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_small]])
|
||||
icone_classe:SetTexture (instancia.row_info.icon_file)
|
||||
icone_classe:SetTexCoord (.75, 1, .75, 1)
|
||||
esta_barra.icone_classe = icone_classe
|
||||
|
||||
@@ -2340,11 +2367,11 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
|
||||
instancia:SetFontSize (esta_barra.texto_esquerdo, instancia.row_info.font_size)
|
||||
instancia:SetFontFace (esta_barra.texto_esquerdo, instancia.row_info.font_face_file)
|
||||
_detalhes.font_pool:add (esta_barra.texto_esquerdo)
|
||||
--_detalhes.font_pool:add (esta_barra.texto_esquerdo)
|
||||
|
||||
instancia:SetFontSize (esta_barra.texto_direita, instancia.row_info.font_size)
|
||||
instancia:SetFontFace (esta_barra.texto_direita, instancia.row_info.font_face_file)
|
||||
_detalhes.font_pool:add (esta_barra.texto_direita)
|
||||
--_detalhes.font_pool:add (esta_barra.texto_direita)
|
||||
|
||||
if (instancia.row_info.textL_outline) then
|
||||
instancia:SetFontOutline (esta_barra.texto_esquerdo, instancia.row_info.textL_outline)
|
||||
@@ -2416,11 +2443,21 @@ function _detalhes:SetBarTextSettings (size, font, fixedcolor, leftcolorbyclass,
|
||||
self:InstanceRefreshRows()
|
||||
end
|
||||
|
||||
function _detalhes:SetBarSettings (height, texture, colorclass, fixedcolor, backgroundtexture, backgroundcolorclass, backgroundfixedcolor, alpha, iconfile)
|
||||
function _detalhes:SetBarSettings (height, texture, colorclass, fixedcolor, backgroundtexture, backgroundcolorclass, backgroundfixedcolor, alpha, iconfile, barstart)
|
||||
|
||||
--> bar start
|
||||
if (type (barstart) == "boolean") then
|
||||
self.row_info.start_after_icon = barstart
|
||||
end
|
||||
|
||||
--> icon file
|
||||
if (iconfile) then
|
||||
self.row_info.icon_file = iconfile
|
||||
if (iconfile == "") then
|
||||
self.row_info.no_icon = true
|
||||
else
|
||||
self.row_info.no_icon = false
|
||||
end
|
||||
end
|
||||
|
||||
--> alpha
|
||||
@@ -2516,6 +2553,11 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
--alpha
|
||||
local alpha = self.row_info.alpha
|
||||
|
||||
--icons
|
||||
local no_icon = self.row_info.no_icon
|
||||
local icon_texture = self.row_info.icon_file
|
||||
local start_after_icon = self.row_info.start_after_icon
|
||||
|
||||
-- do it
|
||||
|
||||
for _, row in _ipairs (self.barras) do
|
||||
@@ -2524,6 +2566,24 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
row:SetHeight (height)
|
||||
row.icone_classe:SetHeight (height)
|
||||
row.icone_classe:SetWidth (height)
|
||||
|
||||
--> icon
|
||||
if (no_icon) then
|
||||
row.statusbar:SetPoint ("topleft", row, "topleft")
|
||||
row.statusbar:SetPoint ("bottomright", row, "bottomright")
|
||||
row.texto_esquerdo:SetPoint ("left", row.statusbar, "left", 2, 0)
|
||||
row.icone_classe:Hide()
|
||||
else
|
||||
if (start_after_icon) then
|
||||
row.statusbar:SetPoint ("topleft", row.icone_classe, "topright")
|
||||
else
|
||||
row.statusbar:SetPoint ("topleft", row, "topleft")
|
||||
end
|
||||
|
||||
row.statusbar:SetPoint ("bottomright", row, "bottomright")
|
||||
row.texto_esquerdo:SetPoint ("left", row.icone_classe, "right", 3, 0)
|
||||
row.icone_classe:Show()
|
||||
end
|
||||
|
||||
if (not self.row_info.texture_background_class_color) then
|
||||
local c = self.row_info.fixed_texture_background_color
|
||||
@@ -2672,7 +2732,6 @@ function _detalhes:InstanceWallpaper (texture, anchor, alpha, texcoord, width, h
|
||||
end
|
||||
|
||||
t:SetTexture (texture)
|
||||
t:SetAlpha (alpha)
|
||||
t:SetTexCoord (unpack (texcoord))
|
||||
t:SetWidth (width)
|
||||
t:SetHeight (height)
|
||||
@@ -2687,36 +2746,151 @@ function _detalhes:InstanceWallpaper (texture, anchor, alpha, texcoord, width, h
|
||||
wallpaper.height = height
|
||||
wallpaper.overlay = overlay
|
||||
|
||||
if (t.faded) then
|
||||
gump:Fade (t, "out")
|
||||
t:Show()
|
||||
--t:SetAlpha (alpha)
|
||||
gump:Fade (t, "ALPHAANIM", alpha)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:GetTextures()
|
||||
local t = {}
|
||||
t [1] = self.baseframe.rodape.esquerdo
|
||||
t [2] = self.baseframe.rodape.direita
|
||||
t [3] = self.baseframe.rodape.top_bg
|
||||
|
||||
t [4] = self.baseframe.cabecalho.ball_r
|
||||
t [5] = self.baseframe.cabecalho.ball
|
||||
t [6] = self.baseframe.cabecalho.emenda
|
||||
t [7] = self.baseframe.cabecalho.top_bg
|
||||
|
||||
t [8] = self.baseframe.barra_esquerda
|
||||
t [9] = self.baseframe.barra_direita
|
||||
t [10] = self.baseframe.UPFrame
|
||||
return t
|
||||
--atributo_icon é uma exceção
|
||||
end
|
||||
|
||||
function _detalhes:SetWindowAlphaForInteract (alpha)
|
||||
|
||||
if (self.is_interacting) then
|
||||
--> entrou
|
||||
self.baseframe:SetAlpha (alpha)
|
||||
else
|
||||
gump:Fade (t, "AlphaAnim", alpha)
|
||||
--> saiu
|
||||
if (self.combat_changes_alpha) then --> combat alpha
|
||||
self.baseframe:SetAlpha (self.combat_changes_alpha)
|
||||
else
|
||||
self.baseframe:SetAlpha (alpha)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:SetWindowAlphaForCombat (entering_in_combat)
|
||||
|
||||
local amount
|
||||
|
||||
if (entering_in_combat) then
|
||||
amount = self.hide_in_combat_alpha / 100
|
||||
self.combat_changes_alpha = amount
|
||||
else
|
||||
if (self.menu_alpha.enabled) then --auto transparency
|
||||
if (self.is_interacting) then
|
||||
amount = self.menu_alpha.onenter
|
||||
else
|
||||
amount = self.menu_alpha.onleave
|
||||
end
|
||||
else
|
||||
amount = self.color [4]
|
||||
end
|
||||
self.combat_changes_alpha = nil
|
||||
end
|
||||
|
||||
gump:Fade (self.baseframe, "ALPHAANIM", amount)
|
||||
|
||||
if (self.show_statusbar) then
|
||||
self.baseframe.barra_fundo:Hide()
|
||||
end
|
||||
if (self.hide_icon) then
|
||||
self.baseframe.cabecalho.atributo_icon:Hide()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:InstanceButtonsColors (red, green, blue, alpha, no_save, only_left, only_right)
|
||||
|
||||
if (not red) then
|
||||
red, green, blue, alpha = unpack (self.color_buttons)
|
||||
end
|
||||
|
||||
if (type (red) ~= "number") then
|
||||
red, green, blue, alpha = gump:ParseColors (red)
|
||||
end
|
||||
|
||||
if (not no_save) then
|
||||
self.color_buttons [1] = red
|
||||
self.color_buttons [2] = green
|
||||
self.color_buttons [3] = blue
|
||||
self.color_buttons [4] = alpha
|
||||
end
|
||||
|
||||
local baseToolbar = self.baseframe.cabecalho
|
||||
|
||||
|
||||
if (only_left) then
|
||||
|
||||
local icons = {baseToolbar.modo_selecao, baseToolbar.segmento, baseToolbar.atributo, baseToolbar.report}
|
||||
|
||||
for _, button in _ipairs (icons) do
|
||||
button:SetAlpha (alpha)
|
||||
end
|
||||
|
||||
if (self:IsLowerInstance()) then
|
||||
for _, ThisButton in _ipairs (_detalhes.ToolBar.Shown) do
|
||||
ThisButton:SetAlpha (alpha)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (only_right) then
|
||||
|
||||
local icons = {baseToolbar.novo, baseToolbar.fechar}
|
||||
|
||||
if (self.meu_id == _detalhes.ResetButtonInstance) then
|
||||
tinsert (icons, _detalhes.ResetButton)
|
||||
tinsert (icons, _detalhes.ResetButton2)
|
||||
end
|
||||
|
||||
for _, button in _ipairs (icons) do
|
||||
button:SetAlpha (alpha)
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
local icons = {baseToolbar.modo_selecao, baseToolbar.segmento, baseToolbar.atributo, baseToolbar.report, baseToolbar.novo, baseToolbar.fechar}
|
||||
|
||||
if (self.meu_id == _detalhes.ResetButtonInstance) then
|
||||
tinsert (icons, _detalhes.ResetButton)
|
||||
tinsert (icons, _detalhes.ResetButton2)
|
||||
end
|
||||
|
||||
for _, button in _ipairs (icons) do
|
||||
button:SetAlpha (alpha)
|
||||
end
|
||||
|
||||
if (self:IsLowerInstance()) then
|
||||
for _, ThisButton in _ipairs (_detalhes.ToolBar.Shown) do
|
||||
ThisButton:SetAlpha (alpha)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:SetWindowAlpha (alpha, run_instance_color)
|
||||
local current_alpha = self.window_alpha or 1
|
||||
|
||||
if (current_alpha > alpha) then
|
||||
gump:Fade (self.baseframe, "ALPHAANIM", alpha)
|
||||
else
|
||||
gump:Fade (self.baseframe, "ALPHAANIM", alpha)
|
||||
end
|
||||
|
||||
gump:Fade (self.baseframe.cabecalho.ball, "ALPHAANIM", alpha)
|
||||
gump:Fade (self.baseframe.cabecalho.atributo_icon, "ALPHAANIM", alpha)
|
||||
|
||||
self.window_alpha = alpha
|
||||
|
||||
if (run_instance_color) then
|
||||
self:InstanceColor()
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:InstanceColor (red, green, blue, alpha, no_save)
|
||||
function _detalhes:InstanceColor (red, green, blue, alpha, no_save, change_statusbar)
|
||||
|
||||
if (not red) then
|
||||
red, green, blue, alpha = unpack (self.color)
|
||||
no_save = true
|
||||
end
|
||||
|
||||
if (type (red) ~= "number") then
|
||||
@@ -2724,27 +2898,37 @@ function _detalhes:InstanceColor (red, green, blue, alpha, no_save)
|
||||
end
|
||||
|
||||
if (not no_save) then
|
||||
--> saving
|
||||
self.color [1] = red
|
||||
self.color [2] = green
|
||||
self.color [3] = blue
|
||||
self.color [4] = alpha
|
||||
if (change_statusbar) then
|
||||
self:StatusBarColor (red, green, blue, alpha)
|
||||
end
|
||||
else
|
||||
--> not saving
|
||||
self:StatusBarColor (nil, nil, nil, alpha, true)
|
||||
end
|
||||
|
||||
local skin = _detalhes.skins [self.skin]
|
||||
|
||||
--[[
|
||||
self.baseframe.rodape.esquerdo:SetVertexColor (red, green, blue)
|
||||
self.baseframe.rodape.esquerdo:SetAlpha (alpha)
|
||||
self.baseframe.rodape.direita:SetVertexColor (red, green, blue)
|
||||
self.baseframe.rodape.direita:SetAlpha (alpha)
|
||||
self.baseframe.rodape.top_bg:SetVertexColor (red, green, blue)
|
||||
self.baseframe.rodape.top_bg:SetAlpha (alpha)
|
||||
--]]
|
||||
|
||||
self.baseframe.cabecalho.ball_r:SetVertexColor (red, green, blue)
|
||||
self.baseframe.cabecalho.ball_r:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.ball:SetVertexColor (red, green, blue)
|
||||
if (skin.can_change_alpha_head) then
|
||||
self.baseframe.cabecalho.ball:SetAlpha (alpha)
|
||||
end
|
||||
|
||||
self.baseframe.cabecalho.ball:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.atributo_icon:SetAlpha (alpha)
|
||||
|
||||
self.baseframe.cabecalho.emenda:SetVertexColor (red, green, blue)
|
||||
self.baseframe.cabecalho.emenda:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.top_bg:SetVertexColor (red, green, blue)
|
||||
@@ -2757,7 +2941,9 @@ function _detalhes:InstanceColor (red, green, blue, alpha, no_save)
|
||||
self.baseframe.barra_fundo:SetVertexColor (red, green, blue)
|
||||
self.baseframe.barra_fundo:SetAlpha (alpha)
|
||||
|
||||
self.color[1], self.color[2], self.color[3], self.color[4] = red, green, blue, alpha
|
||||
self.baseframe.UPFrame:SetAlpha (alpha)
|
||||
|
||||
--self.color[1], self.color[2], self.color[3], self.color[4] = red, green, blue, alpha
|
||||
end
|
||||
|
||||
function _detalhes:StatusBarAlertTime (instance)
|
||||
@@ -3753,6 +3939,12 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
_detalhes.ResetButton2.Left:SetTexCoord (unpack (this_skin.reset_button_small_coords or this_skin.reset_button_coords))
|
||||
_detalhes.ResetButton2.Left:SetSize (_detalhes.ResetButton2:GetSize())
|
||||
|
||||
if (this_skin.reset_button_small_size) then
|
||||
_detalhes.ResetButton2:SetSize (unpack (this_skin.reset_button_small_size))
|
||||
else
|
||||
_detalhes.ResetButton2:SetSize (22, 15)
|
||||
end
|
||||
|
||||
--> remove propriedades do botão da blizzard
|
||||
_detalhes:DisableUIPanelButton (_detalhes.ResetButton)
|
||||
_detalhes:DisableUIPanelButton (_detalhes.ResetButton2)
|
||||
@@ -3761,6 +3953,7 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
if (_detalhes.ResetButtonInstance == self.meu_id) then
|
||||
_detalhes:RestoreUIPanelButton (_detalhes.ResetButton)
|
||||
_detalhes:RestoreUIPanelButton (_detalhes.ResetButton2)
|
||||
_detalhes.ResetButton2:SetSize (22, 15)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3769,7 +3962,7 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
if (this_skin.instance_button_coords) then
|
||||
|
||||
--> seta o botão
|
||||
self.baseframe.cabecalho.novo:SetHeight (12)
|
||||
self.baseframe.cabecalho.novo:SetHeight (this_skin.instance_button_size or 12)
|
||||
self.baseframe.cabecalho.novo.Left:SetTexture (skin_file)
|
||||
self.baseframe.cabecalho.novo.Left:SetTexCoord (unpack (this_skin.instance_button_coords))
|
||||
self.baseframe.cabecalho.novo.Left:SetSize (self.baseframe.cabecalho.novo:GetSize())
|
||||
@@ -3893,12 +4086,12 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
if (_detalhes.ResetButtonInstance == self.meu_id) then
|
||||
self:SetDeleteButtonSettings()
|
||||
end
|
||||
|
||||
|
||||
--> refresh close button
|
||||
self:SetCloseButtonSettings()
|
||||
|
||||
--> update toolbar
|
||||
self:ToolbarSide() -- aqui
|
||||
self:ToolbarSide()
|
||||
|
||||
--> update stretch button
|
||||
self:StretchButtonAnchor()
|
||||
@@ -3912,7 +4105,7 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
|
||||
--> update statusbar
|
||||
if (self.show_statusbar) then
|
||||
self:ShowStatusBar() -- aqui
|
||||
self:ShowStatusBar()
|
||||
else
|
||||
self:HideStatusBar()
|
||||
end
|
||||
@@ -3928,7 +4121,9 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
self:InstanceColor()
|
||||
self:SetBackgroundColor()
|
||||
self:SetBackgroundAlpha()
|
||||
|
||||
self:SetAutoHideMenu()
|
||||
self:SetBackdropTexture()
|
||||
|
||||
--> refresh all bars
|
||||
|
||||
self:InstanceRefreshRows()
|
||||
@@ -3936,6 +4131,15 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
--> update menu saturation
|
||||
self:DesaturateMenu()
|
||||
|
||||
--> update statusbar color
|
||||
self:StatusBarColor()
|
||||
|
||||
--> update attribute string
|
||||
self:AttributeMenu()
|
||||
self:LeftMenuAnchorSide()
|
||||
|
||||
_detalhes.ToolBar:ReorganizeIcons (nil, true) --call self:SetMenuAlpha()
|
||||
|
||||
--> refresh options panel if opened
|
||||
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
|
||||
--print (self.meu_id)
|
||||
@@ -3956,11 +4160,275 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
self.bgframe.skin = this_skin
|
||||
--self.bgframe.skin_script_instance = true
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:LeftMenuAnchorSide (side)
|
||||
|
||||
if (not side) then
|
||||
side = self.menu_anchor.side
|
||||
end
|
||||
|
||||
self.menu_anchor.side = side
|
||||
|
||||
return self:MenuAnchor()
|
||||
|
||||
end
|
||||
|
||||
-- ~attributemenu
|
||||
function _detalhes:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side)
|
||||
|
||||
if (type (enabled) ~= "boolean") then
|
||||
enabled = self.attribute_text.enabled
|
||||
end
|
||||
|
||||
if (not pos_x) then
|
||||
pos_x = self.attribute_text.anchor [1]
|
||||
end
|
||||
if (not pos_y) then
|
||||
pos_y = self.attribute_text.anchor [2]
|
||||
end
|
||||
|
||||
if (not font) then
|
||||
font = self.attribute_text.text_face
|
||||
end
|
||||
|
||||
if (not size) then
|
||||
size = self.attribute_text.text_size
|
||||
end
|
||||
|
||||
if (not color) then
|
||||
color = self.attribute_text.text_color
|
||||
end
|
||||
|
||||
if (not side) then
|
||||
side = self.attribute_text.side
|
||||
end
|
||||
|
||||
self.attribute_text.enabled = enabled
|
||||
self.attribute_text.anchor [1] = pos_x
|
||||
self.attribute_text.anchor [2] = pos_y
|
||||
self.attribute_text.text_face = font
|
||||
self.attribute_text.text_size = size
|
||||
self.attribute_text.text_color = color
|
||||
self.attribute_text.side = side
|
||||
|
||||
--> enabled
|
||||
if (not enabled and self.menu_attribute_string) then
|
||||
return self.menu_attribute_string:Hide()
|
||||
elseif (not enabled) then
|
||||
return
|
||||
end
|
||||
|
||||
if (not self.menu_attribute_string) then
|
||||
|
||||
local label = gump:NewLabel (self.floatingframe, nil, "DetailsAttributeStringInstance" .. self.meu_id, nil, "", "GameFontHighlightSmall")
|
||||
self.menu_attribute_string = label
|
||||
self.menu_attribute_string.text = _detalhes:GetSubAttributeName (self.atributo, self.sub_atributo)
|
||||
self.menu_attribute_string.owner_instance = self
|
||||
|
||||
self.menu_attribute_string.Enabled = true
|
||||
self.menu_attribute_string.__enabled = true
|
||||
|
||||
function self.menu_attribute_string:OnEvent (instance, attribute, subAttribute)
|
||||
if (instance == label.owner_instance) then
|
||||
label.text = _detalhes:GetSubAttributeName (attribute, subAttribute)
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:RegisterEvent (self.menu_attribute_string, "DETAILS_INSTANCE_CHANGEATTRIBUTE", self.menu_attribute_string.OnEvent)
|
||||
|
||||
end
|
||||
|
||||
self.menu_attribute_string:Show()
|
||||
|
||||
--> anchor
|
||||
if (side == 1) then --> a string esta no lado de cima
|
||||
if (self.toolbar_side == 1) then -- a toolbar esta em cima
|
||||
self.menu_attribute_string:ClearAllPoints()
|
||||
self.menu_attribute_string:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", self.attribute_text.anchor [1], self.attribute_text.anchor [2])
|
||||
|
||||
elseif (self.toolbar_side == 2) then --a toolbar esta em baixo
|
||||
self.menu_attribute_string:ClearAllPoints()
|
||||
self.menu_attribute_string:SetPoint ("bottomleft", self.baseframe, "topleft", self.attribute_text.anchor [1] + 21, self.attribute_text.anchor [2])
|
||||
|
||||
end
|
||||
|
||||
elseif (side == 2) then --> a string esta no lado de baixo
|
||||
if (self.toolbar_side == 1) then --toolbar esta em cima
|
||||
self.menu_attribute_string:ClearAllPoints()
|
||||
self.menu_attribute_string:SetPoint ("left", self.baseframe.rodape.StatusBarLeftAnchor, "left", self.attribute_text.anchor [1] + 16, self.attribute_text.anchor [2] - 6)
|
||||
|
||||
elseif (self.toolbar_side == 2) then --toolbar esta em baixo
|
||||
self.menu_attribute_string:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "topright", self.attribute_text.anchor [1], self.attribute_text.anchor [2] - 19)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--font face
|
||||
local fontPath = SharedMedia:Fetch ("font", font)
|
||||
_detalhes:SetFontFace (self.menu_attribute_string, fontPath)
|
||||
|
||||
--font size
|
||||
_detalhes:SetFontSize (self.menu_attribute_string, size)
|
||||
|
||||
--color
|
||||
_detalhes:SetFontColor (self.menu_attribute_string, color)
|
||||
|
||||
end
|
||||
|
||||
-- ~backdrop
|
||||
function _detalhes:SetBackdropTexture (texturename)
|
||||
|
||||
if (not texturename) then
|
||||
texturename = self.backdrop_texture
|
||||
end
|
||||
|
||||
self.backdrop_texture = texturename
|
||||
|
||||
local texture_path = SharedMedia:Fetch ("background", texturename)
|
||||
|
||||
self.baseframe:SetBackdrop ({
|
||||
bgFile = texture_path, tile = true, tileSize = 128,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0}}
|
||||
)
|
||||
self.bgdisplay:SetBackdrop ({
|
||||
bgFile = texture_path, tile = true, tileSize = 128,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0}}
|
||||
)
|
||||
|
||||
self:SetBackgroundAlpha (self.bg_alpha)
|
||||
|
||||
end
|
||||
|
||||
-- ~alpha
|
||||
function _detalhes:SetAutoHideMenu (left, right, interacting)
|
||||
|
||||
if (interacting) then
|
||||
if (self.is_interacting) then
|
||||
if (self.auto_hide_menu.left) then
|
||||
local r, g, b = unpack (self.color_buttons)
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, true) --no save, only left
|
||||
end
|
||||
if (self.auto_hide_menu.right) then
|
||||
local r, g, b = unpack (self.color_buttons)
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, nil, true) --no save, only right
|
||||
end
|
||||
else
|
||||
if (self.auto_hide_menu.left) then
|
||||
local r, g, b = unpack (self.color_buttons)
|
||||
self:InstanceButtonsColors (r, g, b, 0, true, true) --no save, only left
|
||||
end
|
||||
if (self.auto_hide_menu.right) then
|
||||
local r, g, b = unpack (self.color_buttons)
|
||||
self:InstanceButtonsColors (r, g, b, 0, true, nil, true) --no save, only right
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if (left == nil) then
|
||||
left = self.auto_hide_menu.left
|
||||
end
|
||||
if (right == nil) then
|
||||
right = self.auto_hide_menu.right
|
||||
end
|
||||
|
||||
self.auto_hide_menu.left = left
|
||||
self.auto_hide_menu.right = right
|
||||
|
||||
local r, g, b = unpack (self.color_buttons)
|
||||
|
||||
if (not left) then
|
||||
--auto hide is off
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, true) --no save, only left
|
||||
else
|
||||
if (self.is_interacting) then
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, true) --no save, only left
|
||||
else
|
||||
self:InstanceButtonsColors (0, 0, 0, 0, true, true) --no save, only left
|
||||
end
|
||||
end
|
||||
|
||||
if (not right) then
|
||||
--auto hide is off
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, nil, true) --no save, only right
|
||||
else
|
||||
if (self.is_interacting) then
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, nil, true) --no save, only right
|
||||
else
|
||||
self:InstanceButtonsColors (0, 0, 0, 0, true, nil, true) --no save, only right
|
||||
end
|
||||
end
|
||||
|
||||
--auto_hide_menu = {left = false, right = false},
|
||||
|
||||
end
|
||||
function _detalhes:SetMenuAlpha (enabled, onenter, onleave, interacting)
|
||||
|
||||
if (interacting) then --> called from a onenter or onleave script
|
||||
if (self.menu_alpha.enabled) then
|
||||
if (self.is_interacting) then
|
||||
return self:SetWindowAlphaForInteract (self.menu_alpha.onenter)
|
||||
else
|
||||
return self:SetWindowAlphaForInteract (self.menu_alpha.onleave)
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if (enabled == nil) then
|
||||
enabled = self.menu_alpha.enabled
|
||||
end
|
||||
if (not onenter) then
|
||||
onenter = self.menu_alpha.onenter
|
||||
end
|
||||
if (not onleave) then
|
||||
onleave = self.menu_alpha.onleave
|
||||
end
|
||||
|
||||
self.menu_alpha.enabled = enabled
|
||||
self.menu_alpha.onenter = onenter
|
||||
self.menu_alpha.onleave = onleave
|
||||
|
||||
if (not enabled) then
|
||||
return self:SetWindowAlphaForInteract (self.color [4])
|
||||
end
|
||||
|
||||
if (self.is_interacting) then
|
||||
return self:SetWindowAlphaForInteract (onenter) --> set alpha
|
||||
else
|
||||
return self:SetWindowAlphaForInteract (onleave) --> set alpha
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:GetInstanceCurrentAlpha()
|
||||
if (self.menu_alpha.enabled) then
|
||||
if (self:IsInteracting()) then
|
||||
return self.menu_alpha.onenter
|
||||
else
|
||||
return self.menu_alpha.onleave
|
||||
end
|
||||
else
|
||||
return self.color [4]
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:GetInstanceIconsCurrentAlpha()
|
||||
if (self.menu_alpha.enabled and self.menu_alpha.iconstoo) then
|
||||
if (self:IsInteracting()) then
|
||||
return self.menu_alpha.onenter
|
||||
else
|
||||
return self.menu_alpha.onleave
|
||||
end
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:ToolbarSide (side)
|
||||
|
||||
if (not side) then
|
||||
@@ -4053,6 +4521,8 @@ function _detalhes:ToolbarSide (side)
|
||||
self:ShowSideBars()
|
||||
end
|
||||
|
||||
self:AttributeMenu()
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:StretchButtonAnchor (side)
|
||||
@@ -4137,26 +4607,52 @@ function _detalhes:MenuAnchor (x, y)
|
||||
self.menu_anchor [1] = x
|
||||
self.menu_anchor [2] = y
|
||||
|
||||
if (self.consolidate) then
|
||||
self.consolidateButton:ClearAllPoints()
|
||||
|
||||
if (self.toolbar_side == 1) then --> top
|
||||
self.consolidateButton:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", x, y)
|
||||
if (self.menu_anchor.side == 1) then --> left
|
||||
if (self.consolidate) then
|
||||
self.consolidateButton:ClearAllPoints()
|
||||
|
||||
else --> bottom
|
||||
|
||||
self.consolidateButton:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, y*-1)
|
||||
end
|
||||
|
||||
else --> not consolidated
|
||||
self.baseframe.cabecalho.modo_selecao:ClearAllPoints()
|
||||
|
||||
if (self.toolbar_side == 1) then --> top
|
||||
self.baseframe.cabecalho.modo_selecao:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", x, y)
|
||||
if (self.toolbar_side == 1) then --> top
|
||||
self.consolidateButton:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", x, y)
|
||||
|
||||
else --> bottom
|
||||
|
||||
else --> bottom
|
||||
self.baseframe.cabecalho.modo_selecao:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, y*-1)
|
||||
self.consolidateButton:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, y*-1)
|
||||
end
|
||||
|
||||
else --> not consolidated
|
||||
self.baseframe.cabecalho.modo_selecao:ClearAllPoints()
|
||||
|
||||
if (self.toolbar_side == 1) then --> top
|
||||
self.baseframe.cabecalho.modo_selecao:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", x, y)
|
||||
|
||||
else --> bottom
|
||||
self.baseframe.cabecalho.modo_selecao:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, y*-1)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
elseif (self.menu_anchor.side == 2) then --> right
|
||||
if (self.consolidate) then
|
||||
self.consolidateButton:ClearAllPoints()
|
||||
|
||||
if (self.toolbar_side == 1) then --> top
|
||||
self.consolidateButton:SetPoint ("bottomright", self.baseframe, "topright", x, y)
|
||||
|
||||
else --> bottom
|
||||
|
||||
self.consolidateButton:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, y*-1)
|
||||
end
|
||||
|
||||
else --> not consolidated
|
||||
self.baseframe.cabecalho.modo_selecao:ClearAllPoints()
|
||||
|
||||
if (self.toolbar_side == 1) then --> top
|
||||
self.baseframe.cabecalho.modo_selecao:SetPoint ("topleft", self.baseframe.cabecalho.ball_r, "bottomleft", x, y+16)
|
||||
|
||||
else --> bottom
|
||||
self.baseframe.cabecalho.modo_selecao:SetPoint ("topleft", self.baseframe.cabecalho.ball_r, "topleft", x, y*-1)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -4345,6 +4841,29 @@ function _detalhes:HideStatusBar (instancia)
|
||||
_detalhes.StatusBar:Hide (self) --> mini displays widgets
|
||||
end
|
||||
|
||||
function _detalhes:StatusBarColor (r, g, b, a, no_save)
|
||||
|
||||
if (not r) then
|
||||
r, g, b = unpack (self.statusbar_info.overlay)
|
||||
a = a or self.statusbar_info.alpha
|
||||
end
|
||||
|
||||
if (not no_save) then
|
||||
self.statusbar_info.overlay [1] = r
|
||||
self.statusbar_info.overlay [2] = g
|
||||
self.statusbar_info.overlay [3] = b
|
||||
self.statusbar_info.alpha = a
|
||||
end
|
||||
|
||||
self.baseframe.rodape.esquerdo:SetVertexColor (r, g, b)
|
||||
self.baseframe.rodape.esquerdo:SetAlpha (a)
|
||||
self.baseframe.rodape.direita:SetVertexColor (r, g, b)
|
||||
self.baseframe.rodape.direita:SetAlpha (a)
|
||||
self.baseframe.rodape.top_bg:SetVertexColor (r, g, b)
|
||||
self.baseframe.rodape.top_bg:SetAlpha (a)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:ShowStatusBar (instancia)
|
||||
if (instancia) then
|
||||
self = instancia
|
||||
@@ -4458,6 +4977,15 @@ function gump:CriaCabecalho (baseframe, instancia)
|
||||
|
||||
BGFrame_scripts (baseframe.UPFrame, baseframe, instancia)
|
||||
|
||||
--> corrige o vão entre o baseframe e o upframe
|
||||
baseframe.UPFrameConnect = CreateFrame ("frame", "DetailsAntiGap"..instancia.meu_id, baseframe)
|
||||
baseframe.UPFrameConnect:SetPoint ("bottomleft", baseframe, "topleft", 0, -1)
|
||||
baseframe.UPFrameConnect:SetPoint ("bottomright", baseframe, "topright", 0, -1)
|
||||
baseframe.UPFrameConnect:SetHeight (2)
|
||||
baseframe.UPFrameConnect:EnableMouse (true)
|
||||
baseframe.UPFrameConnect:SetMovable (true)
|
||||
baseframe.UPFrameConnect:SetResizable (true)
|
||||
BGFrame_scripts (baseframe.UPFrameConnect, baseframe, instancia)
|
||||
|
||||
-- botões
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -4854,9 +5382,7 @@ function gump:CriaCabecalho (baseframe, instancia)
|
||||
instancia = _detalhes:GetInstance (instancia)
|
||||
end
|
||||
|
||||
--print (instancia.baseframe, instancia.baseframe:GetObjectType())
|
||||
|
||||
if (instancia.baseframe:GetWidth() < 215) then
|
||||
if (instancia.baseframe:GetWidth() < 215 or instancia.resetbutton_info.always_small) then
|
||||
_detalhes.ResetButtonMode = 2
|
||||
else
|
||||
_detalhes.ResetButtonMode = 1
|
||||
|
||||
@@ -171,7 +171,7 @@ function _detalhes:OpenWelcomeWindow ()
|
||||
Loc ["STRING_WELCOME_41"] = "Some Cool Interface Tweaks:"
|
||||
|
||||
Loc ["STRING_WELCOME_42"] = "Quick Appearance Settings"
|
||||
Loc ["STRING_WELCOME_43"] = "Bellow there is few settings for change the look of window."
|
||||
Loc ["STRING_WELCOME_43"] = "Choose your prefered skin:"
|
||||
Loc ["STRING_WELCOME_44"] = "Wallpaper"
|
||||
Loc ["STRING_WELCOME_45"] = "For more customization options, check the options panel."
|
||||
|
||||
@@ -229,7 +229,7 @@ function _detalhes:OpenWelcomeWindow ()
|
||||
Loc ["STRING_WELCOME_41"] = "Alguns ajustes bacanas na interface:"
|
||||
|
||||
Loc ["STRING_WELCOME_42"] = "Ajustes na Aparencia"
|
||||
Loc ["STRING_WELCOME_43"] = "Abaixo estao algumas opcoes para mudar a aparencia da janela."
|
||||
Loc ["STRING_WELCOME_43"] = "Escolha sua Skin preferida:"
|
||||
Loc ["STRING_WELCOME_44"] = "Papel de Parede"
|
||||
Loc ["STRING_WELCOME_45"] = "Para mais ajustes na aparencia, veja o painel de opcoes."
|
||||
|
||||
@@ -679,7 +679,12 @@ function _detalhes:OpenWelcomeWindow ()
|
||||
texto_appearance:SetJustifyV ("top")
|
||||
texto_appearance:SetTextColor (1, 1, 1, 1)
|
||||
|
||||
--> widgets (all raw copy from options panel):
|
||||
local skins_image = window:CreateTexture (nil, "overlay")
|
||||
skins_image:SetTexture ([[Interface\Addons\Details\images\icons2]])
|
||||
skins_image:SetPoint ("topright", window, "topright", -30, -24)
|
||||
skins_image:SetWidth (214)
|
||||
skins_image:SetHeight (133)
|
||||
skins_image:SetTexCoord (0, 0.41796875, 0, 0.259765625) --0, 0, 214 133
|
||||
|
||||
|
||||
--skin
|
||||
@@ -945,7 +950,7 @@ function _detalhes:OpenWelcomeWindow ()
|
||||
end
|
||||
end
|
||||
|
||||
pages [#pages+1] = {bg55, texto55, texto555, changemind, texto_appearance, skin_dropdown, skin_label, wallpaper_label_switch, wallpaper_switch, wallpaper_dropdown1, wallpaper_dropdown2, }
|
||||
pages [#pages+1] = {bg55, texto55, texto555, skins_image, changemind, texto_appearance, skin_dropdown, skin_label, wallpaper_label_switch, wallpaper_switch, wallpaper_dropdown1, wallpaper_dropdown2, }
|
||||
|
||||
for _, widget in ipairs (pages[#pages]) do
|
||||
widget:Hide()
|
||||
|
||||
+6
-3
@@ -27,6 +27,9 @@ do
|
||||
frame:SetBackdropBorderColor (170/255, 170/255, 170/255)
|
||||
frame:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
|
||||
frame:SetFrameStrata ("HIGH")
|
||||
frame:SetFrameLevel (8)
|
||||
|
||||
function _detalhes.switch:CloseMe()
|
||||
_detalhes.switch.frame:Hide()
|
||||
_detalhes.switch.frame:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
@@ -34,10 +37,10 @@ do
|
||||
end
|
||||
|
||||
--> limitação: não tenho como pegar o base frame da instância por aqui
|
||||
frame.close = gump:NewDetailsButton (frame, frame, _, function() end, nil, nil, 1, 1, "", "", "", "", {rightFunc = {func = _detalhes.switch.CloseMe, param1 = nil, param2 = nil}})
|
||||
frame.close = gump:NewDetailsButton (frame, frame, _, function() end, nil, nil, 1, 1, "", "", "", "", {rightFunc = {func = _detalhes.switch.CloseMe, param1 = nil, param2 = nil}}, "DetailsSwitchPanelClose")
|
||||
frame.close:SetPoint ("topleft", frame, "topleft")
|
||||
frame.close:SetPoint ("bottomright", frame, "bottomright")
|
||||
frame.close:SetFrameLevel (frame:GetFrameLevel()+1)
|
||||
frame.close:SetFrameLevel (9)
|
||||
frame:Hide()
|
||||
|
||||
_detalhes.switch.frame = frame
|
||||
@@ -58,7 +61,7 @@ function _detalhes.switch:ShowMe (instancia)
|
||||
|
||||
_detalhes.switch.current_instancia = instancia
|
||||
|
||||
_detalhes.switch.frame:SetFrameLevel (instancia.baseframe:GetFrameLevel() + 5)
|
||||
--_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)
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,7 +3,8 @@ if not Loc then return end
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.12.0|r\n\n|cFFFFFF00-|r Added support to Profiles, now you can share the same config between two or more characters.\n\n|cFFFFFF00-|r - Options window now can be opened while in combat without triggering 'script ran too long' error.\n\n|cFFFFFF00-|r Added support for BattleTag friends over report window.\n\n|cFFFFFF00-|r Added pet threat to Tiny Threat plugin when out of a party or raid group.\n\n|cFFFFFF00-|r Fixed a issue with close button where it disappear without close the window when toolbar is in bottom side.\n\n|cFFFFFF00-|r Also fixed a issue where swapping toolbar positioning was sometimes making close button disappear.\n\n|cFFFFFF00-|r Fixed a problem opening options panel through minimap when there is no window opened.\n\n|cFFFFFF00v1.11.10|r\n\n|cFFFFFF00-|r Accuracy with warcraftlogs.com now is very high and okey with worldoflogs.com. Make sure the option |cFFFFDD00Time Measure|r under General Settings -> Combat is set to |cFFFFDD00Effective Time|r.\n\n|cFFFFFF00-|r Options Window has been revamped, again.\n\n|cFFFFFF00-|r Added a option for change the class icons.\n\n|cFFFFFF00-|r Added options for show Total Bar and configure it.\n\n|cFFFFFF00-|r Added a option for save a Standard Skin, new windows opened use this skin.\n\n|cFFFFFF00-|r Added a new skin: ElvUI Frame Style.\n\n|cFFFFFF00-|r When hover a spell icon under Player Details Window, the spell description is shown.\n\n|cFFFFFF00-|r Pressing Shift key on a spell bar over the Encounter Details Window, shows up the spell description.\n\n|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Added new skin: Minimalistic, a very clean one.\n\n|cFFFFFF00-|r Added a new tab called avoidance on Player Details window for tanks.\n\n|cFFFFFF00-|r Added Copy & Paste option on report window. Now you can share your dps on twitter and facebook!\n\n|cFFFFFF00-|r Added a new option for auto switch what a window shows when you enter in a combat.\n\n|cFFFFFF00-|r Fixed issue with window background alpha which was changing the value everytime the options window is opened.\n\n|cFFFFFF00-|r Fixed the gap between the bar and the window background when disabling borders.\n\n|cFFFFFF00-|r Make some improvements on Tiny Threat plugin.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Fixed more known issues with skins.\n\n|cFFFFFF00-|r Fixed an issue where plugin icons wasn't hiding after close all windows.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Fixed bugs where Details! stop working if no plugin is actived on Wow addon panel.\n\n|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Fixed a issue with overall data Dps when have only one segment.\n\n|cFFFFFF00-|r Changed colors and added some backgrounds for menus.\n\n|cFFFFFF00-|r Options panel has his height size increased.\n\n|cFFFFFF00-|r Added options for hide the window or change the transparency when in combat.\n\n|cFFFFFF00-|r Added a control panel for plugins, where you can enable or disable then.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|r More fixes on Skins support and new tools for plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Minor bug fixes and improvements on Welcome Screen."
|
||||
|
||||
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.12.3|r\n\n|cFFFFFF00-|r - Fixed "Healing Per Second" which wasn't working at all.\n\n|cFFFFFF00-|r - Fixed the percent amount for target of damage done where sometimes it pass 100%.\n\n|cFFFFFF00-|r - Changes on Skins: "Minimalistic" and "Elm UI Frame Style". It's necessary re-apply.\n\n|cFFFFFF00-|r - Added more cooldowns and spells for Monk tank over avoidance panel.\n\n|cFFFFFF00-|r - Player avatar now is also shown on the Player Details window.\n\n|cFFFFFF00-|r - Leaving empty the the icon file box, make details use no icons on bars.\n\n|cFFFFFF00-|r - Added new feature: Auto Transparency, hide or show menus, statusbar and borders when mouse enter or leaves the window.\n\n|cFFFFFF00-|r - Added new feature: Attribute Text, shows on the toolbar or statusbar the current attribute shown.\n\n|cFFFFFF00-|r - Added new fueature: Auto Hide Menu, which hide or show the menus when mouse enter or leaves the window.\n\n|cFFFFFF00-|r - Image Editor now can Flip the image without messing with the crop.\n\n|cFFFFFF00v1.12.0|r\n\n|cFFFFFF00-|r Added support to Profiles, now you can share the same config between two or more characters.\n\n|cFFFFFF00-|r - Options window now can be opened while in combat without triggering 'script ran too long' error.\n\n|cFFFFFF00-|r Added support for BattleTag friends over report window.\n\n|cFFFFFF00-|r Added pet threat to Tiny Threat plugin when out of a party or raid group.\n\n|cFFFFFF00-|r Fixed a issue with close button where it disappear without close the window when toolbar is in bottom side.\n\n|cFFFFFF00-|r Also fixed a issue where swapping toolbar positioning was sometimes making close button disappear.\n\n|cFFFFFF00-|r Fixed a problem opening options panel through minimap when there is no window opened.\n\n|cFFFFFF00v1.11.10|r\n\n|cFFFFFF00-|r Accuracy with warcraftlogs.com now is very high and okey with worldoflogs.com. Make sure the option |cFFFFDD00Time Measure|r under General Settings -> Combat is set to |cFFFFDD00Effective Time|r.\n\n|cFFFFFF00-|r Options Window has been revamped, again.\n\n|cFFFFFF00-|r Added a option for change the class icons.\n\n|cFFFFFF00-|r Added options for show Total Bar and configure it.\n\n|cFFFFFF00-|r Added a option for save a Standard Skin, new windows opened use this skin.\n\n|cFFFFFF00-|r Added a new skin: ElvUI Frame Style.\n\n|cFFFFFF00-|r When hover a spell icon under Player Details Window, the spell description is shown.\n\n|cFFFFFF00-|r Pressing Shift key on a spell bar over the Encounter Details Window, shows up the spell description.\n\n|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Added new skin: Minimalistic, a very clean one.\n\n|cFFFFFF00-|r Added a new tab called avoidance on Player Details window for tanks.\n\n|cFFFFFF00-|r Added Copy & Paste option on report window. Now you can share your dps on twitter and facebook!\n\n|cFFFFFF00-|r Added a new option for auto switch what a window shows when you enter in a combat.\n\n|cFFFFFF00-|r Fixed issue with window background alpha which was changing the value everytime the options window is opened.\n\n|cFFFFFF00-|r Fixed the gap between the bar and the window background when disabling borders.\n\n|cFFFFFF00-|r Make some improvements on Tiny Threat plugin.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Fixed more known issues with skins.\n\n|cFFFFFF00-|r Fixed an issue where plugin icons wasn't hiding after close all windows.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Fixed bugs where Details! stop working if no plugin is actived on Wow addon panel.\n\n|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs."
|
||||
|
||||
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name
|
||||
|
||||
@@ -27,6 +28,8 @@ if not Loc then return end
|
||||
Loc ["STRING_MINIMAPMENU_UNLOCK"] = "Unlock"
|
||||
Loc ["STRING_MINIMAPMENU_LOCK"] = "Lock"
|
||||
|
||||
Loc ["STRING_WINDOW_MENU_UNLOCKED"] = "Left menu unlocked, set Menu Pos X > 20 over options panel to lock again."
|
||||
|
||||
Loc ["STRING_RESETBUTTON_WRONG_INSTANCE"] = "Warning, reset button isn't in the current editing instance."
|
||||
|
||||
Loc ["STRING_INTERFACE_OPENOPTIONS"] = "Open Options Panel"
|
||||
@@ -505,7 +508,10 @@ if not Loc then return end
|
||||
Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"] = "When enabled, the instance bars background have the color of the character class.\n\nIf disabled, the color chosen on the right box will be used."
|
||||
|
||||
Loc ["STRING_OPTIONS_BAR_ICONFILE"] = "Icon File"
|
||||
Loc ["STRING_OPTIONS_BAR_ICONFILE_DESC"] = "This option load a image responsable for the class icons in each row.\nThe image file need to be a .tga file with alpha channel.\n\nDetails! have three image icon files:\n\n- |cFFFFFF00classes|r\n- |cFFFFFF00classes_small|r\n- |cFFFFFF00classes_small_alpha|r\n\nAlso there is files inside wow which can be used:\n\n- |cFFFFFF00Interface\\ARENAENEMYFRAME\\UI-CLASSES-CIRCLES|r\n- |cFFFFFF00Interface\\Glues\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES|r"
|
||||
Loc ["STRING_OPTIONS_BAR_ICONFILE_DESC"] = "This option load a image responsable for the class icons in each row.\nThe image file need to be a .tga file with alpha channel.\n\nDetails! have three image icon files:\n\n- |cFFFFFF00classes|r\n- |cFFFFFF00classes_small|r\n- |cFFFFFF00classes_small_alpha|r\n\nAlso there is files inside wow which can be used:\n\n- |cFFFFFF00Interface\\ARENAENEMYFRAME\\UI-CLASSES-CIRCLES|r\n- |cFFFFFF00Interface\\Glues\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES|r\n\nLeave the field empty to hide all icons."
|
||||
|
||||
Loc ["STRING_OPTIONS_BARSTART"] = "Bar Start After Icon"
|
||||
Loc ["STRING_OPTIONS_BARSTART_DESC"] = "Control if the bar starts on the right side of the icon or on the left side.\n\nThis is useful when using icons with some transparency."
|
||||
--
|
||||
Loc ["STRING_OPTIONS_TEXT"] = "Bar Text Settings"
|
||||
Loc ["STRING_OPTIONS_TEXT_DESC"] = "This options control the appearance of the instance bar texts."
|
||||
@@ -529,8 +535,8 @@ if not Loc then return end
|
||||
Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR_DESC"] = "When enabled, the right text uses the class color of the character.\n\nIf disabled, choose the color on the color picker button."
|
||||
|
||||
Loc ["STRING_OPTIONS_TEXT_FIXEDCOLOR"] = "Text Color"
|
||||
Loc ["STRING_OPTIONS_TEXT_ROWCOLOR"] = "Row Background Color"
|
||||
Loc ["STRING_OPTIONS_TEXT_ROWCOLOR2"] = "Row Color"
|
||||
Loc ["STRING_OPTIONS_TEXT_ROWCOLOR"] = "Alpha and Color When Not By Class"
|
||||
Loc ["STRING_OPTIONS_TEXT_ROWCOLOR2"] = "Color When Not By Class"
|
||||
--
|
||||
Loc ["STRING_OPTIONS_INSTANCE"] = "Instance Settings"
|
||||
Loc ["STRING_OPTIONS_INSTANCE_DESC"] = "This options control the appearance of the instance it self."
|
||||
@@ -538,6 +544,9 @@ if not Loc then return end
|
||||
Loc ["STRING_OPTIONS_INSTANCE_COLOR"] = "Window Color"
|
||||
Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] = "Change the color and alpha of instance window."
|
||||
|
||||
Loc ["STRING_OPTIONS_INSTANCE_BACKDROP"] = "Background Texture"
|
||||
Loc ["STRING_OPTIONS_INSTANCE_BACKDROP_DESC"] = "Select the background texture used by this window."
|
||||
|
||||
Loc ["STRING_OPTIONS_INSTANCE_ALPHA"] = "Background Alpha"
|
||||
Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"] = "This option let you change the transparency of the instance window background."
|
||||
Loc ["STRING_OPTIONS_INSTANCE_ALPHA2"] = "Background Color"
|
||||
@@ -566,9 +575,9 @@ if not Loc then return end
|
||||
Loc ["STRING_OPTIONS_SKIN_A"] = "Skin Settings"
|
||||
Loc ["STRING_OPTIONS_SKIN_A_DESC"] = "This options allows you to change the skin."
|
||||
|
||||
Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS"] = "Toolbar Settings"
|
||||
Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS"] = "Left Menu Settings"
|
||||
Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS_DESC"] = "This options change the main menu on the top of the window."
|
||||
Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS"] = "Toolbar Button Settings"
|
||||
Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS"] = "Right Menu Settings"
|
||||
Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS_DESC"] = "This options change the reset, instance and close buttons from the toolbar menu on the top of the window."
|
||||
|
||||
Loc ["STRING_OPTIONS_DESATURATE_MENU"] = "Desaturate Menu"
|
||||
@@ -578,11 +587,52 @@ Loc ["STRING_OPTIONS_HIDE_ICON"] = "Hide Icon"
|
||||
Loc ["STRING_OPTIONS_HIDE_ICON_DESC"] = "When enabled, the icon on the top left corner isn't draw.\n\nSome skins may prefer remove this icon."
|
||||
|
||||
Loc ["STRING_OPTIONS_MENU_X"] = "Menu Pos X"
|
||||
Loc ["STRING_OPTIONS_MENU_X_DESC"] = "Slightly move the main menu on tooltip to the left or right direction."
|
||||
Loc ["STRING_OPTIONS_MENU_X_DESC"] = "Move the left menu position, the first slider changes the horizontal axis, the second changes the vertical axis.\n\nIf menu anchor is set to right side, use -67 if this instance isn't hosting the reset button."
|
||||
|
||||
Loc ["STRING_OPTIONS_MENU_Y"] = "Menu Pos Y"
|
||||
Loc ["STRING_OPTIONS_MENU_Y_DESC"] = "Slightly move the main menu on tooltip to the up or down direction."
|
||||
|
||||
Loc ["STRING_OPTIONS_MENU_ANCHOR"] = "Menu Anchor Side"
|
||||
Loc ["STRING_OPTIONS_MENU_ANCHOR_DESC"] = "Change if the left menu is attached within left side of window or in the right side."
|
||||
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ANCHOR"] = "Attribute Text"
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ENABLED"] = "Enabled"
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ENABLED_DESC"] = "Enable or disable the attribute name which is current shown on this instance."
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ANCHORX"] = "Pos X"
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ANCHORY"] = "Pos Y"
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ANCHORX_DESC"] = "Adjust the attribute text location on the X axis."
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ANCHORY_DESC"] = "Adjust the attribute text location on the Y axis."
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_FONT"] = "Text Font"
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_FONT_DESC"] = "Select the text font for attribute text."
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTSIZE"] = "Text Size"
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTSIZE_DESC"] = "Adjust the size of attribute text."
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTCOLOR"] = "Text Color"
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTCOLOR_DESC"] = "Change the attribute text color."
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SIDE"] = "Text Anchor"
|
||||
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SIDE_DESC"] = "Choose where the text is anchored."
|
||||
|
||||
Loc ["STRING_OPTIONS_MENU_AUTOHIDE_ANCHOR"] = "Auto Hide Menu Buttons"
|
||||
Loc ["STRING_OPTIONS_MENU_AUTOHIDE_LEFT"] = "Left Menu"
|
||||
Loc ["STRING_OPTIONS_MENU_AUTOHIDE_RIGHT"] = "Right Menu"
|
||||
Loc ["STRING_OPTIONS_MENU_AUTOHIDE_DESC"] = "When enabled the chosen menu automatically hides itself when the mouse leaves the Details! window and shows up when you are interacting with it again."
|
||||
|
||||
Loc ["STRING_OPTIONS_INSTANCE_STATUSBAR_ANCHOR"] = "Statusbar"
|
||||
Loc ["STRING_OPTIONS_INSTANCE_STATUSBARCOLOR"] = "Color and Transparency"
|
||||
Loc ["STRING_OPTIONS_INSTANCE_STATUSBARCOLOR_DESC"] = "This option overwrite the default statusbar color and transparency."
|
||||
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHA"] = "Auto Transparency:"
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHAENABLED"] = "Enabled"
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHAENTER"] = "When Interacting"
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHALEAVE"] = "Stand by"
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHAICONSTOO"] = "Affect Buttons"
|
||||
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHAENABLED_DESC"] = "Enable or disable the auto transparency. When enabled, the alpha changes automatically when you hover and leave the window.\n\nThis settings overwrite the alpha selected over window settings."
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHAENTER_DESC"] = "When you have the mouse over the window, the transparency changes to this value."
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHALEAVE_DESC"] = "When you don't have the mouse over the window, the transparency changes to this value."
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHAICONSTOO_DESC"] = "If enabled, all icons, buttons, also have their alpha affected by this feature."
|
||||
|
||||
Loc ["STRING_OPTIONS_MENU_ALPHAWARNING"] = "Auto Transparency is enabled, alpha may not be affected."
|
||||
|
||||
Loc ["STRING_OPTIONS_INSTANCE_BUTTON_ANCHOR"] = "Instance Button:"
|
||||
Loc ["STRING_OPTIONS_RESET_BUTTON_ANCHOR"] = "Reset Button:"
|
||||
Loc ["STRING_OPTIONS_CLOSE_BUTTON_ANCHOR"] = "Close Button:"
|
||||
|
||||
File diff suppressed because one or more lines are too long
+42
-151
@@ -118,10 +118,12 @@ function _G._detalhes:Start()
|
||||
end
|
||||
|
||||
_detalhes.ToolBar:ReorganizeIcons()
|
||||
|
||||
|
||||
self.RefreshAfterStartup = nil
|
||||
end
|
||||
self:ScheduleTimer ("RefreshAfterStartup", 4)
|
||||
|
||||
|
||||
|
||||
--> start garbage collector
|
||||
self.ultima_coleta = 0
|
||||
@@ -165,6 +167,24 @@ function _G._detalhes:Start()
|
||||
-- self.listener:RegisterEvent ("UNIT_SPELLCAST_INTERRUPTED")
|
||||
----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
|
||||
function _detalhes:CooltipPreset (preset)
|
||||
|
||||
local GameCooltip = GameCooltip
|
||||
|
||||
GameCooltip:Reset()
|
||||
|
||||
if (preset == 1) then
|
||||
GameCooltip:SetOption ("TextFont", "Friz Quadrata TT")
|
||||
GameCooltip:SetOption ("TextColor", "orange")
|
||||
GameCooltip:SetOption ("TextSize", 12)
|
||||
GameCooltip:SetOption ("ButtonsYMod", -4)
|
||||
GameCooltip:SetOption ("YSpacingMod", -4)
|
||||
GameCooltip:SetOption ("IgnoreButtonAutoHeight", true)
|
||||
GameCooltip:SetColor (1, 0.5, 0.5, 0.5, 0.5)
|
||||
end
|
||||
end
|
||||
|
||||
--> done
|
||||
self.initializing = nil
|
||||
@@ -220,6 +240,8 @@ function _G._detalhes:Start()
|
||||
end
|
||||
--]]
|
||||
|
||||
--_detalhes:OpenWelcomeWindow() --for debug
|
||||
|
||||
if (self.is_first_run) then
|
||||
|
||||
_detalhes:OpenWelcomeWindow()
|
||||
@@ -257,7 +279,7 @@ function _G._detalhes:Start()
|
||||
end
|
||||
|
||||
--> feedback trhead
|
||||
if (self.tutorial.logons > 100 and false) then -- and self.tutorial.logons < 104
|
||||
if (self.tutorial.logons > 100) then -- and self.tutorial.logons < 104
|
||||
|
||||
--desligado por preocaução
|
||||
|
||||
@@ -488,155 +510,6 @@ function _G._detalhes:Start()
|
||||
self.MicroButtonAlert = CreateFrame ("frame", "DetailsMicroButtonAlert", UIParent, "MicroButtonAlertTemplate")
|
||||
self.MicroButtonAlert:Hide()
|
||||
|
||||
--[[
|
||||
print ("primeiro:")
|
||||
local instancia = _detalhes.tabela_instancias [1]
|
||||
for i = 1, instancia.barras [1]:GetNumPoints() do
|
||||
local point, relativeTo, relativePoint, xOfs, yOfs = instancia.barras [1]:GetPoint (i)
|
||||
print (point, relativeTo, relativePoint, xOfs, yOfs)
|
||||
end
|
||||
print ("---------------")
|
||||
--]]
|
||||
|
||||
|
||||
-- bubble test
|
||||
local f = CreateFrame ("frame", "DetailsBubble", UIParent)
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetSize (100, 100)
|
||||
f:SetFrameStrata ("TOOLTIP")
|
||||
f.isHorizontalFlipped = false
|
||||
f.isVerticalFlipped = false
|
||||
|
||||
local t = f:CreateTexture (nil, "artwork")
|
||||
t:SetTexture ([[Interface\AddOns\Details\images\icons]])
|
||||
t:SetSize (131 * 1.2, 81 * 1.2)
|
||||
--377 328 508 409 0.0009765625
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
|
||||
t:SetPoint ("center", f, "center")
|
||||
|
||||
local line1 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line1:SetPoint ("topleft", t, "topleft", 24, -10)
|
||||
_detalhes:SetFontSize (line1, 9)
|
||||
line1:SetTextColor (.9, .9, .9, 1)
|
||||
line1:SetSize (110, 12)
|
||||
line1:SetJustifyV ("center")
|
||||
line1:SetJustifyH ("center")
|
||||
|
||||
local line2 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line2:SetPoint ("topleft", t, "topleft", 11, -20)
|
||||
_detalhes:SetFontSize (line2, 9)
|
||||
line2:SetTextColor (.9, .9, .9, 1)
|
||||
line2:SetSize (140, 12)
|
||||
line2:SetJustifyV ("center")
|
||||
line2:SetJustifyH ("center")
|
||||
|
||||
local line3 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line3:SetPoint ("topleft", t, "topleft", 7, -30)
|
||||
_detalhes:SetFontSize (line3, 9)
|
||||
line3:SetTextColor (.9, .9, .9, 1)
|
||||
line3:SetSize (144, 12)
|
||||
line3:SetJustifyV ("center")
|
||||
line3:SetJustifyH ("center")
|
||||
|
||||
local line4 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line4:SetPoint ("topleft", t, "topleft", 11, -40)
|
||||
_detalhes:SetFontSize (line4, 9)
|
||||
line4:SetTextColor (.9, .9, .9, 1)
|
||||
line4:SetSize (140, 12)
|
||||
line4:SetJustifyV ("center")
|
||||
line4:SetJustifyH ("center")
|
||||
|
||||
local line5 = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
line5:SetPoint ("topleft", t, "topleft", 24, -50)
|
||||
_detalhes:SetFontSize (line5, 9)
|
||||
line5:SetTextColor (.9, .9, .9, 1)
|
||||
line5:SetSize (110, 12)
|
||||
line5:SetJustifyV ("center")
|
||||
line5:SetJustifyH ("center")
|
||||
|
||||
f.lines = {line1, line2, line3, line4, line5}
|
||||
|
||||
--t:SetPoint ("center", UIParent, "center")
|
||||
|
||||
function f:FlipHorizontal()
|
||||
if (not f.isHorizontalFlipped) then
|
||||
if (f.isVerticalFlipped) then
|
||||
t:SetTexCoord (0.9912109375, 0.7373046875, 0.7978515625, 0.6416015625)
|
||||
else
|
||||
t:SetTexCoord (0.9912109375, 0.7373046875, 0.6416015625, 0.7978515625)
|
||||
end
|
||||
f.isHorizontalFlipped = true
|
||||
else
|
||||
if (f.isVerticalFlipped) then
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.7978515625, 0.6416015625)
|
||||
else
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
|
||||
end
|
||||
f.isHorizontalFlipped = false
|
||||
end
|
||||
end
|
||||
|
||||
function f:FlipVertical()
|
||||
|
||||
if (not f.isVerticalFlipped) then
|
||||
if (f.isHorizontalFlipped) then
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.7978515625, 0.6416015625)
|
||||
else
|
||||
t:SetTexCoord (0.9912109375, 0.7373046875, 0.7978515625, 0.6416015625)
|
||||
end
|
||||
f.isVerticalFlipped = true
|
||||
else
|
||||
if (f.isHorizontalFlipped) then
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
|
||||
else
|
||||
t:SetTexCoord (0.9912109375, 0.7373046875, 0.6416015625, 0.7978515625)
|
||||
end
|
||||
f.isVerticalFlipped = false
|
||||
end
|
||||
end
|
||||
|
||||
function f:SetBubbleText (line1, line2, line3, line4, line5)
|
||||
if (not line1) then
|
||||
for _, line in ipairs (f.lines) do
|
||||
line:SetText ("")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if (line1:find ("\n")) then
|
||||
line1, line2, line3, line4, line5 = strsplit ("\n", line1)
|
||||
end
|
||||
|
||||
f.lines[1]:SetText (line1)
|
||||
f.lines[2]:SetText (line2)
|
||||
f.lines[3]:SetText (line3)
|
||||
f.lines[4]:SetText (line4)
|
||||
f.lines[5]:SetText (line5)
|
||||
end
|
||||
|
||||
function f:SetOwner (frame, myPoint, hisPoint, x, y, alpha)
|
||||
f:ClearAllPoints()
|
||||
f:SetBubbleText (nil)
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
|
||||
f.isHorizontalFlipped = false
|
||||
f.isVerticalFlipped = false
|
||||
f:SetPoint (myPoint or "bottom", frame, hisPoint or "top", x or 0, y or 0)
|
||||
t:SetAlpha (alpha or 1)
|
||||
end
|
||||
|
||||
function f:ShowBubble()
|
||||
f:Show()
|
||||
end
|
||||
|
||||
function f:HideBubble()
|
||||
f:Hide()
|
||||
end
|
||||
|
||||
f:SetBubbleText (nil)
|
||||
|
||||
f:Hide()
|
||||
|
||||
|
||||
local lower = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower) then
|
||||
local instance = _detalhes:GetInstance (lower)
|
||||
@@ -678,5 +551,23 @@ function _G._detalhes:Start()
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
local f = CreateFrame ("frame", nil, UIParent)
|
||||
f:SetSize (200, 200)
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
local t = f:CreateTexture (nil, "overlay")
|
||||
t:SetPoint ("center", f, "center")
|
||||
t:SetTexture (1, 1, 1, 1)
|
||||
t:SetSize (100, 100)
|
||||
|
||||
f:SetAlpha (.1)
|
||||
t:SetAlpha (1)
|
||||
t:SetVertexColor (1, 1, 1, 1)
|
||||
|
||||
local b = CreateFrame ("button", "teste", f, "OptionsButtonTemplate")
|
||||
b:SetSize (75, 30)
|
||||
b:SetPoint ("left", f, "left")
|
||||
b:SetAlpha (1)
|
||||
--]]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user