- Finished another cosmetic revamp on options panel.

- Rewrite on Raid Plugins Support, now can open more then 1 plugins at once on diferent windows.
- Functions inside custom right text now receives the actor object as first parameter.
- Added a large text editor for make changes on custom texts.
- Added cosmetic menus for report and erase segments button.
- Added new option for add borders on the bars.
- Added Death Barrier as a absorb spell.
- Speed improvaments on bar animations.
- Fixed a bug on overheal tooltip where was showing the Hps instead of overheal.
- Fixed few issues when ignoring combats with 5 seconds or less.
- Fixed bug when reloging inside a raid or dungeon instance was erasing pet owner database.
- Fixed Data Broker text where was passing the total damage/healing instead of Dps/Hps.

- Fixed a issue with _detalhes:Hex(): where wasn't correctly formating number below 16.
- New Api: _detalhes:SetBarBackdropSettings (enabled, size, color, texture): set row border settings.
- New Api: _detalhes:GetInstanceAttributeText(): return the text to show on the title text.
- New Api: _detalhes.RaidTables:DisableRaidMode (instance): turn off the raid mode in the instance.
- New Api: _detalhes:RaidPluginInstalled (plugin_name): return is the plugin is installed.
- New Api: _detalhes.RaidTables:EnableRaidMode (instance, plugin_name): enable the raid mode on the instance.
- New Api: _detalhes.RaidTables:GetAvailablePlugins(): return all plugins which is installed, enabled and not in use.
- New Api: _detalhes.RaidTables:IsAvailable (plugin_name, instance): return if the plugin is available for use.
- New Api: _detalhes.RaidTables:SetInUse (absolute_name, instance_number): declare a plugin as in use by a instance.
- New Api: _detalhes.RaidTables:switch (_, plugin_name, instance): change the plugin shown on the instance.
This commit is contained in:
tercio
2014-05-23 20:58:57 -03:00
parent e2e13288c0
commit b74b58ada6
41 changed files with 2080 additions and 1524 deletions
+5 -19
View File
@@ -340,19 +340,11 @@
if (instancia.auto_switch_to) then
--salva o estado atual
instancia.auto_switch_to_old = {instancia.modo, instancia.atributo, instancia.sub_atributo, instancia.segmento, _detalhes.RaidTables.Mode, _detalhes.SoloTables.Mode}
instancia.auto_switch_to_old = {instancia.modo, instancia.atributo, instancia.sub_atributo, instancia.segmento, instancia:GetRaidPluginName(), _detalhes.SoloTables.Mode}
--muda para um plugin de raid
if (instancia.auto_switch_to [1] == "raid") then
for index, ptable in _ipairs (_detalhes.RaidTables.Menu) do
if (ptable[1] == instancia.auto_switch_to [2]) then
if (instancia.modo ~= _detalhes._detalhes_props ["MODO_RAID"]) then
_detalhes:AlteraModo (instancia, _detalhes._detalhes_props ["MODO_RAID"])
end
_detalhes.RaidTables:switch (nil, index)
break
end
end
_detalhes.RaidTables:EnableRaidMode (instancia, instancia.auto_switch_to [2])
else
--muda para um atributo normal
if (instancia.modo ~= _detalhes._detalhes_props["MODO_GROUP"]) then
@@ -511,8 +503,6 @@
end
end
end
if (_detalhes.solo) then
--> debuffs need a checkup, not well functional right now
@@ -534,8 +524,8 @@
end
_detalhes.tabela_overall = _detalhes.tabela_overall - _detalhes.tabela_vigente --> isso aqui é novo, ele vai subtrair da overall qualquer dado adicionado na tabela descardata
_table_wipe (_detalhes.tabela_vigente) --> descarta ela, não será mais usada
--_table_wipe (_detalhes.tabela_vigente) --> descarta ela, não será mais usada
_detalhes.tabela_vigente = _detalhes.tabela_historico.tabelas[1] --> pega a tabela do ultimo combate
if (_detalhes.tabela_vigente.start_time == 0) then
@@ -607,7 +597,7 @@
end
if (self.modo == _detalhes._detalhes_props["MODO_RAID"]) then
_detalhes.RaidTables:switch (nil, self.auto_switch_to_old [5])
_detalhes.RaidTables:switch (nil, self.auto_switch_to_old [5], self)
elseif (self.modo == _detalhes._detalhes_props["MODO_ALONE"]) then
_detalhes.SoloTables:switch (nil, self.auto_switch_to_old [6])
@@ -945,13 +935,9 @@
if (esta_barra.minha_tabela.serial and esta_barra.minha_tabela.serial ~= "") then
local avatar = NickTag:GetNicknameTable (esta_barra.minha_tabela.serial)
if (avatar) then
if (avatar [2]) then
if (avatar [2] and avatar [4] and avatar [1]) then
GameCooltip:SetBannerImage (1, avatar [2], 80, 40, avatarPoint, avatarTexCoord, nil) --> overlay [2] avatar path
end
if (avatar [4]) then
GameCooltip:SetBannerImage (2, avatar [4], 200, 55, backgroundPoint, avatar [5], avatar [6]) --> background
end
if (avatar [1]) then
GameCooltip:SetBannerText (1, avatar [1], textPoint) --> text [1] nickname
end
end
+9 -11
View File
@@ -176,25 +176,22 @@
if (_detalhes.segments_amount_to_save and _detalhes.segments_amount_to_save < _detalhes.segments_amount) then
for i = _detalhes.segments_amount, _detalhes.segments_amount_to_save+1, -1 do
if (_detalhes.tabela_historico.tabelas [i]) then
--_detalhes.tabela_historico.tabelas [i] = nil
table.remove (_detalhes.tabela_historico.tabelas, i)
end
end
end
--local tabela_overall = _detalhes.tabela_overall
_detalhes.tabela_overall = nil
--tabela do combate atual
local tabela_atual = _detalhes.tabela_vigente or _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
local tabela_atual = _detalhes.tabela_vigente or {}
--limpa a tabela overall
_detalhes.tabela_overall = nil
for _, _tabela in _ipairs (historico_tabelas) do
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
end
--tabelas_de_combate [#tabelas_de_combate+1] = tabela_atual --não salva mais a atual
--tabelas_de_combate [#tabelas_de_combate+1] = tabela_overall --não salva mais a overall
--> make sure details database exists
--verifica se a database existe mesmo
_detalhes_database = _detalhes_database or {}
for tabela_index, _combate in _ipairs (tabelas_de_combate) do
@@ -238,9 +235,6 @@
if (_iter.data.grupo or _iter.data.boss or _iter.data.boss_fight_component or IsBossEncounter) then
can_erase = false
--if (class_type == 1) then
-- print ("SAVE ", _iter.data.nome, tabela_index)
--end
else
local owner = _iter.data.owner
if (owner) then
@@ -563,6 +557,10 @@
esta_instancia.lastIcon = nil
esta_instancia.menu_attribute_string = nil
esta_instancia.wait_for_plugin_created = nil
esta_instancia.waiting_raid_plugin = nil
esta_instancia.waiting_pid = nil
end
+7 -1
View File
@@ -25,6 +25,10 @@
print (PluginName, Loc ["STRING_TOOOLD"])
return _detalhes:NewError ("Details version is out of date.")
end
if (PluginType == "TANK") then
PluginType = "RAID"
end
if (not PluginType) then
return _detalhes:NewError ("InstallPlugin parameter 1 (plugin type) not especified")
@@ -77,7 +81,7 @@
_detalhes.PluginCount.SOLO = _detalhes.PluginCount.SOLO + 1
elseif (PluginType == "TANK") then
elseif (PluginType == "RAID") then
--> Install Plugin
_detalhes.RaidTables.Plugins [#_detalhes.RaidTables.Plugins+1] = PluginObject
@@ -87,6 +91,8 @@
_detalhes.PluginCount.RAID = _detalhes.PluginCount.RAID + 1
_detalhes:InstanceCall ("RaidPluginInstalled", PluginAbsoluteName)
elseif (PluginType == "TOOLBAR") then
--> Install Plugin
+195 -106
View File
@@ -19,135 +19,224 @@
--> constants
local modo_raid = _detalhes._detalhes_props["MODO_RAID"]
local modo_alone = _detalhes._detalhes_props["MODO_ALONE"]
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internal functions
function _detalhes:RaidMode (enable, instancia)
if (enable) then
_detalhes.RaidTables.instancia = instancia
_detalhes.RaidTables.Mode = _detalhes.RaidTables.Mode or 1 --> solo mode
instancia.modo = _detalhes._detalhes_props["MODO_RAID"]
gump:Fade (instancia, 1, nil, "barras")
if (instancia.rolagem) then
instancia:EsconderScrollBar (true) --> hida a scrollbar
end
_detalhes:ResetaGump (instancia)
_detalhes.raid = instancia.meu_id
instancia:AtualizaGumpPrincipal (true)
local first_enabled_plugin, first_enabled_plugin_index
for index, plugin in ipairs (_detalhes.RaidTables.Plugins) do
if (plugin.__enabled) then
first_enabled_plugin = plugin
first_enabled_plugin_index = index
end
end
if (not first_enabled_plugin) then
_detalhes:WaitForSoloPlugin (instancia)
else
if (not _detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode]) then
_detalhes.RaidTables.Mode = first_enabled_plugin_index
end
_detalhes.RaidTables:switch (nil, _detalhes.RaidTables.Mode)
end
function _detalhes.RaidTables:DisableRaidMode (instance)
--free
self:SetInUse (instance.current_raid_plugin, nil)
--hide
local current_plugin_object = _detalhes:GetPlugin (instance.current_raid_plugin)
if (current_plugin_object) then
current_plugin_object.Frame:Hide()
end
instance.current_raid_plugin = nil
--[[
if (_G.DetailsWaitForPluginFrame:IsShown()) then
_detalhes:CancelWaitForPlugin()
end
gump:Fade (instancia, 1, nil, "barras")
gump:Fade (instancia.scroll, 0)
if (instancia.need_rolagem) then
instancia:MostrarScrollBar (true)
else
_detalhes.RaidTables:switch()
_detalhes.raid = nil
--> precisa verificar se ele precisa a rolagem certo?
instancia:ReajustaGump()
end
--> calcula se existem barras, etc...
if (not instancia.rows_fit_in_window) then --> as barras não forma iniciadas ainda
instancia.rows_fit_in_window = _math_floor (instancia.baseframe.BoxBarrasAltura / instancia.row_height)
if (instancia.rows_created < instancia.rows_fit_in_window) then
for i = #instancia.barras+1, instancia.rows_fit_in_window do
local nova_barra = gump:CriaNovaBarra (instancia, i, 30) --> cria nova barra
nova_barra.texto_esquerdo:SetText (Loc ["STRING_NEWROW"])
nova_barra.statusbar:SetValue (100)
instancia.barras [i] = nova_barra
end
instancia.rows_created = #instancia.barras
end
end
--]]
end
function _detalhes:RaidPluginInstalled (plugin_name)
if (self.waiting_raid_plugin) then
--print (self.meu_id, 2, self.last_raid_plugin, " == ", plugin_name)
if (self.last_raid_plugin == plugin_name) then
if (self.waiting_pid) then
self:CancelTimer (self.waiting_pid, true)
end
self:CancelWaitForPlugin()
_detalhes.RaidTables:EnableRaidMode (self, plugin_name)
end
end
end
function _detalhes.RaidTables:EnableRaidMode (instance, plugin_name)
if (_G.DetailsWaitForPluginFrame:IsShown()) then
_detalhes:CancelWaitForPlugin()
end
gump:Fade (instancia, 1, nil, "barras")
gump:Fade (instancia.scroll, 0)
if (instancia.need_rolagem) then
instancia:MostrarScrollBar (true)
else
--> precisa verificar se ele precisa a rolagem certo?
instancia:ReajustaGump()
end
--> calcula se existem barras, etc...
if (not instancia.rows_fit_in_window) then --> as barras não forma iniciadas ainda
instancia.rows_fit_in_window = _math_floor (instancia.baseframe.BoxBarrasAltura / instancia.row_height)
if (instancia.rows_created < instancia.rows_fit_in_window) then
for i = #instancia.barras+1, instancia.rows_fit_in_window do
local nova_barra = gump:CriaNovaBarra (instancia, i, 30) --> cria nova barra
nova_barra.texto_esquerdo:SetText (Loc ["STRING_NEWROW"])
nova_barra.statusbar:SetValue (100)
instancia.barras [i] = nova_barra
end
instancia.rows_created = #instancia.barras
--> set the mode
if (instance.modo == modo_alone) then
instance:SoloMode (false)
end
instance.modo = modo_raid
--> hide rows, scrollbar
gump:Fade (instance, 1, nil, "barras")
if (instance.rolagem) then
instance:EsconderScrollBar (true) --> hida a scrollbar
end
_detalhes:ResetaGump (instance)
instance:AtualizaGumpPrincipal (true)
--> get the plugin name
--if the desired plugin isn't passed, try to get the latest used.
if (not plugin_name) then
local last_plugin_used = instance.last_raid_plugin
if (last_plugin_used) then
if (self:IsAvailable (last_plugin_used, instance)) then
plugin_name = last_plugin_used
end
end
end
--if we still doesnt have a name, try to get the first available
if (not plugin_name) then
local available = self:GetAvailablePlugins()
if (#available == 0) then
if (not instance.wait_for_plugin_created or not instance.WaitForPlugin) then
instance:CreateWaitForPlugin()
end
return instance:WaitForPlugin()
end
plugin_name = available [1] [4]
end
--last check if the name is okey
if (self:IsAvailable (plugin_name, instance)) then
self:switch (nil, plugin_name, instance)
else
if (not instance.wait_for_plugin) then
instance:CreateWaitForPlugin()
end
return instance:WaitForPlugin()
end
end
function _detalhes:InstanciaCheckForDisabledRaid (instancia)
if (not instancia) then
instancia = self
end
if (instancia.modo == modo_raid) then
if (instancia.iniciada) then
_detalhes:AlteraModo (instancia, _detalhes._detalhes_props["MODO_GROUP"])
instancia:RaidMode (false, instancia)
_detalhes:ResetaGump (instancia)
else
instancia.modo = _detalhes._detalhes_props["MODO_GROUP"]
instancia.last_modo = _detalhes._detalhes_props["MODO_GROUP"]
function _detalhes.RaidTables:GetAvailablePlugins()
local available = {}
for index, plugin in ipairs (self.Menu) do
if (not self.PluginsInUse [ plugin [4] ] and plugin [3].__enabled) then -- 3 = plugin object 4 = absolute name
tinsert (available, plugin)
end
end
return available
end
function _detalhes.RaidTables:IsAvailable (plugin_name, instance)
--check if is installed
if (not self.NameTable [plugin_name]) then
return false
end
function _detalhes.RaidTables:switch (_, _switchTo)
--> just hide all
if (not _switchTo) then
if (#_detalhes.RaidTables.Plugins > 0) then --> have at least one plugin
_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].Frame:Hide()
--check if is enabled
if (not self.NameTable [plugin_name].__enabled) then
return false
end
--check if is available
local in_use = self.PluginsInUse [ plugin_name ]
-- print (instance:GetId() .. " In Use By Instance: ", in_use )
if (in_use and in_use ~= instance:GetId()) then
return false
else
return true
end
end
function _detalhes.RaidTables:SetInUse (absolute_name, instance_number)
if (absolute_name) then
self.PluginsInUse [ absolute_name ] = instance_number
end
end
----------------
function _detalhes.RaidTables:switch (_, plugin_name, instance)
local update_menu = false
if (not self) then --came from cooltip
self = _detalhes.RaidTables
update_menu = true
end
--only hide the current plugin shown
if (not plugin_name) then
if (instance.current_raid_plugin) then
--free
self:SetInUse (instance.current_raid_plugin, nil)
--hide
local current_plugin_object = _detalhes:GetPlugin (instance.current_raid_plugin)
if (current_plugin_object) then
current_plugin_object.Frame:Hide()
end
instance.current_raid_plugin = nil
end
return
end
--> jump to the next
if (_switchTo == -1) then
_switchTo = _detalhes.RaidTables.Mode + 1
if (_switchTo > #_detalhes.RaidTables.Plugins) then
_switchTo = 1
--check if is realy available
if (not self:IsAvailable (plugin_name, instance)) then
instance.last_raid_plugin = plugin_name
if (not instance.wait_for_plugin) then
instance:CreateWaitForPlugin()
end
return instance:WaitForPlugin()
end
--hide current shown plugin
if (instance.current_raid_plugin) then
--free
self:SetInUse (instance.current_raid_plugin, nil)
--hide
local current_plugin_object = _detalhes:GetPlugin (instance.current_raid_plugin)
if (current_plugin_object) then
current_plugin_object.Frame:Hide()
end
end
local plugin_object = _detalhes:GetPlugin (plugin_name)
local ThisFrame = _detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode]
if (not ThisFrame or not ThisFrame.__enabled) then
--> frame not found, try in few second again
_detalhes.RaidTables.Mode = _switchTo
_detalhes:WaitForSoloPlugin (_detalhes:GetRaidMode())
return
if (plugin_object and plugin_object.__enabled and plugin_object.Frame) then
instance.last_raid_plugin = plugin_name
instance.current_raid_plugin = plugin_name
self:SetInUse (plugin_name, instance:GetId())
plugin_object.instance_id = instance:GetId()
plugin_object.Frame:SetPoint ("TOPLEFT", instance.bgframe)
plugin_object.Frame:Show()
instance:ChangeIcon (plugin_object.__icon)--; print (instance:GetId(),"icon",plugin_object.__icon)
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instance, instance.atributo, instance.sub_atributo)
if (update_menu) then
GameCooltip:ExecFunc (instance.baseframe.cabecalho.atributo)
--instance _detalhes.popup:ExecFunc (DeleteButton)
end
else
if (not instance.wait_for_plugin) then
instance:CreateWaitForPlugin()
end
return instance:WaitForPlugin()
end
--> hide current frame
_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].Frame:Hide()
--> switch mode
_detalhes.RaidTables.Mode = _switchTo
--> show and setpoint new frame
_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].Frame:Show()
_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].Frame:SetPoint ("TOPLEFT",_detalhes.RaidTables.instancia.bgframe)
_detalhes.RaidTables.instancia:ChangeIcon (_detalhes.RaidTables.Menu [_detalhes.RaidTables.Mode] [2])
end
+2
View File
@@ -192,6 +192,8 @@
_detalhes.SoloTables.instancia:ChangeIcon (_detalhes.SoloTables.Menu [_detalhes.SoloTables.Mode] [2])
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, _detalhes.SoloTables.instancia, _detalhes.SoloTables.instancia.atributo, _detalhes.SoloTables.instancia.sub_atributo)
end
return true
+1 -1
View File
@@ -870,7 +870,7 @@ do
for index, child in _ipairs (PAttribute.childs) do
if (child.instance == instance and child.enabled and child.instance:IsEnabled()) then
local sName = _detalhes:GetSubAttributeName (attribute, subAttribute)
local sName = child.instance:GetInstanceAttributeText()
child.text:SetText (sName)
end
end
+2 -2
View File
@@ -146,8 +146,8 @@
GameCooltip:Reset()
--GameCooltip:SetOption ("FixedWidth", 200)
GameCooltip:SetOption ("ButtonsYMod", -5)
GameCooltip:SetOption ("YSpacingMod", -5)
GameCooltip:SetOption ("ButtonsYMod", -3)
GameCooltip:SetOption ("YSpacingMod", -3)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", true)
GameCooltip:SetColor (1, 0.5, 0.5, 0.5, 0.5)
+16 -11
View File
@@ -20,6 +20,7 @@
local _math_max = math.max --lua local
local _type = type --lua local
local _string_match = string.match --lua local
local loadstring = loadstring --lua local
local _UnitClass = UnitClass --wow api local
local _IsInRaid = IsInRaid --wow api local
@@ -115,17 +116,18 @@
_detalhes.ToKFunctions = {_detalhes.NoToK, _detalhes.ToK, _detalhes.ToK2, _detalhes.ToK0, _detalhes.ToKMin, _detalhes.ToK2Min, _detalhes.ToK0Min, _detalhes.comma_value}
--> replacing data
local args
local replace_arg = function (i)
return args [tonumber(i)]
end
local run_function = function (str)
local r = loadstring (str)(args[4])
return r or 0
end
function string:ReplaceData (...)
local args = {...}
local function getarg (i)
local n = tonumber (i)
if (n) then
return args [tonumber(i)]
else
return loadstring (i)()
end
end
return (self:gsub('{data(%d+)}', getarg):gsub ('{func(.-)}', getarg))
args = {...}
return (self:gsub ("{data(%d+)}", replace_arg):gsub ("{func(.-)}", run_function))
end
--local usertext = "i got the time: {data2}, {data3}% of {data1} minutes"
@@ -160,7 +162,10 @@
s = string.sub(hexstr, mod+1, mod+1) .. s
num = math.floor(num / 16)
end
if s == '' then s = '0' end
if s == '' then s = '00' end
if (string.len (s) == 1) then
s = "0"..s
end
return s
end
+100 -28
View File
@@ -74,39 +74,31 @@
function _detalhes:AnimarBarra (esta_barra, fim)
esta_barra.inicio = esta_barra.statusbar:GetValue()
esta_barra.fim = fim
esta_barra.proximo_update = 0
esta_barra.tem_animacao = 1
esta_barra:SetScript ("OnUpdate", self.FazerAnimacao)
if (esta_barra.fim > esta_barra.inicio) then
esta_barra:SetScript ("OnUpdate", self.FazerAnimacao_Direita)
else
esta_barra:SetScript ("OnUpdate", self.FazerAnimacao_Esquerda)
end
end
function _detalhes:FazerAnimacao (elapsed)
function _detalhes:FazerAnimacao_Esquerda (elapsed)
self.inicio = self.inicio - 0.8
self.statusbar:SetValue (self.inicio)
if (self.inicio-1 <= self.fim) then
self.tem_animacao = 0
self:SetScript ("OnUpdate", nil)
end
end
local velocidade = 0.8
--[[
local velocidade = 0.1
local distancia = self.inicio - self.fim
if (distancia > 40 or distancia < -40) then
velocidade = 0.8
elseif (distancia > 20 or distancia < -20) then
velocidade = 0.4
function _detalhes:FazerAnimacao_Direita (elapsed)
self.inicio = self.inicio + 0.8
self.statusbar:SetValue (self.inicio)
if (self.inicio+1 >= self.fim) then
self.tem_animacao = 0
self:SetScript ("OnUpdate", nil)
end
--]]
if (self.fim > self.inicio) then
self.inicio = self.inicio+velocidade
self.statusbar:SetValue (self.inicio)
if (self.inicio+1 >= self.fim) then
self.tem_animacao = 0
self:SetScript ("OnUpdate", nil)
end
else
self.inicio = self.inicio-velocidade
self.statusbar:SetValue (self.inicio)
if (self.inicio-1 <= self.fim) then
self.tem_animacao = 0
self:SetScript ("OnUpdate", nil)
end
end
self.proximo_update = 0
end
function _detalhes:AtualizaPontos()
@@ -530,6 +522,86 @@
end
--> cria o frame de wait for plugin
function _detalhes:CreateWaitForPlugin()
local WaitForPluginFrame = CreateFrame ("frame", "DetailsWaitForPluginFrame" .. self.meu_id, UIParent)
local WaitTexture = WaitForPluginFrame:CreateTexture (nil, "overlay")
WaitTexture:SetTexture ("Interface\\UNITPOWERBARALT\\Mechanical_Circular_Frame")
WaitTexture:SetPoint ("center", WaitForPluginFrame)
WaitTexture:SetWidth (180)
WaitTexture:SetHeight (180)
WaitForPluginFrame.wheel = WaitTexture
local RotateAnimGroup = WaitForPluginFrame:CreateAnimationGroup()
local rotate = RotateAnimGroup:CreateAnimation ("Rotation")
rotate:SetDegrees (360)
rotate:SetDuration (60)
RotateAnimGroup:SetLooping ("repeat")
local bgpanel = gump:NewPanel (UIParent, UIParent, "DetailsWaitFrameBG"..self.meu_id, nil, 120, 30, false, false, false)
bgpanel:SetPoint ("center", WaitForPluginFrame, "center")
bgpanel:SetBackdrop ({bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background"})
bgpanel:SetBackdropColor (.2, .2, .2, 1)
local label = gump:NewLabel (UIParent, UIParent, nil, nil, Loc ["STRING_WAITPLUGIN"]) --> localize-me
label.color = "silver"
label:SetPoint ("center", WaitForPluginFrame, "center")
label:SetJustifyH ("center")
label:Hide()
WaitForPluginFrame:Hide()
self.wait_for_plugin_created = true
function self:WaitForPlugin()
self:ChangeIcon ([[Interface\GossipFrame\ActiveQuestIcon]])
if (WaitForPluginFrame:IsShown() and WaitForPluginFrame:GetParent() == self.baseframe) then
self.waiting_pid = self:ScheduleTimer ("ExecDelayedPlugin1", 5, self)
end
WaitForPluginFrame:SetParent (self.baseframe)
WaitForPluginFrame:SetAllPoints (self.baseframe)
local size = math.max (self.baseframe:GetHeight()* 0.35, 100)
WaitForPluginFrame.wheel:SetWidth (size)
WaitForPluginFrame.wheel:SetHeight (size)
WaitForPluginFrame:Show()
label:Show()
bgpanel:Show()
RotateAnimGroup:Play()
self.waiting_raid_plugin = true
self.waiting_pid = self:ScheduleTimer ("ExecDelayedPlugin1", 5, self)
end
function self:CancelWaitForPlugin()
RotateAnimGroup:Stop()
WaitForPluginFrame:Hide()
label:Hide()
bgpanel:Hide()
end
function self:ExecDelayedPlugin1()
self.waiting_raid_plugin = nil
self.waiting_pid = nil
RotateAnimGroup:Stop()
WaitForPluginFrame:Hide()
label:Hide()
bgpanel:Hide()
if (self.meu_id == _detalhes.solo) then
_detalhes.SoloTables:switch (nil, _detalhes.SoloTables.Mode)
elseif (self.modo == _detalhes._detalhes_props["MODO_RAID"]) then
_detalhes.RaidTables:EnableRaidMode (self)
end
end
end
do
local WaitForPluginFrame = CreateFrame ("frame", "DetailsWaitForPluginFrame", UIParent)
local WaitTexture = WaitForPluginFrame:CreateTexture (nil, "overlay")