- Added an option to disable the all-displays window (right click on title bar).

- Added an option to suppress segment changes after killing a boss encounter (experimental).
- Fixed an issue with bar animations starting from the middle of the bar.
- Fixed buffs and spell cast start on weakauras creator tool.
This commit is contained in:
Tercio
2015-10-15 12:19:35 -03:00
parent 9f5d387938
commit f9271a6921
18 changed files with 432 additions and 142 deletions
+34 -1
View File
@@ -170,4 +170,37 @@ top is the amount of value of the actor with more value.
container:WipeCustomActorContainer()
removes all data from a custom container.
this is automatically performed when the search script runs.
this is automatically performed when the search script runs.
Creating Customs from Plugins or 3rd Party Addons
=======================================
Custom Displays can be created through the Custom Display Manager accessed by Sword -> Customs -> Custom Display Manager.
But if you are in a plugin or another addon you'll need to create a hard-coded custom table, and after that, install with InstallCustomObject().
Details:InstallCustomObject (custom_object)
Adds a custom display on Details!.
custom_object is a table with several key telling what Details! should do when the user selects this custom on a window:
name = the name of the custom display, is shown when the user is selecting on the list (string).
icon = icon path, is shown together with the name (string).
source = set false to use a custom search script (bool).
attribute = always use false here to be able to use the scripted search (bool).
spellid = the same as attribute, use false to be able to use the script (bool).
target = set false here when using script (bool).
author = who created this custom object (string).
desc = description of what this display do (string).
script_version = number to identify the version, when installing, Details! checks for custom displays with the same name and always use with the biggest script_version (number).
script = the code used when searching for results (string-code).
total_script = use total script when the result shown in the bar isn't the actor's total, e.g., an actor have 90 as total but you want to show "1min 30sec" instead.
percent_script = similar to total_script, use when you need the percentage to be something different than the default one.
tooltip = code ran when the user passes the mouse over a bar.
Details:RemoveCustomObject (name)
Removes a custom display.
Details:GetCustomObject (name)
Returns the object of a custom display already installed.
+2
View File
@@ -214,6 +214,8 @@ set the update speed of all windows, if nosave is true, it won't save this chang
Details:SetUseAnimations (enabled, nosave)
set on off bar animations on all windows, if nosave is true, it won't save this change (apply only).
Details:SetTrashSuppression (seconds)
how much time after a boss encounter kill, the window should not switch to trash segments.
--------------------
Details.chat_embed:SetTabSettings (tab_name, is_enabled, is_single)
+2 -2
View File
@@ -1255,7 +1255,7 @@ function DF:CreateCoolTip()
row.leftText:SetHeight (10)
end
--> ~inicio ~start
--> ~inicio ~start ~tooltip
function CoolTip:monta_tooltip()
--> hide sub frame
@@ -1417,7 +1417,7 @@ function DF:CreateCoolTip()
button.divbar:SetDesaturated (true)
end
--> ~inicio ~start
--> ~inicio ~start ~menu
function CoolTip:monta_cooltip (host, instancia, options, sub_menus, icones, tamanho1, tamanho2, font, fontsize)
if (CoolTip.Indexes == 0) then
+1 -1
View File
@@ -1,5 +1,5 @@
local dversion = 10
local dversion = 11
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
+11 -2
View File
@@ -1474,7 +1474,8 @@ local SimplePanel_frame_backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], e
local SimplePanel_frame_backdrop_color = {0, 0, 0, 0.9}
local SimplePanel_frame_backdrop_border_color = {0, 0, 0, 1}
function DF:CreateSimplePanel (parent, w, h, title, name)
local no_options = {}
function DF:CreateSimplePanel (parent, w, h, title, name, panel_options)
if (not name) then
name = "DetailsFrameworkSimplePanel" .. simple_panel_counter
@@ -1483,6 +1484,8 @@ function DF:CreateSimplePanel (parent, w, h, title, name)
if (not parent) then
parent = UIParent
end
panel_options = panel_options or no_options
local f = CreateFrame ("frame", name, UIParent)
f:SetSize (w or 400, h or 250)
@@ -1493,7 +1496,12 @@ function DF:CreateSimplePanel (parent, w, h, title, name)
f:SetBackdrop (SimplePanel_frame_backdrop)
f:SetBackdropColor (unpack (SimplePanel_frame_backdrop_color))
f:SetBackdropBorderColor (unpack (SimplePanel_frame_backdrop_border_color))
tinsert (UISpecialFrames, name)
f.DontRightClickClose = panel_options.DontRightClickClose
if (not panel_options.NoTUISpecialFrame) then
tinsert (UISpecialFrames, name)
end
local title_bar = CreateFrame ("frame", name .. "TitleBar", f)
title_bar:SetPoint ("topleft", f, "topleft", 2, -3)
@@ -1502,6 +1510,7 @@ function DF:CreateSimplePanel (parent, w, h, title, name)
title_bar:SetBackdrop (SimplePanel_frame_backdrop)
title_bar:SetBackdropColor (.2, .2, .2, 1)
title_bar:SetBackdropBorderColor (0, 0, 0, 1)
f.TitleBar = title_bar
local close = CreateFrame ("button", name and name .. "CloseButton", title_bar)
close:SetSize (16, 16)
+9 -7
View File
File diff suppressed because one or more lines are too long
+40
View File
@@ -1050,6 +1050,15 @@
_detalhes.switch:OnRemoveCustom (index)
end
--> export for plugins
function _detalhes:RemoveCustomObject (object_name)
for index, object in ipairs (_detalhes.custom) do
if (object.name == object_name) then
return atributo_custom:RemoveCustom (index)
end
end
end
function _detalhes:ResetCustomFunctionsCache()
table.wipe (_detalhes.custom_function_cache)
end
@@ -1097,6 +1106,37 @@
atributo_custom:UpdateDamageDoneBracket()
atributo_custom:UpdateHealingDoneBracket()
end
function _detalhes:InstallCustomObject (object)
local have = false
if (object.script_version) then
for _, custom in ipairs (_detalhes.custom) do
if (custom.name == object.name and (custom.script_version and custom.script_version >= object.script_version) ) then
have = true
break
end
end
else
for _, custom in ipairs (_detalhes.custom) do
if (custom.name == object.name) then
have = true
break
end
end
end
if (not have) then
for i, custom in ipairs (_detalhes.custom) do
if (custom.name == object.name) then
table.remove (_detalhes.custom, i)
break
end
end
setmetatable (object, _detalhes.atributo_custom)
object.__index = _detalhes.atributo_custom
_detalhes.custom [#_detalhes.custom+1] = object
end
end
function _detalhes:AddDefaultCustomDisplays()
+2
View File
@@ -2543,8 +2543,10 @@ end
end
else
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
--> setando o valor mesmo com animações pq o barra esta hidada com o value do último actor que ela mostrou
if (use_animations) then
esta_barra.animacao_fim = esta_porcentagem
esta_barra:SetValue (esta_porcentagem)
else
esta_barra:SetValue (esta_porcentagem)
esta_barra.animacao_ignorar = true
+2 -2
View File
@@ -799,13 +799,13 @@ function atributo_heal:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
esta_barra:SetValue (esta_porcentagem)
if (use_animations) then
esta_barra.animacao_fim = esta_porcentagem
else
esta_barra:SetValue (esta_porcentagem)
esta_barra.animacao_ignorar = true
end
gump:Fade (esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
+27 -38
View File
@@ -202,8 +202,16 @@ function _detalhes:GetShowingCombat()
return self.showing
end
function _detalhes:GetCustomObject()
return _detalhes.custom [self.sub_atributo]
function _detalhes:GetCustomObject (object_name)
if (object_name) then
for _, object in ipairs (_detalhes.custom) do
if (object.name == object_name) then
return object
end
end
else
return _detalhes.custom [self.sub_atributo]
end
end
function _detalhes:ResetAttribute()
@@ -373,7 +381,6 @@ end
_detalhes.solo = nil
end
--print ("Abertas: " .. _detalhes.opened_windows)
if (not _detalhes.initializing) then
_detalhes:SendEvent ("DETAILS_INSTANCE_CLOSE", nil, self)
end
@@ -435,16 +442,12 @@ end
local _R, _T, _L, _B = _detalhes.VPL (instance2, instance1), _detalhes.VPB (instance2, instance1), _detalhes.VPR (instance2, instance1), _detalhes.VPT (instance2, instance1)
if (_R) then
--print ("R")
instance2:MakeInstanceGroup ({false, false, 1, false})
elseif (_T) then
--print ("T")
instance2:MakeInstanceGroup ({false, false, false, 1})
elseif (_L) then
--print ("L")
instance2:MakeInstanceGroup ({1, false, false, false})
elseif (_B) then
--print ("B")
instance2:MakeInstanceGroup ({false, 1, false, false})
end
end
@@ -583,6 +586,8 @@ end
self:SetCombatAlpha (nil, nil, true)
self:DesaturateMenu()
self:CheckFor_EnabledTrashSuppression()
if (not temp and not _detalhes.initializing) then
_detalhes:SendEvent ("DETAILS_INSTANCE_OPEN", nil, self)
end
@@ -808,7 +813,6 @@ function _detalhes:BaseFrameSnap()
local my_baseframe = self.baseframe
for lado, snap_to in _pairs (self.snap) do
--print ("DEBUG instancia " .. snap_to .. " lado "..lado)
local instancia_alvo = _detalhes.tabela_instancias [snap_to]
if (instancia_alvo.ativa and instancia_alvo.baseframe) then
@@ -979,8 +983,6 @@ function _detalhes:agrupar_janelas (lados)
elseif (lado == 1) then --> esquerda
--> mover frame
--print (esta_instancia.baseframe:GetPoint (0)[2], esta_instancia.baseframe:GetPoint (0)[2] == instancia.baseframe)
instancia.baseframe:SetPoint ("TOPLEFT", esta_instancia.baseframe, "TOPRIGHT")
instancia.baseframe:SetPoint ("LEFT", esta_instancia.baseframe, "RIGHT")
instancia.baseframe:SetPoint ("BOTTOMLEFT", esta_instancia.baseframe, "BOTTOMRIGHT")
@@ -1061,7 +1063,6 @@ function _detalhes:Desagrupar (instancia, lado, lado2)
_detalhes:DelayOptionsRefresh (nil, true)
if (not lado) then
--print ("DEBUG: Desagrupar esta sem lado")
return
end
@@ -1107,7 +1108,6 @@ function _detalhes:Desagrupar (instancia, lado, lado2)
local esta_instancia = _detalhes.tabela_instancias [instancia.snap[lado]]
if (not esta_instancia) then
--print ("DEBUG: Erro, a instancia nao existe")
return
end
@@ -1135,11 +1135,6 @@ function _detalhes:Desagrupar (instancia, lado, lado2)
esta_instancia:SaveMainWindowPosition()
esta_instancia:RestoreMainWindowPosition()
end
--print ("DEBUG: Details: Instancias desagrupadas")
--_detalhes:RefreshAgrupamentos()
end
function _detalhes:SnapTextures (remove)
@@ -1549,6 +1544,8 @@ end
--backtable indexes: [1]: mode [2]: attribute [3]: sub attribute [4]: segment [5]: raidmode index [6]: solomode index
function _detalhes:CheckSwitchOnCombatEnd (nowipe, warning)
local old_attribute, old_sub_atribute = self:GetDisplay()
self:SwitchBack()
local role = _UnitGroupRolesAssigned ("player")
@@ -1574,8 +1571,11 @@ function _detalhes:CheckSwitchOnCombatEnd (nowipe, warning)
end
if (warning and got_switch) then
local attribute_name = self:GetInstanceAttributeText()
self:InstanceAlert (string.format (Loc ["STRING_SWITCH_WARNING"], attribute_name), {[[Interface\CHARACTERFRAME\UI-StateIcon]], 18, 18, false, 0.5, 1, 0, 0.5}, 4)
local current_attribute, current_sub_atribute = self:GetDisplay()
if (current_attribute ~= old_attribute or current_sub_atribute ~= old_sub_atribute) then
local attribute_name = self:GetInstanceAttributeText()
self:InstanceAlert (string.format (Loc ["STRING_SWITCH_WARNING"], attribute_name), {[[Interface\CHARACTERFRAME\UI-StateIcon]], 18, 18, false, 0.5, 1, 0, 0.5}, 4)
end
end
if (self.switch_all_roles_after_wipe and not nowipe) then
@@ -1691,8 +1691,6 @@ function _detalhes:ApplySavedSkin (style)
local skin = style.skin
self.skin = ""
self:ChangeSkin (skin)
-- /script print (_detalhes.tabela_instancias[1].baseframe:GetAlpha())
--> overwrite all instance parameters with saved ones
for key, value in pairs (style) do
@@ -1780,9 +1778,6 @@ end
function _detalhes:SetBackgroundAlpha (alpha)
if (not alpha) then
alpha = self.bg_alpha
-- else
-- print (alpha)
-- alpha = _detalhes:Scale (0, 1, 0.2, 1, alpha) - 0.8
end
self.bgdisplay:SetBackdropColor (self.bg_r, self.bg_g, self.bg_b, alpha)
@@ -1851,7 +1846,7 @@ function _detalhes:PostponeSwitchToCurrent (instance)
return
end
end
if (instance.is_interacting) then
if (instance.is_interacting and instance.last_interaction < _detalhes._tempo) then
instance.last_interaction = _detalhes._tempo
end
instance._postponing_switch = _detalhes:ScheduleTimer ("PostponeSwitchToCurrent", 1, instance)
@@ -1860,7 +1855,7 @@ end
function _detalhes:CheckSwitchToCurrent()
for _, instance in _ipairs (_detalhes.tabela_instancias) do
if (instance.ativa and instance.auto_current and instance.baseframe and instance.segmento > 0) then
if (instance.is_interacting) then
if (instance.is_interacting and instance.last_interaction < _detalhes._tempo) then
instance.last_interaction = _detalhes._tempo
end
@@ -1924,6 +1919,7 @@ function _detalhes:AtualizaSegmentos (instancia)
elseif (instancia.segmento == 0) then
--instancia.baseframe.rodape.segmento:SetText (segmentos.current) --> localiza-me
instancia.showing = _detalhes.tabela_vigente
--print ("==> Changing the Segment now! - classe_instancia.lua 1922")
else
instancia.showing = _detalhes.tabela_historico.tabelas [instancia.segmento]
--instancia.baseframe.rodape.segmento:SetText (segmentos.past..instancia.segmento) --> localiza-me
@@ -1943,7 +1939,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
if (segmento == _detalhes.segments_amount) then --> significa que o index [5] passou a ser [6] com a entrada da nova tabela
instancia.showing = historico.tabelas [_detalhes.segments_amount] --> então ele volta a pegar o index [5] que antes era o index [4]
--print ("==> Changing the Segment now! - classe_instancia.lua 1942")
gump:Fade (instancia, _fadeType, _fadeSpeed, "barras")
instancia.showing[instancia.atributo].need_refresh = true
instancia.v_barras = true
@@ -1953,6 +1949,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
elseif (segmento < _detalhes.segments_amount and segmento > 0) then
instancia.showing = historico.tabelas [segmento]
--print ("==> Changing the Segment now! - classe_instancia.lua 1952")
gump:Fade (instancia, _fadeType, _fadeSpeed, "barras") --"in", nil
instancia.showing[instancia.atributo].need_refresh = true
@@ -2115,6 +2112,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
instancia.showing = _detalhes.tabela_overall
elseif (segmento == 0) then --> combate atual
instancia.showing = _detalhes.tabela_vigente
--print ("==> Changing the Segment now! - classe_instancia.lua 2115")
else --> alguma tabela do histórico
instancia.showing = _detalhes.tabela_historico.tabelas [segmento]
end
@@ -2147,7 +2145,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
if (segmento == -1) then --> overall
instance.showing = _detalhes.tabela_overall
elseif (segmento == 0) then --> combate atual
instance.showing = _detalhes.tabela_vigente
instance.showing = _detalhes.tabela_vigente; --print ("==> Changing the Segment now! - classe_instancia.lua 2148")
else --> alguma tabela do histórico
instance.showing = _detalhes.tabela_historico.tabelas [segmento]
end
@@ -2176,8 +2174,6 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
end
--> Muda o atributo caso necessário
--print ("DEBUG atributos", instancia, segmento, atributo, sub_atributo, iniciando_instancia)
if (atributo == 5) then
if (#_detalhes.custom < 1) then
atributo = 1
@@ -2276,7 +2272,6 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
instancia.sub_atributo = sub_atributo
if (sub_attribute_click) then
--print ("aqui", instancia.sub_atributo)
instancia.sub_atributo_last [instancia.atributo] = instancia.sub_atributo
end
@@ -2317,7 +2312,6 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
if (not _detalhes.initializing and not iniciando_instancia) then
instancia:ResetaGump()
--print ("atualizando: ", instancia.atributo, instancia.sub_atributo)
instancia:AtualizaGumpPrincipal (true)
end
@@ -2542,8 +2536,6 @@ end
function _detalhes:ChangeIcon (icon)
local skin = _detalhes.skins [self.skin]
--print (debugstack())
if (not self.hide_icon) then
if (skin.icon_on_top) then
@@ -2639,11 +2631,9 @@ function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
if (not instancia.atributo) then
instancia.atributo = 1
instancia.sub_atributo = 1
--print ("Details found a internal probleam and fixed: 'instancia.atributo' were null, now is 1.")
end
if (not instancia.showing[instancia.atributo]) then
instancia.showing = _detalhes.tabela_vigente
--print ("Details found a internal problem and fixed: container for instancia.showing were null, now is current combat.")
instancia.showing = _detalhes.tabela_vigente; --print ("==> Changing the Segment now! - classe_instancia.lua 2636")
end
instancia.atributo = instancia.atributo or 1
instancia.showing[instancia.atributo].need_refresh = true
@@ -3020,7 +3010,6 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
atributo = 1
container = self.showing [atributo]._ActorTable
end
--print (total, keyName, first, atributo, container_amount)
end
amt = math.min (amt, container_amount or 0)
+97 -28
View File
@@ -190,7 +190,11 @@
end
end
_detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, index, name)
--> we the boss was found during the combat table creation, we must postpone the event trigger
if (not _detalhes.tabela_vigente.IsBeingCreated) then
_detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, index, name)
_detalhes:CheckFor_SuppressedWindowsOnEncounterFound()
end
return boss_table
end
@@ -292,7 +296,7 @@
-- ~start ~inicio ~novo ñovo
function _detalhes:EntrarEmCombate (...)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) started a new combat.")
end
@@ -306,18 +310,19 @@
end
--> re-lock nos tempos da tabela passada -- lock again last table times
_detalhes.tabela_vigente:TravarTempos() --> lá em cima é feito wipe, não deveria ta dando merda nisso aqui? ou ela puxa da __index e da zero jogadores no mapa e container
_detalhes.tabela_vigente:TravarTempos()
local n_combate = _detalhes:NumeroCombate (1) --aumenta o contador de combates -- combat number up
--> cria a nova tabela de combates -- create new table
local ultimo_combate = _detalhes.tabela_vigente
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (true, _detalhes.tabela_overall, n_combate, ...) --cria uma nova tabela de combate
--> flag this combat as being created
_detalhes.tabela_vigente.IsBeingCreated = true
_detalhes.tabela_vigente.previous_combat = ultimo_combate
--> verifica se há alguma instância mostrando o segmento atual -- change segment
_detalhes:InstanciaCallFunction (_detalhes.TrocaSegmentoAtual)
_detalhes.tabela_vigente:seta_data (_detalhes._detalhes_props.DATA_TYPE_START) --seta na tabela do combate a data do inicio do combate -- setup time data
_detalhes.in_combat = true --sinaliza ao addon que há um combate em andamento -- in combat flag up
_detalhes.tabela_vigente.combat_id = n_combate --> grava o número deste combate na tabela atual -- setup combat id on new table
@@ -340,8 +345,31 @@
_table_wipe (_detalhes.cache_healing_group)
_detalhes:UpdateParserGears()
--> get all buff already applied before the combat start
_detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_IN")
_detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_IN")
_detalhes:UptadeRaidMembersCache()
--> we already have boss information? build .is_boss table
if (_detalhes.encounter_table.id and _detalhes.encounter_table ["start"] >= GetTime() - 3 and not _detalhes.encounter_table ["end"]) then
local encounter_table = _detalhes.encounter_table
--> boss_found will trigger "COMBAT_BOSS_FOUND" event, but at this point of the combat creation is safe to send it
boss_found (encounter_table.index, encounter_table.name, encounter_table.zone, encounter_table.mapid, encounter_table.diff, encounter_table.id)
else
--> if we don't have this infor right now, lets check in few seconds dop
if (_detalhes.EncounterInformation [_detalhes.zone_id]) then
_detalhes:ScheduleTimer ("ReadBossFrames", 1)
_detalhes:ScheduleTimer ("ReadBossFrames", 30)
end
end
--> if the window is showing current segment, switch it for the new combat
--> also if the window has auto current, jump to current segment
_detalhes:InstanciaCallFunction (_detalhes.TrocaSegmentoAtual, _detalhes.tabela_vigente.is_boss and true)
--> clear hosts and make the cloud capture stuff
_detalhes.host_of = nil
_detalhes.host_by = nil
_detalhes.host_by = nil
if (_detalhes.in_group and _detalhes.cloud_capture) then
if (_detalhes:IsInInstance() or _detalhes.debug) then
@@ -361,11 +389,7 @@
_detalhes:Msg ("(debug) isn't in group or cloud is turned off", _detalhes.in_group, _detalhes.cloud_capture)
end
end
_detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_IN")
_detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_IN")
_detalhes:UptadeRaidMembersCache()
--> hide / alpha / switch in combat
for index, instancia in ipairs (_detalhes.tabela_instancias) do
if (instancia.ativa) then
@@ -376,9 +400,16 @@
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente, _detalhes.encounter_table and _detalhes.encounter_table.id)
_detalhes:CheckSwitchToCurrent()
--> combat creation is completed, remove the flag
_detalhes.tabela_vigente.IsBeingCreated = nil
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente, _detalhes.encounter_table and _detalhes.encounter_table.id)
if (_detalhes.tabela_vigente.is_boss) then
--> the encounter was found through encounter_start event
_detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, _detalhes.tabela_vigente.is_boss.index, _detalhes.tabela_vigente.is_boss.name)
end
_detalhes:CheckSwitchToCurrent()
_detalhes:CheckForTextTimeCounter (true)
end
@@ -540,10 +571,8 @@
--> verifica memoria
_detalhes:FlagActorsOnCommonFight() --fight_component
_detalhes:CheckMemoryAfterCombat()
--print ("isn't boss")
else
--print ("is boss")
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
_detalhes:FlagActorsOnBossFight()
else
@@ -569,6 +598,8 @@
end
_detalhes:SendEvent ("COMBAT_BOSS_DEFEATED", nil, _detalhes.tabela_vigente)
_detalhes:CheckFor_TrashSuppressionOnEncounterEnd()
else
_detalhes:SendEvent ("COMBAT_BOSS_WIPE", nil, _detalhes.tabela_vigente)
end
@@ -1145,7 +1176,7 @@
not instance.last_interaction or
(
(instance.ativa) and
(instance.last_interaction+3 < _detalhes._tempo) and
(instance.last_interaction+3 < _tempo) and
(not DetailsReportWindow or not DetailsReportWindow:IsShown()) and
(not _detalhes.janela_info:IsShown())
)
@@ -1157,30 +1188,68 @@
return
end
end
if (instance.is_interacting) then
instance.last_interaction = _detalhes._tempo
if (instance.is_interacting and instance.last_interaction < _tempo) then
instance.last_interaction = _tempo
end
instance._postponing_current = _detalhes:ScheduleTimer ("PostponeInstanceToCurrent", 1, instance)
end
function _detalhes:TrocaSegmentoAtual (instancia)
function _detalhes:TrocaSegmentoAtual (instancia, is_encounter)
if (instancia.segmento == 0 and instancia.baseframe and instancia.ativa) then
if (instancia.is_interacting) then
instancia.last_interaction = _detalhes._tempo
if (not is_encounter) then
if (instancia.is_interacting) then
if (not instancia.last_interaction or instancia.last_interaction < _tempo) then
instancia.last_interaction = _tempo or time()
end
end
if ((instancia.last_interaction and (instancia.last_interaction+3 > _detalhes._tempo)) or (DetailsReportWindow and DetailsReportWindow:IsShown()) or (_detalhes.janela_info:IsShown())) then
--> postpone
instancia._postponing_current = _detalhes:ScheduleTimer ("PostponeInstanceToCurrent", 1, instancia)
return
end
end
if ((instancia.last_interaction and (instancia.last_interaction+3 > _detalhes._tempo)) or (DetailsReportWindow and DetailsReportWindow:IsShown()) or (_detalhes.janela_info:IsShown())) then
--> postpone
instancia._postponing_current = _detalhes:ScheduleTimer ("PostponeInstanceToCurrent", 1, instancia)
return
end
--print ("==> Changing the Segment now! - control.lua 1220")
instancia.last_interaction = _tempo - 4 --pode setar, completou o ciclo
instancia._postponing_current = nil
instancia.showing =_detalhes.tabela_vigente
instancia.showing = _detalhes.tabela_vigente
instancia:ResetaGump()
_detalhes.gump:Fade (instancia, "in", nil, "barras")
end
end
function _detalhes:SetTrashSuppression (n)
assert (type (n) == "number", "SetTrashSuppression expects a number on index 1.")
if (n < 0) then
n = 0
end
_detalhes.instances_suppress_trash = n
end
function _detalhes:CheckFor_SuppressedWindowsOnEncounterFound()
for _, instance in _detalhes:ListInstances() do
if (instance.ativa and instance.baseframe and instance.last_interaction > _tempo and instance.segmento == 0) then
_detalhes:TrocaSegmentoAtual (instance, true)
end
end
end
function _detalhes:CheckFor_EnabledTrashSuppression()
if (_detalhes.HasTrashSuppression and _detalhes.HasTrashSuppression > _tempo) then
self.last_interaction = _detalhes.HasTrashSuppression
end
end
function _detalhes:SetTrashSuppressionAfterEncounter()
_detalhes:InstanceCall ("CheckFor_EnabledTrashSuppression")
end
function _detalhes:CheckFor_TrashSuppressionOnEncounterEnd()
if (_detalhes.instances_suppress_trash > 0) then
_detalhes.HasTrashSuppression = _tempo + _detalhes.instances_suppress_trash
--> delaying in 3 seconds for other stuff like auto open windows after combat.
_detalhes:ScheduleTimer ("SetTrashSuppressionAfterEncounter", 3)
end
end
--> internal GetCombatId() version
function _detalhes:NumeroCombate (flag)
+1 -5
View File
@@ -3296,11 +3296,7 @@
end
function _detalhes.parser_functions:PLAYER_REGEN_DISABLED (...)
if (_detalhes.EncounterInformation [_detalhes.zone_id]) then
_detalhes:ScheduleTimer ("ReadBossFrames", 1)
_detalhes:ScheduleTimer ("ReadBossFrames", 30)
end
if (not _detalhes:CaptureGet ("damage")) then
_detalhes:EntrarEmCombate()
end
+11
View File
@@ -281,6 +281,17 @@
end
end
function _detalhes.table.overwrite (t1, t2)
for key, value in pairs (t2) do
if (type (value) == "table") then
t1 [key] = t1 [key] or {}
_detalhes.table.overwrite (t1 [key], t2 [key])
else
t1 [key] = value
end
end
end
function _detalhes.table.dump (t, s, deep)
s = s or ""
+16 -14
View File
@@ -1177,6 +1177,8 @@
function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
--print (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
--> check if wa is installed
if (not WeakAuras or not WeakAurasSaved) then
return
@@ -1358,7 +1360,7 @@
add.trigger.spellIds[1] = spellid
add.trigger.names [1] = spellname
add.trigger.unit = "player"
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
elseif (target == 2) then --Debuff on Target
local add = _detalhes.table.copy ({}, debuff_prototype)
@@ -1366,7 +1368,7 @@
add.trigger.spellIds[1] = spellid
add.trigger.names[1] = spellname
add.trigger.unit = "target"
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
elseif (target == 3) then --Debuff on Focus
local add = _detalhes.table.copy ({}, debuff_prototype)
@@ -1374,7 +1376,7 @@
add.trigger.spellIds[1] = spellid
add.trigger.names[1] = spellname
add.trigger.unit = "focus"
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
elseif (target == 11) then --Buff on Player
local add = _detalhes.table.copy ({}, buff_prototype)
@@ -1382,7 +1384,7 @@
add.trigger.spellIds[1] = spellid
add.trigger.names[1] = spellname
add.trigger.unit = "player"
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
elseif (target == 12) then --Buff on Target
local add = _detalhes.table.copy ({}, buff_prototype)
@@ -1390,7 +1392,7 @@
add.trigger.spellIds[1] = spellid
add.trigger.names[1] = spellname
add.trigger.unit = "target"
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
elseif (target == 13) then --Buff on Focus
local add = _detalhes.table.copy ({}, buff_prototype)
@@ -1398,7 +1400,7 @@
add.trigger.spellIds[1] = spellid
add.trigger.names[1] = spellname
add.trigger.unit = "focus"
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
elseif (target == 21) then --Spell Cast Started
local add = _detalhes.table.copy ({}, cast_prototype)
@@ -1409,7 +1411,7 @@
add.trigger.use_spellName = true
add.trigger.use_spellId = false
end
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
elseif (target == 22) then --Spell Cast Successful
local add = _detalhes.table.copy ({}, cast_prototype)
@@ -1419,7 +1421,7 @@
add.trigger.use_spellName = true
add.trigger.use_spellId = false
end
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
end
else
new_aura.trigger.spellId = tostring (spellid)
@@ -1440,7 +1442,7 @@
stacksize = floor (stacksize)
local add = _detalhes.table.copy ({}, stack_prototype)
add.trigger.count = tostring (stacksize)
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
end
--> icon text
@@ -1450,7 +1452,7 @@
else
local add = _detalhes.table.copy ({}, widget_text_prototype)
add.displayStacks = icon_text
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
end
end
@@ -1480,19 +1482,19 @@
local add = _detalhes.table.copy ({}, sound_prototype_custom)
add.actions.start.sound_path = sound.sound_path
add.actions.start.sound_channel = sound.sound_channel or "Master"
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
elseif (sound and sound ~= "" and not sound:find ("Quiet.ogg")) then
local add = _detalhes.table.copy ({}, sound_prototype)
add.actions.start.sound = sound
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
end
--> chat message
if (chat and chat ~= "") then
local add = _detalhes.table.copy ({}, chat_prototype)
add.actions.start.message = chat
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
end
--> check if already exists a aura with this name
@@ -1509,7 +1511,7 @@
if (icon_glow) then
local add = _detalhes.table.copy ({}, glow_prototype)
add.actions.start.glow_frame = "WeakAuras:" .. new_aura.id
_detalhes.table.deploy (new_aura, add)
_detalhes.table.overwrite (new_aura, add)
end
--> add the aura on a group
+4 -1
View File
@@ -881,6 +881,7 @@ local default_profile = {
disable_lock_ungroup_buttons = false,
disable_stretch_from_toolbar = false,
disable_stretch_button = false,
disable_alldisplays_window = false,
damage_taken_everything = false,
--> info window
@@ -902,6 +903,7 @@ local default_profile = {
instances_disable_bar_highlight = false,
instances_menu_click_to_open = false,
instances_no_libwindow = false,
instances_suppress_trash = 0,
--> if clear ungroup characters when logout
clear_ungrouped = true,
@@ -1019,7 +1021,8 @@ local default_profile = {
tooltip_max_targets = 2,
tooltip_max_pets = 2,
menus_bg_coords = {331/512, 63/512, 109/512, 143/512},
--menus_bg_coords = {331/512, 63/512, 109/512, 143/512}, --with gradient on right side
menus_bg_coords = {0.309777336120606, 0.924000015258789, 0.213000011444092, 0.279000015258789},
menus_bg_color = {.8, .8, .8, 0.2},
menus_bg_texture = [[Interface\SPELLBOOK\Spellbook-Page-1]],
+82 -13
View File
@@ -752,9 +752,43 @@ local menus2 = {
selected_texture:SetVertexColor (1, 1, 1, 0.8)
selected_texture:SetBlendMode ("ADD")
local button_onenter = function (self)
local is_appearance = {
[3] = true,
[4] = true,
[5] = true,
[8] = true,
[14] = true,
[7] = true,
[6] = true,
[17] = true,
[9] = true,
[18] = true,
}
local button_onenter = function (self, capsule)
self.MyObject.my_bg_texture:SetVertexColor (1, 1, 1, 1)
self.MyObject.textcolor = "yellow"
--[[
if (is_appearance [capsule.menu_index]) then
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
_detalhes:CooltipPreset (2)
GameCooltip:AddLine (Loc ["STRING_OPTIONS_SKIN_A_DESC"])
GameCooltip:AddLine (" ")
GameCooltip:AddLine ("Editing Window: 1")
GameCooltip:AddLine ("You may change the editing window at the bottom right corner.")
GameCooltip:SetOption ("FixedWidth", 200)
--GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
--GameCooltip:SetOption ("TextFont", _detalhes.font_faces.menus)
GameCooltip:SetOption ("NoLastSelectedBar", true)
GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetOwner (self, "topright", "topleft", -5, 0)
GameCooltip:ShowCooltip()
end
--]]
end
local button_onleave = function (self)
self.MyObject.my_bg_texture:SetVertexColor (1, 1, 1, .5)
@@ -763,6 +797,7 @@ local menus2 = {
else
self.MyObject.textcolor = selected_textcolor
end
GameCooltip:Hide()
end
local button_mouse_up = function (button)
button = button.MyObject
@@ -798,6 +833,7 @@ local menus2 = {
button.textcolor = textcolor
button.textsize = 11
button.my_bg_texture = texture
button.menu_index = menus_settings [true_index]
tinsert (all_buttons, button)
y = y - 16
@@ -2460,8 +2496,34 @@ function window:CreateFrame18()
frame18.ReportFormatDropdown:SetPoint ("left", frame18.ReportFormatLabel, "right", 2, 0)
window:CreateLineBackground2 (frame18, "ReportFormatDropdown", "ReportFormatLabel", Loc ["STRING_OPTIONS_REPORT_SCHEMA_DESC"])
--> trash suppression
g:NewLabel (frame18, _, "$parentTrashSuppressionLabel", "TrashSuppressionLabel", "Trash Suppression", "GameFontHighlightLeft")
g:NewSlider (frame18, _, "$parentTrashSuppressionSlider", "TrashSuppressionSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 180, 1, _detalhes.instances_suppress_trash, nil, nil, nil, options_slider_template)
frame18.TrashSuppressionSlider:SetPoint ("left", frame18.TrashSuppressionLabel, "right", 2)
frame18.TrashSuppressionSlider:SetHook ("OnValueChange", function (_, _, amount)
_detalhes:SetTrashSuppression (amount)
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end)
window:CreateLineBackground2 (frame18, "TrashSuppressionSlider", "TrashSuppressionLabel", "For |cFFFFFF00X|r seconds, suppress auto switching to show trash segments (|cFFFFFF00only after defeat a boss encounter|r).")
--> disable all displays window
g:NewLabel (frame18, _, "$parentDisableAllDisplaysWindowLabel", "DisableAllDisplaysWindowLabel", Loc ["STRING_OPTIONS_DISABLE_ALLDISPLAYSWINDOW"], "GameFontHighlightLeft")
g:NewSwitch (frame18, _, "$parentDisableAllDisplaysWindowSlider", "DisableAllDisplaysWindowSlider", 60, 20, _, _, _detalhes.disable_alldisplays_window, nil, nil, nil, nil, options_switch_template)
frame18.DisableAllDisplaysWindowSlider:SetPoint ("left", frame18.DisableAllDisplaysWindowLabel, "right", 2)
frame18.DisableAllDisplaysWindowSlider:SetAsCheckBox()
frame18.DisableAllDisplaysWindowSlider.OnSwitch = function (_, _, value)
_detalhes.disable_alldisplays_window = value
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
window:CreateLineBackground2 (frame18, "DisableAllDisplaysWindowSlider", "DisableAllDisplaysWindowLabel", Loc ["STRING_OPTIONS_DISABLE_ALLDISPLAYSWINDOW_DESC"])
--> Anchors
g:NewLabel (frame18, _, "$parentInstancesMiscAnchor", "instancesMiscLabel", Loc ["STRING_OPTIONS_INSTANCES"], "GameFontNormal")
@@ -2489,11 +2551,12 @@ function window:CreateFrame18()
{"autoSwitchLabel", 8, true},
{"AutoSwitchWipeLabel", 9},
{"autoCurrentLabel", 10},
{"reportAnchorLabel", 11, true},
{"ReportHelpfulLinkLabel", 12},
{"ReportFormatLabel", 13},
{"TrashSuppressionLabel", 11},
{"reportAnchorLabel", 12, true},
{"ReportHelpfulLinkLabel", 13},
{"ReportFormatLabel", 14},
}
window:arrange_menu (frame18, left_side, x, -90)
@@ -2508,9 +2571,10 @@ function window:CreateFrame18()
{"DisableLockResizeUngroupLabel", 7},
{"DisableStretchButtonLabel", 8},
{"DisableBarHighlightLabel", 9},
{"DamageTakenEverythingLabel", 10},
{"ClickToOpenMenusLabel", 11},
{"scrollLabel", 12, true},
{"DisableAllDisplaysWindowLabel", 10},
{"DamageTakenEverythingLabel", 11},
{"ClickToOpenMenusLabel", 12},
{"scrollLabel", 13, true},
}
@@ -10067,7 +10131,11 @@ function window:CreateFrame12()
if (not value) then
for index, instancia in ipairs (_detalhes.tabela_instancias) do
if (instancia.modo == 4) then -- 4 = raid
_detalhes:TrocaTabela (instancia, 0, 1, 1, nil, 2)
if (instancia:IsEnabled()) then
_detalhes:TrocaTabela (instancia, 0, 1, 1, nil, 2)
else
instancia.modo = 2 -- group mode
end
end
end
end
@@ -10791,13 +10859,14 @@ end --> if not window
end
_G.DetailsOptionsWindow18AutoCurrentSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow18AutoCurrentSlider.MyObject:SetValue (editing_instance.auto_current)
_G.DetailsOptionsWindow18AutoCurrentSlider.MyObject:SetValue (editing_instance.auto_current)
_G.DetailsOptionsWindow18TrashSuppressionSlider.MyObject:SetValue (editing_instance.instances_suppress_trash)
_G.DetailsOptionsWindow18MenuTextSizeSlider.MyObject:SetValue (_detalhes.font_sizes.menus)
_G.DetailsOptionsWindow18FontDropdown.MyObject:Select (_detalhes.font_faces.menus)
_G.DetailsOptionsWindow18DisableAllDisplaysWindowSlider.MyObject:SetValue (_detalhes.disable_alldisplays_window)
_G.DetailsOptionsWindow18DisableStretchButtonSlider.MyObject:SetValue (_detalhes.disable_stretch_button)
_G.DetailsOptionsWindow18DisableBarHighlightSlider.MyObject:SetValue (_detalhes.instances_disable_bar_highlight)
_G.DetailsOptionsWindow18ClickToOpenMenusSlider.MyObject:SetValue (_detalhes.instances_menu_click_to_open)
+37 -28
View File
@@ -115,7 +115,7 @@ end
-- icones: 365 = 0.35693359375 // 397 = 0.38720703125
function _detalhes:AtualizarScrollBar (x)
function _detalhes:AtualizarScrollBar (x) --> x = quantas barras esta sendo mostrado
local cabe = self.rows_fit_in_window --> quantas barras cabem na janela
@@ -348,13 +348,14 @@ end
_detalhes.OnLeaveMainWindow = OnLeaveMainWindow
local function OnEnterMainWindow (instancia, self)
instancia.is_interacting = true
instancia:SetMenuAlpha (nil, nil, nil, nil, true)
instancia:SetAutoHideMenu (nil, nil, true)
instancia:RefreshAttributeTextSize()
instancia.last_interaction = _detalhes._tempo or time()
if (not instancia.last_interaction or instancia.last_interaction < _detalhes._tempo) then
instancia.last_interaction = _detalhes._tempo or time()
end
if (instancia.baseframe:GetFrameLevel() > instancia.rowframe:GetFrameLevel()) then
instancia.rowframe:SetFrameLevel (instancia.baseframe:GetFrameLevel())
@@ -1033,7 +1034,7 @@ local BGFrame_scripts_onmousedown = function (self, button)
end
end
elseif (button == "RightButton") then
if (self.is_toolbar) then
if (self.is_toolbar and not _detalhes.disable_alldisplays_window) then
self._instance:ShowAllSwitch()
else
if (_detalhes.switch.current_instancia and _detalhes.switch.current_instancia == self._instance) then
@@ -1613,6 +1614,10 @@ local resize_scripts_onenter = function (self)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetOption ("TextFont", _detalhes.font_faces.menus)
GameCooltip:SetOption ("NoLastSelectedBar", true)
GameCooltip:SetOption ("YSpacingMod", -3)
GameCooltip:SetOption ("FixedHeight", 106)
GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetOwner (self)
@@ -1669,6 +1674,10 @@ local lockFunctionOnEnter = function (self)
GameCooltip:SetOption ("NoLastSelectedBar", true)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetOption ("TextFont", _detalhes.font_faces.menus)
GameCooltip:SetOption ("YSpacingMod", -3)
GameCooltip:SetOption ("FixedHeight", 32)
GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetOwner (self)
@@ -1781,6 +1790,10 @@ local unSnapButtonOnEnter = function (self)
GameCooltip:AddFromTable (unSnapButtonTooltip)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetOption ("TextFont", _detalhes.font_faces.menus)
GameCooltip:SetOption ("YSpacingMod", -3)
GameCooltip:SetOption ("FixedHeight", 32)
GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:ShowCooltip (self, "tooltip")
@@ -2421,7 +2434,7 @@ function _detalhes:ReportSingleLine (instancia, barra)
--> dump cooltip
local GameCooltip = GameCooltip
if (GameCoolTipFrame1:IsShown()) then
if (GameCooltipFrame1:IsShown()) then
local actor_name = barra.texto_esquerdo:GetText() or ""
actor_name = actor_name:gsub ((".*%."), "")
@@ -2784,16 +2797,18 @@ local function iterate_scroll_scripts (backgrounddisplay, backgroundframe, basef
function (self, delta)
if (delta > 0) then --> rolou pra cima
local A = instancia.barraS[1]
if (A > 1) then
scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height * _detalhes.scroll_speed)
else
scrollbar:SetValue (0)
scrollbar.ultimo = 0
baseframe.button_up:Disable()
if (A) then
if (A > 1) then
scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height * _detalhes.scroll_speed)
else
scrollbar:SetValue (0)
scrollbar.ultimo = 0
baseframe.button_up:Disable()
end
end
elseif (delta < 0) then --> rolou pra baixo
local B = instancia.barraS[2]
--if (B) then
if (B) then
if (B < (instancia.rows_showing or 0)) then
scrollbar:SetValue (scrollbar:GetValue() + instancia.row_height * _detalhes.scroll_speed)
else
@@ -2802,7 +2817,7 @@ local function iterate_scroll_scripts (backgrounddisplay, backgroundframe, basef
scrollbar.ultimo = maxValue
baseframe.button_down:Disable()
end
--end
end
end
end)
@@ -5425,8 +5440,7 @@ local OnClickNovoMenu = function (_, _, id, instance)
end
function _detalhes:SetTooltipMinWidth()
GameCooltip:SetOption ("MinWidth", 140)
-- /dump GameCooltipFrame1:GetWidth()
GameCooltip:SetOption ("MinWidth", 155)
end
local build_mode_list = function (self, elapsed)
@@ -6125,13 +6139,8 @@ local build_segment_list = function (self, elapsed)
CoolTip:SetOption ("HeighMod", 12)
_detalhes:SetTooltipMinWidth()
--CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
--CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, {66/512, 1, 78/512, 435/512}, _detalhes.tooltip.menus_bg_color, true)
CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
--CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, {331/512, 63/512, 109/512, 143/512}, _detalhes.tooltip.menus_bg_color, true)
CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
CoolTip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
@@ -7608,7 +7617,7 @@ end
GameCooltip:Reset()
GameCooltip:SetType ("menu")
GameCooltip:SetOption ("ButtonsYMod", -2)
GameCooltip:SetOption ("YSpacingMod", 0)
GameCooltip:SetOption ("YSpacingMod", -3)
GameCooltip:SetOption ("TextHeightMod", 0)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
@@ -7617,16 +7626,16 @@ end
_detalhes:SetTooltipMinWidth()
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar)
GameCooltip:AddLine ("$div", nil, 1, nil, -5, -11)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "orange")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar_overall)
GameCooltip:AddLine ("$div", nil, 1, nil, -5, -11)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar)
GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
@@ -7813,7 +7822,7 @@ local report_on_enter = function (self, motion, forced, from_click)
GameCooltip:AddMenu (1, _detalhes.ReportFromLatest, index)
end
GameCooltip:AddLine ("$div")
GameCooltip:AddLine ("$div", nil, nil, -4)
end
GameCooltip:AddLine (Loc ["STRING_REPORT_TOOLTIP"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
+54
View File
@@ -610,6 +610,60 @@ function _G._detalhes:Start()
_detalhes.chat_embed:CheckChatEmbed (true)
--_detalhes:SetTutorialCVar ("MEMORY_USAGE_ALERT1", false)
if (not _detalhes:GetTutorialCVar ("MEMORY_USAGE_ALERT1")) then
function _detalhes:AlertAboutMemoryUsage()
if (DetailsWelcomeWindow and DetailsWelcomeWindow:IsShown()) then
return _detalhes:ScheduleTimer ("AlertAboutMemoryUsage", 30)
end
local f = _detalhes.gump:CreateSimplePanel (UIParent, 500, 290, Loc ["STRING_MEMORY_ALERT_TITLE"], "AlertAboutMemoryUsagePanel", {NoTUISpecialFrame = true, DontRightClickClose = true})
f:SetPoint ("center", UIParent, "center", -200, 100)
f.Close:Hide()
_detalhes:SetFontColor (f.Title, "yellow")
local gnoma = _detalhes.gump:CreateImage (f.TitleBar, [[Interface\AddOns\Details\images\icons2]], 104, 107, "overlay", {104/512, 0, 405/512, 1})
gnoma:SetPoint ("topright", 0, 14)
local logo = _detalhes.gump:CreateImage (f, [[Interface\AddOns\Details\images\logotipo]])
logo:SetPoint ("topleft", -5, 15)
logo:SetSize (512*0.4, 256*0.4)
local text1 = Loc ["STRING_MEMORY_ALERT_TEXT1"]
local text2 = Loc ["STRING_MEMORY_ALERT_TEXT2"]
local text3 = Loc ["STRING_MEMORY_ALERT_TEXT3"]
local str1 = _detalhes.gump:CreateLabel (f, text1)
str1.width = 480
str1.fontsize = 12
str1:SetPoint ("topleft", 10, -100)
local str2 = _detalhes.gump:CreateLabel (f, text2)
str2.width = 480
str2.fontsize = 12
str2:SetPoint ("topleft", 10, -150)
local str3 = _detalhes.gump:CreateLabel (f, text3)
str3.width = 480
str3.fontsize = 12
str3:SetPoint ("topleft", 10, -200)
local textbox = _detalhes.gump:CreateTextEntry (f, function()end, 350, 20, nil, nil, nil, _detalhes.gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
textbox:SetPoint ("topleft", 10, -250)
textbox:SetText ([[www.curse.com/addons/wow/addons-cpu-usage]])
textbox:SetHook ("OnEditFocusGained", function() textbox:HighlightText() end)
local close_func = function()
_detalhes:SetTutorialCVar ("MEMORY_USAGE_ALERT1", true)
f:Hide()
end
local close = _detalhes.gump:CreateButton (f, close_func, 127, 20, Loc ["STRING_MEMORY_ALERT_BUTTON"], nil, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
close:SetPoint ("left", textbox, "right", 2, 0)
end
_detalhes:ScheduleTimer ("AlertAboutMemoryUsage", 30) --30
end
_detalhes.AddOnStartTime = GetTime()
end