- Full rewrite on custom displays.
- Fixed the report bug on healing, energy and misc attributes.
- Fixed a bug where the player pet wasn't being tracked after logon in the game.
- NewAPI: instance:IsGroupMode() return if a instance is in group mode.
- NewAPI: instance:GetCustomObject() return the custom object current used by the isntance.
- NewAPI: _detalhes:GetEncounterActorsName (EJ_EncounterID) return a hash table with [bossname] -> {[model] [displayInfo]}
- NewAPI: actor:GetDisplayName() actor:Class() return the formated name; return the class.
- NewAPI: _detalhes:GetClassIcon (class) return the icon path and texcoords.
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
|
||||
_detalhes.userversion = "v1.16.3b"
|
||||
_detalhes.version = "Alpha 019"
|
||||
_detalhes.realversion = 19
|
||||
_detalhes.userversion = "v1.17.0"
|
||||
_detalhes.version = "Alpha 020"
|
||||
_detalhes.realversion = 20
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> initialization stuff
|
||||
|
||||
@@ -148,6 +148,9 @@
|
||||
--> record last event before dead
|
||||
esta_tabela.last_events_tables = {}
|
||||
|
||||
--> players in the raid
|
||||
esta_tabela.raid_roster = {}
|
||||
|
||||
--> frags
|
||||
esta_tabela.frags = {}
|
||||
esta_tabela.frags_need_refresh = false
|
||||
|
||||
+1331
-115
File diff suppressed because it is too large
Load Diff
@@ -127,6 +127,10 @@
|
||||
return amount
|
||||
end
|
||||
end
|
||||
|
||||
--[[ exported]] function _detalhes:IsGroupPlayer()
|
||||
return self.grupo
|
||||
end
|
||||
|
||||
--[[ exported]] function _detalhes:IsPlayer()
|
||||
if (self.flag_original) then
|
||||
@@ -210,7 +214,7 @@
|
||||
return _unpack (_detalhes.class_colors.ARENA_ALLY)
|
||||
|
||||
else
|
||||
if (not is_player_class [actor.classe] and _bit_band (actor.flag_original, 0x00000020) ~= 0) then --> neutral
|
||||
if (not is_player_class [actor.classe] and actor.flag_original and _bit_band (actor.flag_original, 0x00000020) ~= 0) then --> neutral
|
||||
return _unpack (_detalhes.class_colors.NEUTRAL)
|
||||
else
|
||||
return _unpack (_detalhes.class_colors [actor.classe])
|
||||
|
||||
@@ -269,7 +269,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
showing:remapear()
|
||||
|
||||
if (exportar) then
|
||||
return total, keyName, instancia.top
|
||||
return total, keyName, instancia.top, amount
|
||||
end
|
||||
|
||||
if (amount < 1) then --> não há barras para mostrar
|
||||
|
||||
@@ -359,7 +359,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
showing:remapear()
|
||||
|
||||
if (exportar) then
|
||||
return total, keyName, instancia.top
|
||||
return total, keyName, instancia.top, amount
|
||||
end
|
||||
|
||||
if (amount < 1) then --> não há barras para mostrar
|
||||
|
||||
@@ -158,6 +158,10 @@ function _detalhes:IsRaidMode()
|
||||
return self.modo == _detalhes._detalhes_props["MODO_RAID"]
|
||||
end
|
||||
|
||||
function _detalhes:IsGroupMode()
|
||||
return self.modo == _detalhes._detalhes_props["MODO_GROUP"]
|
||||
end
|
||||
|
||||
function _detalhes:IsNormalMode()
|
||||
if (self:GetInstanceId() == 2 or self:GetInstanceId() == 3) then
|
||||
return true
|
||||
@@ -166,6 +170,19 @@ function _detalhes:IsNormalMode()
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:GetCustomObject()
|
||||
return _detalhes.custom [self.sub_atributo]
|
||||
end
|
||||
|
||||
function _detalhes:ResetAttribute()
|
||||
if (self.iniciada) then
|
||||
self:TrocaTabela (nil, 1, 1, true)
|
||||
else
|
||||
self.atributo = 1
|
||||
self.sub_atributo = 1
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> retorna se a instância esta ou não ativa
|
||||
@@ -1312,7 +1329,10 @@ function _detalhes:InstanceReset (instance)
|
||||
self:AtualizaSegmentos (self)
|
||||
self:AtualizaSoloMode_AfertReset()
|
||||
self:ResetaGump()
|
||||
_detalhes:AtualizaGumpPrincipal (self, true) --atualiza todas as instancias
|
||||
|
||||
if (not _detalhes.initializing) then
|
||||
_detalhes:AtualizaGumpPrincipal (self, true) --atualiza todas as instancias
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:RefreshBars (instance)
|
||||
@@ -1737,6 +1757,7 @@ 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
|
||||
|
||||
@@ -1928,21 +1949,32 @@ function _detalhes:MontaAtributosOption (instancia, func)
|
||||
--> custom
|
||||
CoolTip:AddMenu (1, func, nil, 5, nil, atributos.lista[5], nil, true)
|
||||
CoolTip:AddIcon ("Interface\\AddOns\\Details\\images\\atributos_icones", 1, 1, 20, 20, p*(5-1), p*(5), 0, 1)
|
||||
CoolTip:AddMenu (2, _detalhes.OpenCustomWindow, nil, nil, nil, Loc ["STRING_CUSTOM_NEW"], "Interface\\PaperDollInfoFrame\\Character-Plus", true)
|
||||
CoolTip:AddMenu (2, _detalhes.OpenCustomDisplayWindow, nil, nil, nil, Loc ["STRING_CUSTOM_NEW"], "Interface\\PaperDollInfoFrame\\Character-Plus", true)
|
||||
|
||||
for index, custom in _ipairs (_detalhes.custom) do
|
||||
CoolTip:AddMenu (2, func, nil, 5, index, custom.name, custom.icon, true)
|
||||
CoolTip:AddLine (custom.name, nil, 2)
|
||||
CoolTip:AddMenu (2, func, true, 5, index)
|
||||
CoolTip:AddIcon (custom.icon, 2, 1, 16, 16)
|
||||
end
|
||||
|
||||
--> set the wallpaper on custom
|
||||
GameCooltip:SetWallpaper (2, [[Interface\TALENTFRAME\WarriorArm-TopLeft]], {1, 0, 0, 1}, {1, 1, 1, 0.1})
|
||||
|
||||
if (#_detalhes.custom == 0) then
|
||||
CoolTip:SetLastSelected (2, 5, 1)
|
||||
else
|
||||
CoolTip:SetLastSelected (2, 5, instancia.sub_atributo_last [5]+1)
|
||||
if (instancia.atributo == 5) then
|
||||
CoolTip:SetLastSelected (2, 5, instancia.sub_atributo+1)
|
||||
else
|
||||
CoolTip:SetLastSelected (2, 5, instancia.sub_atributo_last [5]+1)
|
||||
end
|
||||
end
|
||||
|
||||
CoolTip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_vidro]])
|
||||
|
||||
CoolTip:SetLastSelected (1, atributo_ativo)
|
||||
|
||||
CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
|
||||
CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\DeathKnightBlood-TopLeft]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
|
||||
--CoolTip:SetWallpaper (1, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Horizontal-Desaturated]], nil, {1, 1, 1, 0.3})
|
||||
|
||||
return menu_principal, sub_menus
|
||||
@@ -2235,7 +2267,8 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
|
||||
if (not is_current) then
|
||||
--> assumindo que self é sempre uma instância aqui.
|
||||
local total, keyName, keyNameSec, first, container_amount
|
||||
local total, keyName, keyNameSec, first
|
||||
local container_amount = 0
|
||||
local atributo = self.atributo
|
||||
local container = self.showing [atributo]._ActorTable
|
||||
|
||||
@@ -2261,6 +2294,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
end
|
||||
elseif (atributo == 2) then --> heal
|
||||
total, keyName, first, container_amount = _detalhes.atributo_heal:RefreshWindow (self, self.showing, true, true)
|
||||
|
||||
if (self.sub_atributo == 1) then
|
||||
keyNameSec = "hps"
|
||||
end
|
||||
@@ -2281,10 +2315,8 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
elseif (atributo == 5) then --> custom
|
||||
|
||||
if (_detalhes.custom [self.sub_atributo]) then
|
||||
total, keyName, first, container_amount = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, {key = "custom"})
|
||||
total = self.showing.totals [self.customName]
|
||||
atributo = _detalhes.custom [self.sub_atributo].attribute
|
||||
container = self.showing [atributo]._ActorTable
|
||||
total, container, first, container_amount = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, true)
|
||||
keyName = "value"
|
||||
else
|
||||
total, keyName, first, container_amount = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true)
|
||||
total = 1
|
||||
@@ -2294,10 +2326,11 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
--print (total, keyName, first, atributo, container_amount)
|
||||
end
|
||||
|
||||
amt = math.min (amt, container_amount)
|
||||
amt = math.min (amt, container_amount or 0)
|
||||
|
||||
for i = 1, amt do
|
||||
local _thisActor = container [i]
|
||||
|
||||
if (_thisActor) then
|
||||
|
||||
local amount = _thisActor [keyName]
|
||||
@@ -2403,7 +2436,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
|
||||
atributo = _detalhes.custom [self.sub_atributo].attribute
|
||||
end
|
||||
|
||||
local this_amt = math.min (#container, container_amount, amt)
|
||||
local this_amt = math.min (#container, container_amount or 0, amt)
|
||||
this_amt = #container - this_amt
|
||||
|
||||
for i = container_amount, this_amt, -1 do
|
||||
|
||||
@@ -566,7 +566,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
showing:remapear()
|
||||
|
||||
if (exportar) then
|
||||
return total, keyName, instancia.top
|
||||
return total, keyName, instancia.top, amount
|
||||
end
|
||||
|
||||
if (amount < 1) then --> não há barras para mostrar
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _getmetatable = getmetatable --lua local
|
||||
local _bit_band = bit.band --lua local
|
||||
local _table_sort = table.sort --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local _pairs = pairs --lua local
|
||||
|
||||
@@ -62,6 +63,29 @@
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
function container_combatentes:GetTotal (key)
|
||||
local total = 0
|
||||
key = key or "total"
|
||||
for _, actor in _ipairs (self._ActorTable) do
|
||||
total = total + (actor [key] or 0)
|
||||
end
|
||||
|
||||
return total
|
||||
end
|
||||
|
||||
function container_combatentes:GetTotalOnRaid (key, combat)
|
||||
local total = 0
|
||||
key = key or "total"
|
||||
local roster = combat.raid_roster
|
||||
for _, actor in _ipairs (self._ActorTable) do
|
||||
if (roster [actor.nome]) then
|
||||
total = total + (actor [key] or 0)
|
||||
end
|
||||
end
|
||||
|
||||
return total
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
@@ -435,7 +459,6 @@
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- grava o objeto no mapa do container
|
||||
|
||||
local size = #self._ActorTable+1
|
||||
self._ActorTable [size] = novo_objeto --> grava na tabela de indexes
|
||||
self._NameIndexTable [nome] = size --> grava no hash map o index deste jogador
|
||||
@@ -490,6 +513,21 @@
|
||||
end
|
||||
end
|
||||
|
||||
local bykey
|
||||
local sort = function (t1, t2)
|
||||
return t1 [bykey] > t2 [bykey]
|
||||
end
|
||||
|
||||
function container_combatentes:SortByKey (key)
|
||||
bykey = key
|
||||
_table_sort (self._ActorTable, sort)
|
||||
self:remapear()
|
||||
end
|
||||
|
||||
function container_combatentes:Remap()
|
||||
return self:remapear()
|
||||
end
|
||||
|
||||
function container_combatentes:remapear()
|
||||
local mapa = self._NameIndexTable
|
||||
local conteudo = self._ActorTable
|
||||
|
||||
@@ -132,6 +132,7 @@ function container_pets:BuscarPets()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif (_IsInGroup()) then
|
||||
for i = 1, _GetNumGroupMembers()-1, 1 do
|
||||
local pet_serial = _UnitGUID ("partypet"..i)
|
||||
@@ -149,6 +150,21 @@ function container_pets:BuscarPets()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local pet_serial = _UnitGUID ("pet")
|
||||
if (pet_serial) then
|
||||
if (not _detalhes.tabela_pets.pets [pet_serial]) then
|
||||
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID ("player"), _detalhes.playername, 0x514)
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
local pet_serial = _UnitGUID ("pet")
|
||||
if (pet_serial) then
|
||||
if (not _detalhes.tabela_pets.pets [pet_serial]) then
|
||||
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID ("player"), _detalhes.playername, 0x514)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
--> reaplica indexes e metatables
|
||||
function _detalhes:RestauraMetaTables()
|
||||
|
||||
_detalhes.refresh:r_atributo_custom()
|
||||
|
||||
--> container de pets e histórico
|
||||
_detalhes.refresh:r_container_pets (_detalhes.tabela_pets)
|
||||
_detalhes.refresh:r_historico (_detalhes.tabela_historico)
|
||||
@@ -577,6 +579,8 @@
|
||||
esta_instancia.waiting_pid = nil
|
||||
|
||||
end
|
||||
|
||||
_detalhes.clear:c_atributo_custom()
|
||||
|
||||
end
|
||||
|
||||
|
||||
+33
-8
@@ -9,6 +9,7 @@
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _tempo = time()
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
@@ -16,7 +17,8 @@
|
||||
local _UnitHealth = UnitHealth --wow api local
|
||||
local _UnitHealthMax = UnitHealthMax --wow api local
|
||||
local _UnitIsFeignDeath = UnitIsFeignDeath --wow api local
|
||||
local _UnitGUID = UnitGUID
|
||||
local _UnitGUID = UnitGUID --wow api local
|
||||
local _GetUnitName = GetUnitName --wow api local
|
||||
local _GetInstanceInfo = GetInstanceInfo --wow api local
|
||||
local _IsInRaid = IsInRaid --wow api local
|
||||
local _IsInGroup = IsInGroup --wow api local
|
||||
@@ -34,7 +36,7 @@
|
||||
local _table_sort = table.sort --lua local
|
||||
local _type = type --lua local
|
||||
local _math_ceil = math.ceil --lua local
|
||||
local _table_wipe = table.wipe
|
||||
local _table_wipe = table.wipe --lua local
|
||||
|
||||
local escudo = _detalhes.escudos --details local
|
||||
local parser = _detalhes.parser --details local
|
||||
@@ -2822,6 +2824,7 @@
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:PET_BATTLE_CLOSE (...)
|
||||
_detalhes.pet_battle = false
|
||||
for index, instance in _ipairs (_detalhes.tabela_instancias) do
|
||||
@@ -2831,6 +2834,10 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:UNIT_NAME_UPDATE (...)
|
||||
_detalhes:SchedulePetUpdate (5)
|
||||
end
|
||||
|
||||
local parser_functions = _detalhes.parser_functions
|
||||
|
||||
function _detalhes:OnEvent (evento, ...)
|
||||
@@ -2933,34 +2940,52 @@
|
||||
_table_wipe (raid_members_cache)
|
||||
_table_wipe (tanks_members_cache)
|
||||
|
||||
local roster = _detalhes.tabela_vigente.raid_roster
|
||||
|
||||
if (_IsInRaid()) then
|
||||
for i = 1, _GetNumGroupMembers() do
|
||||
local name = _GetUnitName ("raid"..i, true)
|
||||
|
||||
raid_members_cache [_UnitGUID ("raid"..i)] = true
|
||||
local role = _UnitGroupRolesAssigned (GetUnitName ("raid"..i, true))
|
||||
roster [name] = true
|
||||
|
||||
local role = _UnitGroupRolesAssigned (name)
|
||||
if (role == "TANK") then
|
||||
tanks_members_cache [_UnitGUID ("raid"..i)] = true
|
||||
|
||||
--print ("tank detected:", GetUnitName ("raid"..i, true))
|
||||
end
|
||||
end
|
||||
|
||||
elseif (_IsInGroup()) then
|
||||
--party
|
||||
for i = 1, _GetNumGroupMembers()-1 do
|
||||
local name = _GetUnitName ("party"..i, true)
|
||||
|
||||
raid_members_cache [_UnitGUID ("party"..i)] = true
|
||||
local role = _UnitGroupRolesAssigned (GetUnitName ("party"..i, true))
|
||||
roster [name] = true
|
||||
|
||||
local role = _UnitGroupRolesAssigned (name)
|
||||
if (role == "TANK") then
|
||||
tanks_members_cache [_UnitGUID ("party"..i)] = true
|
||||
end
|
||||
end
|
||||
|
||||
--player
|
||||
local name = GetUnitName ("player", true)
|
||||
|
||||
raid_members_cache [_UnitGUID ("player")] = true
|
||||
local role = _UnitGroupRolesAssigned (GetUnitName ("player", true))
|
||||
roster [name] = true
|
||||
|
||||
local role = _UnitGroupRolesAssigned (name)
|
||||
if (role == "TANK") then
|
||||
tanks_members_cache [_UnitGUID ("player")] = true
|
||||
end
|
||||
else
|
||||
local name = GetUnitName ("player", true)
|
||||
|
||||
raid_members_cache [_UnitGUID ("player")] = true
|
||||
local role = _UnitGroupRolesAssigned (GetUnitName ("player", true))
|
||||
roster [name] = true
|
||||
|
||||
local role = _UnitGroupRolesAssigned (name)
|
||||
if (role == "TANK") then
|
||||
tanks_members_cache [_UnitGUID ("player")] = true
|
||||
end
|
||||
|
||||
+232
-248
@@ -1,12 +1,7 @@
|
||||
--File Revision: 1
|
||||
--Last Modification: 27/07/2013
|
||||
-- Change Log:
|
||||
-- 27/07/2013: Finished alpha version.
|
||||
--> this file controls the window position, size and others panels
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
@@ -25,7 +20,6 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
|
||||
|
||||
function _detalhes:AnimarSplit (barra, goal)
|
||||
barra.inicio = barra.split.barra:GetValue()
|
||||
barra.fim = goal
|
||||
@@ -35,16 +29,6 @@
|
||||
end
|
||||
|
||||
function _detalhes:FazerAnimacaoSplit (elapsed)
|
||||
|
||||
--[[
|
||||
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
|
||||
end
|
||||
--]]
|
||||
local velocidade = 0.8
|
||||
|
||||
if (self.fim > self.inicio) then
|
||||
@@ -137,60 +121,23 @@
|
||||
if (instance) then
|
||||
self = instance
|
||||
end
|
||||
|
||||
local mostrando = self.mostrando
|
||||
|
||||
--local baseframe_width = math.floor (self.baseframe:GetWidth())
|
||||
--local baseframe_height = math.floor (self.baseframe:GetHeight())
|
||||
--
|
||||
local baseframe_width = self.baseframe:GetWidth()
|
||||
local baseframe_height = 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()
|
||||
|
||||
--
|
||||
xOfs = xOfs*_scale - _GetScreenWidth()*_UIscale/2
|
||||
yOfs = yOfs*_scale - _GetScreenHeight()*_UIscale/2
|
||||
|
||||
@@ -217,7 +164,7 @@
|
||||
self.ponto3 = {x = _x + metade_largura, y = _y - metade_altura + statusbar_y_mod} --bottomright
|
||||
self.ponto4 = {x = _x + metade_largura, y = _y + metade_altura + (statusbar_y_mod*-1)} --topright
|
||||
|
||||
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> isso aqui não sei o que esta fazendo aqui
|
||||
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> checar isso
|
||||
|
||||
return {altura = self.baseframe:GetHeight(), largura = self.baseframe:GetWidth(), x = xOfs/_UIscale, y = yOfs/_UIscale}
|
||||
end
|
||||
@@ -243,7 +190,7 @@
|
||||
self.baseframe:SetWidth (self.posicao[self.mostrando].w) --slider frame
|
||||
self.baseframe:SetHeight (self.posicao[self.mostrando].h)
|
||||
|
||||
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> ?????
|
||||
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> checar isso
|
||||
end
|
||||
|
||||
function _detalhes:RestoreMainWindowPositionNoResize (pre_defined, x, y)
|
||||
@@ -266,7 +213,7 @@
|
||||
|
||||
self.baseframe:ClearAllPoints()
|
||||
self.baseframe:SetPoint ("CENTER", _UIParent, "CENTER", novo_x + x, novo_y + y)
|
||||
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> ?????
|
||||
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> checar isso
|
||||
end
|
||||
|
||||
function _detalhes:ResetaGump (instancia, tipo, segmento)
|
||||
@@ -338,28 +285,12 @@
|
||||
end
|
||||
end
|
||||
|
||||
--[ --disabled consolidate menu
|
||||
if (_detalhes.lower_instance == self.meu_id or self.consolidate) then
|
||||
if (not self.consolidate) then
|
||||
--if (self.baseframe:GetWidth() < 180) then
|
||||
--> consolidate menus
|
||||
--self:ConsolidateIcons() --disabled
|
||||
--end
|
||||
else
|
||||
if (self.baseframe:GetWidth() > 180 or _detalhes.lower_instance ~= self.meu_id) then
|
||||
--> un consolidade menus
|
||||
self:UnConsolidateIcons()
|
||||
end
|
||||
end
|
||||
end
|
||||
--]]
|
||||
|
||||
if (self.stretch_button_side == 2) then
|
||||
self:StretchButtonAnchor (2)
|
||||
end
|
||||
|
||||
--> reajusta o freeze
|
||||
if (self.freezed) then
|
||||
--> reajusta o freeze
|
||||
_detalhes:Freeze (self)
|
||||
end
|
||||
|
||||
@@ -369,7 +300,6 @@
|
||||
local T = self.rows_fit_in_window
|
||||
if (not T) then --> primeira vez que o gump esta sendo reajustado
|
||||
T = _math_floor (self.baseframe.BoxBarrasAltura / self.row_height)
|
||||
-- o que mais precisa por aqui?
|
||||
end
|
||||
|
||||
--> reajustar o local do relógio
|
||||
@@ -378,28 +308,26 @@
|
||||
|
||||
self.rows_fit_in_window = _math_floor ( self.baseframe.BoxBarrasAltura / self.row_height)
|
||||
|
||||
--if (not _detalhes.initializing) then
|
||||
|
||||
if (self.rows_fit_in_window > #self.barras) then--> verifica se precisa criar mais barras
|
||||
for i = #self.barras+1, self.rows_fit_in_window, 1 do
|
||||
gump:CriaNovaBarra (self, i, 30) --> cria nova barra
|
||||
end
|
||||
self.rows_created = #self.barras
|
||||
--> verifica se precisa criar mais barras
|
||||
if (self.rows_fit_in_window > #self.barras) then--> verifica se precisa criar mais barras
|
||||
for i = #self.barras+1, self.rows_fit_in_window, 1 do
|
||||
gump:CriaNovaBarra (self, i, 30) --> cria nova barra
|
||||
end
|
||||
|
||||
--> seta a largura das barras
|
||||
if (self.bar_mod and self.bar_mod ~= 0) then
|
||||
for index = 1, self.rows_fit_in_window do
|
||||
self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.bar_mod)
|
||||
end
|
||||
else
|
||||
for index = 1, self.rows_fit_in_window do
|
||||
self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.row_info.space.right)
|
||||
end
|
||||
end
|
||||
|
||||
--end
|
||||
self.rows_created = #self.barras
|
||||
end
|
||||
|
||||
--> seta a largura das barras
|
||||
if (self.bar_mod and self.bar_mod ~= 0) then
|
||||
for index = 1, self.rows_fit_in_window do
|
||||
self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.bar_mod)
|
||||
end
|
||||
else
|
||||
for index = 1, self.rows_fit_in_window do
|
||||
self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.row_info.space.right)
|
||||
end
|
||||
end
|
||||
|
||||
--> verifica se precisa esconder ou mostrar alguma barra
|
||||
local A = self.barraS[1]
|
||||
if (not A) then --> primeira vez que o resize esta sendo usado, no caso no startup do addon ou ao criar uma nova instância
|
||||
--> hida as barras não usadas
|
||||
@@ -520,8 +448,64 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> cria o frame de wait for plugin
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> panels
|
||||
|
||||
--> cooltip presets
|
||||
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)
|
||||
|
||||
elseif (preset == 2) then
|
||||
GameCooltip:SetOption ("TextFont", "Friz Quadrata TT")
|
||||
GameCooltip:SetOption ("TextColor", "orange")
|
||||
GameCooltip:SetOption ("TextSize", 12)
|
||||
GameCooltip:SetOption ("FixedWidth", 220)
|
||||
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
|
||||
|
||||
--> yes no panel
|
||||
|
||||
do
|
||||
_detalhes.yesNo = _detalhes.gump:NewPanel (UIParent, _, "DetailsYesNoWindow", _, 500, 80)
|
||||
_detalhes.yesNo:SetPoint ("center", UIParent, "center")
|
||||
_detalhes.gump:NewLabel (_detalhes.yesNo, _, "$parentAsk", "ask", "")
|
||||
_detalhes.yesNo ["ask"]:SetPoint ("center", _detalhes.yesNo, "center", 0, 25)
|
||||
_detalhes.yesNo ["ask"]:SetWidth (480)
|
||||
_detalhes.yesNo ["ask"]:SetJustifyH ("center")
|
||||
_detalhes.yesNo ["ask"]:SetHeight (22)
|
||||
_detalhes.gump:NewButton (_detalhes.yesNo, _, "$parentNo", "no", 100, 30, function() _detalhes.yesNo:Hide() end, nil, nil, nil, Loc ["STRING_NO"])
|
||||
_detalhes.gump:NewButton (_detalhes.yesNo, _, "$parentYes", "yes", 100, 30, nil, nil, nil, nil, Loc ["STRING_YES"])
|
||||
_detalhes.yesNo ["no"]:SetPoint (10, -45)
|
||||
_detalhes.yesNo ["yes"]:SetPoint (390, -45)
|
||||
_detalhes.yesNo ["no"]:InstallCustomTexture()
|
||||
_detalhes.yesNo ["yes"]:InstallCustomTexture()
|
||||
_detalhes.yesNo ["yes"]:SetHook ("OnMouseUp", function() _detalhes.yesNo:Hide() end)
|
||||
function _detalhes:Ask (msg, func, ...)
|
||||
_detalhes.yesNo ["ask"].text = msg
|
||||
local p1, p2 = ...
|
||||
_detalhes.yesNo ["yes"]:SetClickFunction (func, p1, p2)
|
||||
_detalhes.yesNo:Show()
|
||||
end
|
||||
_detalhes.yesNo:Hide()
|
||||
end
|
||||
|
||||
--> cria o frame de wait for plugin
|
||||
function _detalhes:CreateWaitForPlugin()
|
||||
|
||||
local WaitForPluginFrame = CreateFrame ("frame", "DetailsWaitForPluginFrame" .. self.meu_id, UIParent)
|
||||
@@ -673,8 +657,8 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> tutorial bubbles
|
||||
do
|
||||
|
||||
--[1] criar nova instancia
|
||||
--[2] esticar janela
|
||||
--[3] resize e trava
|
||||
@@ -781,151 +765,151 @@
|
||||
|
||||
|
||||
--> 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:TextConfig (fontsize, fontface, fontcolor)
|
||||
for i = 1, 5 do
|
||||
|
||||
local line = f.lines [i]
|
||||
|
||||
_detalhes:SetFontSize (line, fontsize or 9)
|
||||
_detalhes:SetFontFace (line, fontface or [[Fonts\FRIZQT__.TTF]])
|
||||
_detalhes:SetFontColor (line, fontcolor or {.9, .9, .9, 1})
|
||||
|
||||
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:TextConfig()
|
||||
f:SetBubbleText (nil)
|
||||
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
|
||||
do
|
||||
local f = CreateFrame ("frame", "DetailsBubble", UIParent)
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetSize (100, 100)
|
||||
f:SetFrameStrata ("TOOLTIP")
|
||||
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()
|
||||
|
||||
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}
|
||||
|
||||
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:TextConfig (fontsize, fontface, fontcolor)
|
||||
for i = 1, 5 do
|
||||
|
||||
local line = f.lines [i]
|
||||
|
||||
_detalhes:SetFontSize (line, fontsize or 9)
|
||||
_detalhes:SetFontFace (line, fontface or [[Fonts\FRIZQT__.TTF]])
|
||||
_detalhes:SetFontColor (line, fontcolor or {.9, .9, .9, 1})
|
||||
|
||||
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:TextConfig()
|
||||
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()
|
||||
end
|
||||
|
||||
f:SetBubbleText (nil)
|
||||
|
||||
f:Hide()
|
||||
end
|
||||
@@ -502,8 +502,10 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
end
|
||||
|
||||
if (button.MyObject.have_tooltip) then
|
||||
_detalhes.popup:ShowMe (false)
|
||||
if (button.MyObject.have_tooltip) then
|
||||
if (GameCooltip:GetText (1) == button.MyObject.have_tooltip) then
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
local parent = button:GetParent().MyObject
|
||||
|
||||
@@ -805,7 +805,7 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
function CoolTip:StatusBar (menuButton, StatusBar)
|
||||
|
||||
|
||||
if (StatusBar) then
|
||||
|
||||
menuButton.statusbar:SetValue (StatusBar [1])
|
||||
@@ -899,7 +899,8 @@ function DetailsCreateCoolTip()
|
||||
CoolTip.LeftIconTableSub [mainMenuIndex] and CoolTip.LeftIconTableSub [mainMenuIndex] [index],
|
||||
CoolTip.RightIconTableSub [mainMenuIndex] and CoolTip.RightIconTableSub [mainMenuIndex] [index], true)
|
||||
--> setup statusbar
|
||||
CoolTip:StatusBar (menuButton, CoolTip.StatusBarTable [mainMenuIndex] and CoolTip.StatusBarTable [mainMenuIndex] [index])
|
||||
CoolTip:StatusBar (menuButton, CoolTip.StatusBarTableSub [mainMenuIndex] and CoolTip.StatusBarTableSub [mainMenuIndex] [index])
|
||||
|
||||
|
||||
--> click
|
||||
menuButton:RegisterForClicks ("LeftButtonDown")
|
||||
@@ -1493,7 +1494,7 @@ function DetailsCreateCoolTip()
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
function CoolTip:GetText (buttonIndex)
|
||||
local button1 = frame1.Lines [buttonIndex]
|
||||
|
||||
+105
-20
@@ -875,22 +875,26 @@ function gump:ColorPick (frame, r, g, b, alpha, callback)
|
||||
end
|
||||
|
||||
------------icon pick
|
||||
function gump:IconPick (callback)
|
||||
function gump:IconPick (callback, close_when_select)
|
||||
|
||||
if (not gump.IconPickFrame) then
|
||||
|
||||
local string_lower = string.lower
|
||||
|
||||
gump.IconPickFrame = CreateFrame ("frame", "DetailsIconPickFrame", UIParent)
|
||||
tinsert (UISpecialFrames, "DetailsIconPickFrame")
|
||||
gump.IconPickFrame:SetFrameStrata ("DIALOG")
|
||||
|
||||
gump.IconPickFrame:SetPoint ("center", UIParent, "center")
|
||||
gump.IconPickFrame:SetWidth (350)
|
||||
gump.IconPickFrame:SetHeight (200)
|
||||
gump.IconPickFrame:SetHeight (227)
|
||||
gump.IconPickFrame:EnableMouse (true)
|
||||
gump.IconPickFrame:SetMovable (true)
|
||||
gump.IconPickFrame:SetBackdrop ({bgFile = "Interface\\AddOns\\Details\\images\\background", edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
|
||||
tile = true, tileSize = 32, edgeSize = 32, insets = {left = 5, right = 5, top = 5, bottom = 5}})
|
||||
|
||||
--local title = gump.IconPickFrame:CreateTitleRegion()
|
||||
|
||||
gump.IconPickFrame:SetBackdropBorderColor (170/255, 170/255, 170/255)
|
||||
gump.IconPickFrame:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
gump.IconPickFrame:SetFrameLevel (1)
|
||||
@@ -898,11 +902,29 @@ function gump:IconPick (callback)
|
||||
gump.IconPickFrame.emptyFunction = function() end
|
||||
gump.IconPickFrame.callback = gump.IconPickFrame.emptyFunction
|
||||
|
||||
gump.IconPickFrame.preview = gump:NewImage (gump.IconPickFrame, nil, 76, 76)
|
||||
|
||||
gump.IconPickFrame.searchLabel = gump:NewLabel (gump.IconPickFrame, nil, "$parentSearchBoxLabel", nil, "search:", font, size, color)
|
||||
gump.IconPickFrame.searchLabel:SetPoint ("topleft", gump.IconPickFrame, "topleft", 12, -20)
|
||||
gump.IconPickFrame.search = gump:NewTextEntry (gump.IconPickFrame, nil, "$parentSearchBox", nil, 140, 20)
|
||||
gump.IconPickFrame.search:SetPoint ("left", gump.IconPickFrame.searchLabel, "right", 2, 0)
|
||||
gump.IconPickFrame.search:SetHook ("OnTextChanged", function()
|
||||
gump.IconPickFrame.searching = gump.IconPickFrame.search:GetText()
|
||||
if (gump.IconPickFrame.searching == "") then
|
||||
gump.IconPickFrameScroll:Show()
|
||||
gump.IconPickFrame.searching = nil
|
||||
gump.IconPickFrame.updateFunc()
|
||||
else
|
||||
gump.IconPickFrameScroll:Hide()
|
||||
gump.IconPickFrame.updateFunc()
|
||||
end
|
||||
end)
|
||||
|
||||
--> close button
|
||||
local close_button = CreateFrame ("button", nil, gump.IconPickFrame, "UIPanelCloseButton")
|
||||
close_button:SetWidth (32)
|
||||
close_button:SetHeight (32)
|
||||
close_button:SetPoint ("TOPRIGHT", gump.IconPickFrame, "TOPRIGHT", -3, 20)
|
||||
close_button:SetPoint ("TOPRIGHT", gump.IconPickFrame, "TOPRIGHT", -8, -7)
|
||||
close_button:SetFrameLevel (close_button:GetFrameLevel()+2)
|
||||
|
||||
local MACRO_ICON_FILENAMES = {}
|
||||
@@ -911,7 +933,6 @@ function gump:IconPick (callback)
|
||||
MACRO_ICON_FILENAMES = {};
|
||||
MACRO_ICON_FILENAMES[1] = "INV_MISC_QUESTIONMARK";
|
||||
local index = 2;
|
||||
local numFlyouts = 0;
|
||||
|
||||
for i = 1, GetNumSpellTabs() do
|
||||
local tab, tabTex, offset, numSpells, _ = GetSpellTabInfo(i);
|
||||
@@ -957,44 +978,69 @@ function gump:IconPick (callback)
|
||||
local OnClickFunction = function (index)
|
||||
local button = gump.IconPickFrame.buttons [index]
|
||||
local texture = button:GetNormalTexture()
|
||||
gump.IconPickFrame.callback ("INTERFACE\\ICONS\\"..MACRO_ICON_FILENAMES [button.IconID])
|
||||
gump.IconPickFrame.callback (button.icon_texture)
|
||||
if (gump.IconPickFrame.click_close) then
|
||||
close_button:Click()
|
||||
end
|
||||
end
|
||||
|
||||
local onenter = function (self)
|
||||
gump.IconPickFrame.preview:SetPoint ("bottom", self, "top", 0, 2)
|
||||
gump.IconPickFrame.preview:SetTexture (self.icon_texture)
|
||||
gump.IconPickFrame.preview:SetParent (self)
|
||||
gump.IconPickFrame.preview:Show()
|
||||
end
|
||||
local onleave = function (self)
|
||||
gump.IconPickFrame.preview:Hide()
|
||||
end
|
||||
|
||||
for i = 0, 9 do
|
||||
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i+1, i+1, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..(i+1))
|
||||
newcheck:SetPoint ("topleft", gump.IconPickFrame, "topleft", 12+(i*30), -13)
|
||||
newcheck:SetPoint ("topleft", gump.IconPickFrame, "topleft", 12 + (i*30), -40)
|
||||
newcheck:SetID (i+1)
|
||||
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
|
||||
newcheck.MouseOnEnterHook = onenter
|
||||
newcheck.MouseOnLeaveHook = onleave
|
||||
end
|
||||
for i = 11, 20 do
|
||||
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
|
||||
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
|
||||
newcheck:SetID (i)
|
||||
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
|
||||
newcheck.MouseOnEnterHook = onenter
|
||||
newcheck.MouseOnLeaveHook = onleave
|
||||
end
|
||||
for i = 21, 30 do
|
||||
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
|
||||
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
|
||||
newcheck:SetID (i)
|
||||
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
|
||||
newcheck.MouseOnEnterHook = onenter
|
||||
newcheck.MouseOnLeaveHook = onleave
|
||||
end
|
||||
for i = 31, 40 do
|
||||
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
|
||||
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
|
||||
newcheck:SetID (i)
|
||||
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
|
||||
newcheck.MouseOnEnterHook = onenter
|
||||
newcheck.MouseOnLeaveHook = onleave
|
||||
end
|
||||
for i = 41, 50 do
|
||||
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
|
||||
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
|
||||
newcheck:SetID (i)
|
||||
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
|
||||
newcheck.MouseOnEnterHook = onenter
|
||||
newcheck.MouseOnLeaveHook = onleave
|
||||
end
|
||||
for i = 51, 60 do
|
||||
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
|
||||
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
|
||||
newcheck:SetID (i)
|
||||
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
|
||||
newcheck.MouseOnEnterHook = onenter
|
||||
newcheck.MouseOnLeaveHook = onleave
|
||||
end
|
||||
|
||||
local scroll = CreateFrame ("ScrollFrame", "DetailsIconPickFrameScroll", gump.IconPickFrame, "ListScrollFrameTemplate")
|
||||
@@ -1008,27 +1054,65 @@ function gump:IconPick (callback)
|
||||
|
||||
-- Icon list
|
||||
local texture;
|
||||
for i = 1, 60 do
|
||||
macroPopupIcon = _G["DetailsIconPickFrameButton"..i];
|
||||
macroPopupButton = _G["DetailsIconPickFrameButton"..i];
|
||||
index = (macroPopupOffset * 10) + i;
|
||||
texture = MACRO_ICON_FILENAMES [index]
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
macroPopupButton:ChangeIcon ("INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture)
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton:Show();
|
||||
else
|
||||
macroPopupButton:Hide();
|
||||
|
||||
local filter
|
||||
if (gump.IconPickFrame.searching) then
|
||||
filter = string_lower (gump.IconPickFrame.searching)
|
||||
end
|
||||
|
||||
if (filter and filter ~= "") then
|
||||
local i = 1
|
||||
for o = 1, numMacroIcons do
|
||||
local text = string_lower (MACRO_ICON_FILENAMES [o])
|
||||
if (text:find (filter)) then
|
||||
macroPopupIcon = _G ["DetailsIconPickFrameButton"..i]
|
||||
macroPopupButton = _G ["DetailsIconPickFrameButton"..i]
|
||||
local texture = MACRO_ICON_FILENAMES [o]
|
||||
macroPopupButton:ChangeIcon ("INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture)
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton.icon_texture = "INTERFACE\\ICONS\\"..texture
|
||||
macroPopupButton:Show();
|
||||
|
||||
i = i + 1
|
||||
if (i > 60) then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (i == 1) then --no resutls
|
||||
macroPopupButton = _G ["DetailsIconPickFrameButton"..i]
|
||||
macroPopupButton:Hide()
|
||||
end
|
||||
|
||||
for o = i+1, 60 do
|
||||
macroPopupButton = _G ["DetailsIconPickFrameButton"..o]
|
||||
macroPopupButton:Hide()
|
||||
end
|
||||
else
|
||||
for i = 1, 60 do
|
||||
macroPopupIcon = _G ["DetailsIconPickFrameButton"..i]
|
||||
macroPopupButton = _G ["DetailsIconPickFrameButton"..i]
|
||||
index = (macroPopupOffset * 10) + i;
|
||||
texture = MACRO_ICON_FILENAMES [index]
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
macroPopupButton:ChangeIcon ("INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture)
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton.icon_texture = "INTERFACE\\ICONS\\"..texture
|
||||
macroPopupButton:Show()
|
||||
else
|
||||
macroPopupButton:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- Scrollbar stuff
|
||||
FauxScrollFrame_Update (scroll, ceil (numMacroIcons / 10) , 5, 20 );
|
||||
end
|
||||
|
||||
gump.IconPickFrame.updateFunc = ChecksFrame_Update
|
||||
|
||||
|
||||
scroll:SetPoint ("topleft", gump.IconPickFrame, "topleft", -18, -10)
|
||||
scroll:SetPoint ("topleft", gump.IconPickFrame, "topleft", -18, -37)
|
||||
scroll:SetWidth (330)
|
||||
scroll:SetHeight (178)
|
||||
scroll:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (scroll, offset, 20, ChecksFrame_Update) end)
|
||||
@@ -1041,5 +1125,6 @@ function gump:IconPick (callback)
|
||||
gump.IconPickFrame:Show()
|
||||
gump.IconPickFrameScroll.update (gump.IconPickFrameScroll)
|
||||
gump.IconPickFrame.callback = callback or gump.IconPickFrame.emptyFunction
|
||||
gump.IconPickFrame.click_close = close_when_select
|
||||
|
||||
end
|
||||
|
||||
+31
-9
@@ -248,6 +248,29 @@ local TextEntryMetaFunctions = {}
|
||||
end
|
||||
end
|
||||
|
||||
function TextEntryMetaFunctions:Enable()
|
||||
if (not self.editbox:IsEnabled()) then
|
||||
self.editbox:Enable()
|
||||
self.editbox:SetBackdropBorderColor (unpack (self.enabled_border_color))
|
||||
self.editbox:SetBackdropColor (unpack (self.enabled_backdrop_color))
|
||||
self.editbox:SetTextColor (unpack (self.enabled_text_color))
|
||||
end
|
||||
end
|
||||
|
||||
function TextEntryMetaFunctions:Disable()
|
||||
if (self.editbox:IsEnabled()) then
|
||||
self.enabled_border_color = {self.editbox:GetBackdropBorderColor()}
|
||||
self.enabled_backdrop_color = {self.editbox:GetBackdropColor()}
|
||||
self.enabled_text_color = {self.editbox:GetTextColor()}
|
||||
|
||||
self.editbox:Disable()
|
||||
|
||||
self.editbox:SetBackdropBorderColor (.5, .5, .5, .5)
|
||||
self.editbox:SetBackdropColor (.5, .5, .5, .5)
|
||||
self.editbox:SetTextColor (.5, .5, .5, .5)
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> scripts
|
||||
local OnEnter = function (textentry)
|
||||
@@ -269,7 +292,7 @@ local TextEntryMetaFunctions = {}
|
||||
|
||||
if (textentry:IsEnabled()) then
|
||||
textentry.current_bordercolor = textentry.current_bordercolor or {textentry:GetBackdropBorderColor()}
|
||||
textentry:SetBackdropBorderColor (0.5, 0.5, 0.5, 1)
|
||||
textentry:SetBackdropBorderColor (1, 1, 1, 1)
|
||||
end
|
||||
|
||||
local parent = textentry:GetParent().MyObject
|
||||
@@ -527,16 +550,15 @@ function gump:NewTextEntry (parent, container, name, member, w, h, func, param1,
|
||||
TextEntryObject.editbox:SetJustifyH ("center")
|
||||
TextEntryObject.editbox:EnableMouse (true)
|
||||
TextEntryObject.editbox:SetText ("")
|
||||
|
||||
--TextEntryObject.editbox:SetBackdrop ({bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
--edgeFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
--tile = true, edgeSize = 1, tileSize = 5})
|
||||
|
||||
--TextEntryObject.editbox:SetBackdropColor (0, 0, 0, 0.5)
|
||||
--TextEntryObject.editbox:SetBackdropBorderColor (0.3, 0.3, 0.30, 0.80)
|
||||
TextEntryObject.editbox.current_bordercolor = {1, 1, 1, 1}
|
||||
|
||||
TextEntryObject.editbox:SetAutoFocus (false)
|
||||
TextEntryObject.editbox:SetFontObject ("GameFontHighlightSmall")
|
||||
|
||||
TextEntryObject.editbox.current_bordercolor = {1, 1, 1, 0.7}
|
||||
TextEntryObject.editbox:SetBackdropBorderColor (1, 1, 1, 0.7)
|
||||
TextEntryObject.enabled_border_color = {TextEntryObject.editbox:GetBackdropBorderColor()}
|
||||
TextEntryObject.enabled_backdrop_color = {TextEntryObject.editbox:GetBackdropColor()}
|
||||
TextEntryObject.enabled_text_color = {TextEntryObject.editbox:GetTextColor()}
|
||||
|
||||
TextEntryObject.func = func
|
||||
TextEntryObject.param1 = param1
|
||||
|
||||
@@ -31,6 +31,11 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the EJ boss id
|
||||
function _detalhes:GetEncounterIdFromBossIndex (mapid, index)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounter_ids and _detalhes.EncounterInformation [mapid].encounter_ids [index]
|
||||
end
|
||||
|
||||
--> return the table which contain information about the start of a encounter
|
||||
function _detalhes:GetEncounterStartInfo (mapid, encounterid)
|
||||
local bossindex = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounter_ids and _detalhes.EncounterInformation [mapid].encounter_ids [encounterid]
|
||||
@@ -83,6 +88,11 @@ do
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex]
|
||||
end
|
||||
|
||||
--> return a table with all names of boss enemies
|
||||
function _detalhes:GetEncounterActors (mapid, bossindex)
|
||||
|
||||
end
|
||||
|
||||
--> return a table with spells id of specified encounter
|
||||
function _detalhes:GetEncounterSpells (mapid, bossindex)
|
||||
local encounter = _detalhes:GetBossDetails (mapid, bossindex)
|
||||
@@ -108,6 +118,13 @@ do
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].boss_ids
|
||||
end
|
||||
|
||||
function _detalhes:InstanceIsRaid (mapid)
|
||||
return _detalhes:InstanceisRaid (mapid)
|
||||
end
|
||||
function _detalhes:InstanceisRaid (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].is_raid
|
||||
end
|
||||
|
||||
--> return a table with all encounter names present in raid instance
|
||||
function _detalhes:GetBossNames (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].boss_names
|
||||
@@ -150,6 +167,24 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return a list with names of adds and bosses
|
||||
function _detalhes:GetEncounterActorsName (EJ_EncounterID)
|
||||
--code snippet from wowpedia
|
||||
local actors = {}
|
||||
local stack, encounter, _, _, curSectionID = {}, EJ_GetEncounterInfo (EJ_EncounterID)
|
||||
repeat
|
||||
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (curSectionID)
|
||||
if (displayInfo ~= 0 and abilityIcon == "") then
|
||||
actors [title] = {model = displayInfo, info = description}
|
||||
end
|
||||
table.insert (stack, siblingID)
|
||||
table.insert (stack, nextSectionID)
|
||||
curSectionID = table.remove (stack)
|
||||
until not curSectionID
|
||||
|
||||
return actors
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
|
||||
|
||||
@@ -104,7 +104,13 @@ do
|
||||
return self.nome or actor.nome
|
||||
end
|
||||
function _detalhes:GetName (actor)
|
||||
return actor.nome or self.nome
|
||||
return self.nome or actor.nome
|
||||
end
|
||||
function _detalhes:GetDisplayName (actor)
|
||||
return self.displayName or actor.displayName
|
||||
end
|
||||
function _detalhes:Class (actor)
|
||||
return self.classe or actor.classe
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -288,6 +288,7 @@ function _detalhes:LoadConfig()
|
||||
|
||||
--> custom
|
||||
_detalhes.custom = _detalhes_global.custom
|
||||
_detalhes.refresh:r_atributo_custom()
|
||||
|
||||
--> initialize parser
|
||||
_detalhes.capture_current = {}
|
||||
|
||||
@@ -8,6 +8,7 @@ do
|
||||
local _ipairs = ipairs
|
||||
local _UnitClass = UnitClass
|
||||
local _select = select
|
||||
local _unpack = unpack
|
||||
|
||||
-- try get the class from actor name
|
||||
function _detalhes:GetClass (name)
|
||||
@@ -28,15 +29,46 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
||||
function _detalhes:GetClassIcon (class)
|
||||
|
||||
local c
|
||||
|
||||
if (self.classe) then
|
||||
c = self.classe
|
||||
elseif (type (class) == "table" and class.classe) then
|
||||
c = class.classe
|
||||
elseif (type (class) == "string") then
|
||||
c = class
|
||||
else
|
||||
c = "UNKNOW"
|
||||
end
|
||||
|
||||
if (c == "UNKNOW") then
|
||||
return [[Interface\LFGFRAME\LFGROLE_BW]], 0.25, 0.5, 0, 1
|
||||
elseif (c == "UNGROUPPLAYER") then
|
||||
return [[Interface\ICONS\Achievement_Character_Orc_Male]], 0, 1, 0, 1
|
||||
elseif (c == "PET") then
|
||||
return [[Interface\AddOns\Details\images\classes_small]], 0.25, 0.49609375, 0.75, 1
|
||||
else
|
||||
return [[Interface\AddOns\Details\images\classes_small]], _unpack (CLASS_ICON_TCOORDS [c])
|
||||
end
|
||||
end
|
||||
|
||||
local default_color = {1, 1, 1, 1}
|
||||
function _detalhes:GetClassColor (class)
|
||||
if (self.classe) then
|
||||
return _detalhes.class_colors [class.classe]
|
||||
return unpack (_detalhes.class_colors [self.classe] or default_color)
|
||||
|
||||
elseif (type (class) == "table" and class.classe) then
|
||||
return _detalhes.class_colors [class.classe]
|
||||
return unpack (_detalhes.class_colors [class.classe] or default_color)
|
||||
|
||||
elseif (type (class) == "string") then
|
||||
return unpack (_detalhes.class_colors [class] or default_color)
|
||||
|
||||
else
|
||||
unpack (default_color)
|
||||
end
|
||||
return _detalhes.class_colors [class]
|
||||
end
|
||||
|
||||
function _detalhes:GuessClass (t)
|
||||
|
||||
+3
-148
@@ -12,154 +12,9 @@ function _detalhes:SaveData()
|
||||
end
|
||||
|
||||
function _detalhes:SaveDataOnLogout()
|
||||
|
||||
if (true) then
|
||||
return
|
||||
end
|
||||
|
||||
if (_detalhes.wipe_full_config) then
|
||||
_detalhes_global = nil
|
||||
_detalhes_database = nil
|
||||
return
|
||||
end
|
||||
|
||||
--> cleanup tables
|
||||
_detalhes:PrepareTablesForSave()
|
||||
|
||||
--> get data
|
||||
|
||||
-- On Character
|
||||
|
||||
--> nicktag cache
|
||||
_detalhes_database.nick_tag_cache = _detalhes.nick_tag_cache
|
||||
_detalhes_database.only_pvp_frags = _detalhes.only_pvp_frags
|
||||
|
||||
--> minimap
|
||||
_detalhes_database.minimap = _detalhes.minimap
|
||||
|
||||
--> plugin data
|
||||
_detalhes_database.plugin_database = _detalhes.plugin_database
|
||||
|
||||
--> save instances (windows)
|
||||
_detalhes_database.tabela_instancias = _detalhes.tabela_instancias
|
||||
_detalhes_database.class_icons_small = _detalhes.class_icons_small
|
||||
_detalhes_database.class_coords = _detalhes.class_coords
|
||||
_detalhes_database.class_colors = _detalhes.class_colors
|
||||
--> character info
|
||||
_detalhes_database.character_data = _detalhes.character_data
|
||||
--> options data
|
||||
--window size
|
||||
_detalhes_database.max_window_size = _detalhes.max_window_size
|
||||
_detalhes_database.new_window_size = _detalhes.new_window_size
|
||||
_detalhes_database.window_clamp = _detalhes.window_clamp
|
||||
--> text sizes
|
||||
_detalhes_database.font_sizes = _detalhes.font_sizes
|
||||
_detalhes_database.ps_abbreviation = _detalhes.ps_abbreviation
|
||||
-- max segments
|
||||
_detalhes_database.segments_amount = _detalhes.segments_amount
|
||||
_detalhes_database.segments_amount_to_save = _detalhes.segments_amount_to_save
|
||||
_detalhes_database.instances_amount = _detalhes.instances_amount
|
||||
_detalhes_database.clear_ungrouped = _detalhes.clear_ungrouped
|
||||
_detalhes_database.clear_graphic = _detalhes.clear_graphic
|
||||
-- row animation
|
||||
_detalhes_database.use_row_animations = _detalhes.use_row_animations
|
||||
_detalhes_database.animate_scroll = _detalhes.animate_scroll
|
||||
_detalhes_database.use_scroll = _detalhes.use_scroll
|
||||
-- death log
|
||||
_detalhes_database.deadlog_limit = _detalhes.deadlog_limit
|
||||
-- report
|
||||
_detalhes_database.report_lines = _detalhes.report_lines
|
||||
_detalhes_database.report_to_who = _detalhes.report_to_who
|
||||
-- colors
|
||||
_detalhes_database.default_bg_color = _detalhes.default_bg_color
|
||||
_detalhes_database.default_bg_alpha = _detalhes.default_bg_alpha
|
||||
-- fades
|
||||
_detalhes_database.row_fade_in = _detalhes.row_fade_in
|
||||
_detalhes_database.windows_fade_in = _detalhes.windows_fade_in
|
||||
_detalhes_database.row_fade_out = _detalhes.row_fade_out
|
||||
_detalhes_database.windows_fade_out = _detalhes.windows_fade_out
|
||||
-- modes
|
||||
_detalhes_database.solo = _detalhes.solo
|
||||
_detalhes_database.tank = _detalhes.raid
|
||||
-- switch
|
||||
_detalhes_database.switch = {}
|
||||
_detalhes_database.switch.slots = _detalhes.switch.slots
|
||||
_detalhes_database.switch.table = _detalhes.switch.table
|
||||
-- capture
|
||||
_detalhes_database.capture_real = _detalhes.capture_real
|
||||
_detalhes_database.cloud_capture = _detalhes.cloud_capture
|
||||
_detalhes_database.minimum_combat_time = _detalhes.minimum_combat_time
|
||||
--> combat data
|
||||
-- segments table
|
||||
_detalhes_database.tabela_historico = _detalhes.tabela_historico
|
||||
-- combat id
|
||||
_detalhes_database.combat_id = _detalhes.combat_id
|
||||
-- modes
|
||||
_detalhes_database.SoloTables = {}
|
||||
_detalhes_database.RaidTables = {}
|
||||
--> precisa pegar o nome do plugin
|
||||
if (_detalhes.SoloTables.Mode) then
|
||||
_detalhes_database.SoloTables.Mode = _detalhes.SoloTables.Mode
|
||||
if (_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode]) then
|
||||
_detalhes_database.SoloTables.LastSelected = _detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].real_name
|
||||
end
|
||||
end
|
||||
if (_detalhes.RaidTables.Mode) then
|
||||
_detalhes_database.RaidTables.Mode = _detalhes.RaidTables.Mode
|
||||
if (_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode]) then
|
||||
_detalhes_database.RaidTables.LastSelected = _detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].real_name
|
||||
end
|
||||
end
|
||||
--> buff data
|
||||
_detalhes.Buffs:SaveBuffs()
|
||||
|
||||
--> customs
|
||||
_detalhes_database.custom = _detalhes.custom
|
||||
|
||||
--> version
|
||||
_detalhes_database.last_realversion = _detalhes.realversion --> core number
|
||||
_detalhes_database.last_version = _detalhes.userversion --> version
|
||||
|
||||
-- On Account
|
||||
|
||||
_detalhes_global = _detalhes_global or {}
|
||||
|
||||
--> profiles
|
||||
_detalhes_global.__profiiles = _detalhes.__profiiles
|
||||
|
||||
--> skins
|
||||
_detalhes_global.savedStyles = _detalhes.savedStyles
|
||||
_detalhes_global.standard_skin = _detalhes.standard_skin
|
||||
_detalhes_global.got_first_run = true
|
||||
--max segments
|
||||
_detalhes_global.segments_amount = _detalhes.segments_amount
|
||||
_detalhes_global.segments_amount_to_save = _detalhes.segments_amount_to_save
|
||||
_detalhes_global.segments_panic_mode = _detalhes.segments_panic_mode
|
||||
-- animations
|
||||
_detalhes_global.use_row_animations = _detalhes.use_row_animations
|
||||
_detalhes_global.animate_scroll = _detalhes.animate_scroll
|
||||
-- scrollbar
|
||||
_detalhes_global.use_scroll = _detalhes.use_scroll
|
||||
-- core
|
||||
_detalhes_global.clear_ungrouped = _detalhes.clear_ungrouped
|
||||
_detalhes_global.update_speed = _detalhes.update_speed
|
||||
_detalhes_global.time_type = _detalhes.time_type
|
||||
_detalhes_global.memory_threshold = _detalhes.memory_threshold
|
||||
_detalhes_global.memory_ram = _detalhes.memory_ram
|
||||
_detalhes_global.remove_realm_from_name = _detalhes.remove_realm_from_name
|
||||
_detalhes_global.trash_concatenate = _detalhes.trash_concatenate
|
||||
_detalhes_global.trash_auto_remove = _detalhes.trash_auto_remove
|
||||
|
||||
_detalhes_global.SpellOverwriteUser = _detalhes.SpellOverwriteUser
|
||||
|
||||
--tutorial
|
||||
_detalhes_global.tutorial = _detalhes.tutorial
|
||||
|
||||
--profiles
|
||||
_detalhes_global.__profiiles = _detalhes.__profiiles
|
||||
|
||||
return true
|
||||
|
||||
if (true) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local force_reset = function()
|
||||
|
||||
@@ -201,6 +201,55 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
--instance.baseframe:SetPoint ("CENTER", UIParent, "CENTER", 300, 100)
|
||||
instance.baseframe:SetPoint ("left", DetailsWelcomeWindow, "right", 10, 0)
|
||||
|
||||
elseif (msg == "model") then
|
||||
local frame = CreateFrame ("PlayerModel");
|
||||
frame:SetPoint("center",UIParent,"center");
|
||||
frame:SetHeight(600);
|
||||
frame:SetWidth(300);
|
||||
frame:SetDisplayInfo (49585);
|
||||
|
||||
elseif (msg == "ej2") then
|
||||
|
||||
--[[ get the EJ_ raid id
|
||||
local wantRaids = true -- set false to get 5-man list
|
||||
for i=1,1000 do
|
||||
instanceID,name,description,bgImage,buttonImage,loreImage, dungeonAreaMapID, link = EJ_GetInstanceByIndex(i,wantRaids)
|
||||
if not instanceID then break end
|
||||
DEFAULT_CHAT_FRAME:AddMessage( instanceID.." "..name ,1,0.7,0.5)
|
||||
end
|
||||
--]]
|
||||
|
||||
local iid=362
|
||||
|
||||
for i=1, 100 do
|
||||
local name, description, encounterID, rootSectionID, link = EJ_GetEncounterInfoByIndex (i, iid)
|
||||
|
||||
if not encounterID then break end
|
||||
local msg = encounterID .. " , " .. name .. ", ".. rootSectionID.. ", "..link
|
||||
DEFAULT_CHAT_FRAME:AddMessage(msg, 1,0.7,0.5)
|
||||
end
|
||||
|
||||
elseif (msg == "ej") then
|
||||
function PrintAllEncounterSections(encounterID, difficultyID)
|
||||
EJ_SetDifficulty(difficultyID)
|
||||
local stack, encounter, _, _, curSectionID = {}, EJ_GetEncounterInfo(encounterID)
|
||||
print(stack, encounter, _, _, curSectionID)
|
||||
repeat
|
||||
local title, desc, depth, icon, model, siblingID, nextSectionID, filteredByDifficulty, link, _, f1, f2, f3, f4 = EJ_GetSectionInfo(curSectionID)
|
||||
if not filteredByDifficulty then
|
||||
--print((" "):rep(depth) .. link .. ": " .. desc)
|
||||
--npcs nao tem icone e possuel modelo diferente de zero.
|
||||
--spells tem icone e possuel modelo = zero
|
||||
print (title, icon, model, siblingID)
|
||||
end
|
||||
table.insert(stack, siblingID)
|
||||
table.insert(stack, nextSectionID)
|
||||
curSectionID = table.remove(stack)
|
||||
until not curSectionID
|
||||
end
|
||||
|
||||
-- Print everything in 25-man Normal Madness of Deathwing:
|
||||
PrintAllEncounterSections (869, 4)
|
||||
|
||||
elseif (msg == "time") then
|
||||
print ("GetTime()", GetTime())
|
||||
|
||||
+1576
-893
File diff suppressed because it is too large
Load Diff
+139
-135
@@ -183,14 +183,18 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
local sub_atributo = _this_instance.sub_atributo
|
||||
|
||||
if (atributo == 5) then --> custom
|
||||
|
||||
local CustomObject = _detalhes.custom [sub_atributo]
|
||||
|
||||
if (CustomObject) then
|
||||
InstanceList [#InstanceList+1] = {value = index, label = _detalhes.atributos.lista [atributo] .. " - " .. CustomObject.name, onclick = onSelectInstance, icon = CustomObject.icon}
|
||||
if (not CustomObject) then
|
||||
_this_instance:ResetAttribute()
|
||||
atributo = _this_instance.atributo
|
||||
sub_atributo = _this_instance.sub_atributo
|
||||
InstanceList [#InstanceList+1] = {value = index, label = "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = _detalhes.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = _detalhes.sub_atributos [atributo].icones[sub_atributo] [2]}
|
||||
else
|
||||
InstanceList [#InstanceList+1] = {value = index, label = "unknown" .. " - " .. " invalid custom", onclick = onSelectInstance, icon = [[Interface\COMMON\VOICECHAT-MUTED]]}
|
||||
InstanceList [#InstanceList+1] = {value = index, label = "#".. index .. " " .. CustomObject.name, onclick = onSelectInstance, icon = CustomObject.icon}
|
||||
end
|
||||
|
||||
|
||||
else
|
||||
local modo = _this_instance.modo
|
||||
|
||||
@@ -1031,6 +1035,7 @@ function window:CreateFrame20()
|
||||
_detalhes.atributo_heal:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_energy:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_misc:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_custom:UpdateSelectedToKFunction()
|
||||
end
|
||||
|
||||
local icon = [[Interface\COMMON\mini-hourglass]]
|
||||
@@ -1067,6 +1072,7 @@ function window:CreateFrame20()
|
||||
_detalhes.atributo_heal:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_energy:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_misc:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_custom:UpdateSelectedToKFunction()
|
||||
end
|
||||
|
||||
local icon = [[Interface\Buttons\UI-Panel-BiggerButton-Up]]
|
||||
@@ -3010,6 +3016,7 @@ function window:CreateFrame1()
|
||||
_detalhes.atributo_heal:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_energy:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_misc:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_custom:UpdateSelectedToKFunction()
|
||||
|
||||
_detalhes:AtualizaGumpPrincipal (-1, true)
|
||||
end
|
||||
@@ -3294,10 +3301,115 @@ function window:CreateFrame2()
|
||||
--
|
||||
window:CreateLineBackground2 (frame2, "OverallNewChallengeSlider", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_CHALLENGE_DESC"])
|
||||
|
||||
--> captures
|
||||
|
||||
--> icons
|
||||
g:NewImage (frame2, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "damageCaptureImage", "$parentCaptureDamage")
|
||||
frame2.damageCaptureImage:SetTexCoord (0, 0.125, 0, 1)
|
||||
|
||||
g:NewImage (frame2, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "healCaptureImage", "$parentCaptureHeal")
|
||||
frame2.healCaptureImage:SetTexCoord (0.125, 0.25, 0, 1)
|
||||
|
||||
g:NewImage (frame2, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "energyCaptureImage", "$parentCaptureEnergy")
|
||||
frame2.energyCaptureImage:SetTexCoord (0.25, 0.375, 0, 1)
|
||||
|
||||
g:NewImage (frame2, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "miscCaptureImage", "$parentCaptureMisc")
|
||||
frame2.miscCaptureImage:SetTexCoord (0.375, 0.5, 0, 1)
|
||||
|
||||
g:NewImage (frame2, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "auraCaptureImage", "$parentCaptureAura")
|
||||
frame2.auraCaptureImage:SetTexCoord (0.5, 0.625, 0, 1)
|
||||
|
||||
--> labels
|
||||
g:NewLabel (frame2, _, "$parentCaptureDamageLabel", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE"], "GameFontHighlightLeft")
|
||||
frame2.damageCaptureLabel:SetPoint ("left", frame2.damageCaptureImage, "right", 2)
|
||||
|
||||
g:NewLabel (frame2, _, "$parentCaptureHealLabel", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL"], "GameFontHighlightLeft")
|
||||
frame2.healCaptureLabel:SetPoint ("left", frame2.healCaptureImage, "right", 2)
|
||||
|
||||
g:NewLabel (frame2, _, "$parentCaptureEnergyLabel", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY"], "GameFontHighlightLeft")
|
||||
frame2.energyCaptureLabel:SetPoint ("left", frame2.energyCaptureImage, "right", 2)
|
||||
|
||||
g:NewLabel (frame2, _, "$parentCaptureMiscLabel", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC"], "GameFontHighlightLeft")
|
||||
frame2.miscCaptureLabel:SetPoint ("left", frame2.miscCaptureImage, "right", 2)
|
||||
|
||||
g:NewLabel (frame2, _, "$parentCaptureAuraLabel", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS"], "GameFontHighlightLeft")
|
||||
frame2.auraCaptureLabel:SetPoint ("left", frame2.auraCaptureImage, "right", 2)
|
||||
|
||||
--> switches
|
||||
|
||||
local switch_icon_color = function (icon, on_off)
|
||||
icon:SetDesaturated (not on_off)
|
||||
end
|
||||
|
||||
g:NewSwitch (frame2, _, "$parentCaptureDamageSlider", "damageCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["damage"])
|
||||
frame2.damageCaptureSlider:SetPoint ("left", frame2.damageCaptureLabel, "right", 2)
|
||||
frame2.damageCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "damage", true)
|
||||
switch_icon_color (frame2.damageCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame2.damageCaptureImage, _detalhes.capture_real ["damage"])
|
||||
|
||||
window:CreateLineBackground2 (frame2, "damageCaptureSlider", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE_DESC"], frame2.damageCaptureImage)
|
||||
|
||||
g:NewSwitch (frame2, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"])
|
||||
frame2.healCaptureSlider:SetPoint ("left", frame2.healCaptureLabel, "right", 2)
|
||||
frame2.healCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "heal", true)
|
||||
switch_icon_color (frame2.healCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame2.healCaptureImage, _detalhes.capture_real ["heal"])
|
||||
|
||||
window:CreateLineBackground2 (frame2, "healCaptureSlider", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL_DESC"], frame2.healCaptureImage)
|
||||
|
||||
g:NewSwitch (frame2, _, "$parentCaptureEnergySlider", "energyCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["energy"])
|
||||
frame2.energyCaptureSlider:SetPoint ("left", frame2.energyCaptureLabel, "right", 2)
|
||||
|
||||
frame2.energyCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "energy", true)
|
||||
switch_icon_color (frame2.energyCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame2.energyCaptureImage, _detalhes.capture_real ["energy"])
|
||||
|
||||
window:CreateLineBackground2 (frame2, "energyCaptureSlider", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY_DESC"], frame2.energyCaptureImage)
|
||||
|
||||
g:NewSwitch (frame2, _, "$parentCaptureMiscSlider", "miscCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["miscdata"])
|
||||
frame2.miscCaptureSlider:SetPoint ("left", frame2.miscCaptureLabel, "right", 2)
|
||||
frame2.miscCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "miscdata", true)
|
||||
switch_icon_color (frame2.miscCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame2.miscCaptureImage, _detalhes.capture_real ["miscdata"])
|
||||
|
||||
window:CreateLineBackground2 (frame2, "miscCaptureSlider", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC_DESC"], frame2.miscCaptureImage)
|
||||
|
||||
g:NewSwitch (frame2, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"])
|
||||
frame2.auraCaptureSlider:SetPoint ("left", frame2.auraCaptureLabel, "right", 2)
|
||||
frame2.auraCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "aura", true)
|
||||
switch_icon_color (frame2.auraCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame2.auraCaptureImage, _detalhes.capture_real ["aura"])
|
||||
|
||||
window:CreateLineBackground2 (frame2, "auraCaptureSlider", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS_DESC"], frame2.auraCaptureImage)
|
||||
|
||||
--> cloud capture
|
||||
g:NewLabel (frame2, _, "$parentCloudCaptureLabel", "cloudCaptureLabel", Loc ["STRING_OPTIONS_CLOUD"], "GameFontHighlightLeft")
|
||||
|
||||
g:NewSwitch (frame2, _, "$parentCloudAuraSlider", "cloudCaptureSlider", 60, 20, _, _, _detalhes.cloud_capture)
|
||||
frame2.cloudCaptureSlider:SetPoint ("left", frame2.cloudCaptureLabel, "right", 2)
|
||||
frame2.cloudCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes.cloud_capture = value
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame2, "cloudCaptureSlider", "cloudCaptureLabel", Loc ["STRING_OPTIONS_CLOUD_DESC"] )
|
||||
|
||||
--> anchors
|
||||
|
||||
--general anchor
|
||||
g:NewLabel (frame2, _, "$parentGeneralAnchor", "GeneralAnchorLabel", Loc ["STRING_OPTIONS_GENERAL_ANCHOR"], "GameFontNormal")
|
||||
|
||||
--captures anchor
|
||||
g:NewLabel (frame2, _, "$parentDataCollectAnchor", "DataCollectAnchorLabel", Loc ["STRING_OPTIONS_DATACOLLECT_ANCHOR"], "GameFontNormal")
|
||||
|
||||
local x = window.left_start_at
|
||||
|
||||
titulo_combattweeks:SetPoint (x, -30)
|
||||
@@ -3320,6 +3432,20 @@ function window:CreateFrame2()
|
||||
|
||||
window:arrange_menu (frame2, left_side, x, window.top_start_at)
|
||||
|
||||
local x = window.right_start_at
|
||||
|
||||
local right_side = {
|
||||
{"DataCollectAnchorLabel", 1, true},
|
||||
{"damageCaptureImage", 2},
|
||||
{"healCaptureImage", 3},
|
||||
{"energyCaptureImage", 4},
|
||||
{"miscCaptureImage", 5},
|
||||
{"auraCaptureImage", 6},
|
||||
{"cloudCaptureLabel", 7, true},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame2, right_side, x, -90)
|
||||
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- General Settings - Profiles ~13
|
||||
@@ -6110,131 +6236,7 @@ function window:CreateFrame11()
|
||||
local frame10 = window.options [10][1]
|
||||
local frame11 = window.options [11][1]
|
||||
|
||||
local titulo_performance_captures = g:NewLabel (frame11, _, "$parentTituloPerformanceCaptures", "tituloPerformanceCaptures", Loc ["STRING_OPTIONS_PERFORMANCECAPTURES"], "GameFontNormal", 16)
|
||||
local titulo_performance_captures_desc = g:NewLabel (frame11, _, "$parentTituloPersonaCaptures2", "tituloPersonaCaptures2Label", Loc ["STRING_OPTIONS_PERFORMANCECAPTURES_DESC"], "GameFontNormal", 9, "white")
|
||||
titulo_performance_captures_desc.width = 320
|
||||
|
||||
--------------- Captures
|
||||
g:NewImage (frame11, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "damageCaptureImage", "$parentCaptureDamage")
|
||||
frame11.damageCaptureImage:SetTexCoord (0, 0.125, 0, 1)
|
||||
|
||||
g:NewImage (frame11, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "healCaptureImage", "$parentCaptureHeal")
|
||||
frame11.healCaptureImage:SetTexCoord (0.125, 0.25, 0, 1)
|
||||
|
||||
g:NewImage (frame11, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "energyCaptureImage", "$parentCaptureEnergy")
|
||||
frame11.energyCaptureImage:SetTexCoord (0.25, 0.375, 0, 1)
|
||||
|
||||
g:NewImage (frame11, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "miscCaptureImage", "$parentCaptureMisc")
|
||||
frame11.miscCaptureImage:SetTexCoord (0.375, 0.5, 0, 1)
|
||||
|
||||
g:NewImage (frame11, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "auraCaptureImage", "$parentCaptureAura")
|
||||
frame11.auraCaptureImage:SetTexCoord (0.5, 0.625, 0, 1)
|
||||
|
||||
g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE"], "GameFontHighlightLeft")
|
||||
frame11.damageCaptureLabel:SetPoint ("left", frame11.damageCaptureImage, "right", 2)
|
||||
|
||||
g:NewLabel (frame11, _, "$parentCaptureHealLabel", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL"], "GameFontHighlightLeft")
|
||||
frame11.healCaptureLabel:SetPoint ("left", frame11.healCaptureImage, "right", 2)
|
||||
|
||||
g:NewLabel (frame11, _, "$parentCaptureEnergyLabel", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY"], "GameFontHighlightLeft")
|
||||
frame11.energyCaptureLabel:SetPoint ("left", frame11.energyCaptureImage, "right", 2)
|
||||
|
||||
g:NewLabel (frame11, _, "$parentCaptureMiscLabel", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC"], "GameFontHighlightLeft")
|
||||
frame11.miscCaptureLabel:SetPoint ("left", frame11.miscCaptureImage, "right", 2)
|
||||
|
||||
g:NewLabel (frame11, _, "$parentCaptureAuraLabel", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS"], "GameFontHighlightLeft")
|
||||
frame11.auraCaptureLabel:SetPoint ("left", frame11.auraCaptureImage, "right", 2)
|
||||
|
||||
local switch_icon_color = function (icon, on_off)
|
||||
icon:SetDesaturated (not on_off)
|
||||
end
|
||||
|
||||
g:NewSwitch (frame11, _, "$parentCaptureDamageSlider", "damageCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["damage"])
|
||||
frame11.damageCaptureSlider:SetPoint ("left", frame11.damageCaptureLabel, "right", 2)
|
||||
frame11.damageCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "damage", true)
|
||||
switch_icon_color (frame11.damageCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame11.damageCaptureImage, _detalhes.capture_real ["damage"])
|
||||
|
||||
window:CreateLineBackground2 (frame11, "damageCaptureSlider", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE_DESC"], frame11.damageCaptureImage)
|
||||
|
||||
g:NewSwitch (frame11, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"])
|
||||
frame11.healCaptureSlider:SetPoint ("left", frame11.healCaptureLabel, "right", 2)
|
||||
frame11.healCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "heal", true)
|
||||
switch_icon_color (frame11.healCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame11.healCaptureImage, _detalhes.capture_real ["heal"])
|
||||
|
||||
window:CreateLineBackground2 (frame11, "healCaptureSlider", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL_DESC"], frame11.healCaptureImage)
|
||||
|
||||
g:NewSwitch (frame11, _, "$parentCaptureEnergySlider", "energyCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["energy"])
|
||||
frame11.energyCaptureSlider:SetPoint ("left", frame11.energyCaptureLabel, "right", 2)
|
||||
|
||||
frame11.energyCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "energy", true)
|
||||
switch_icon_color (frame11.energyCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame11.energyCaptureImage, _detalhes.capture_real ["energy"])
|
||||
|
||||
window:CreateLineBackground2 (frame11, "energyCaptureSlider", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY_DESC"], frame11.energyCaptureImage)
|
||||
|
||||
g:NewSwitch (frame11, _, "$parentCaptureMiscSlider", "miscCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["miscdata"])
|
||||
frame11.miscCaptureSlider:SetPoint ("left", frame11.miscCaptureLabel, "right", 2)
|
||||
frame11.miscCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "miscdata", true)
|
||||
switch_icon_color (frame11.miscCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame11.miscCaptureImage, _detalhes.capture_real ["miscdata"])
|
||||
|
||||
window:CreateLineBackground2 (frame11, "miscCaptureSlider", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC_DESC"], frame11.miscCaptureImage)
|
||||
|
||||
g:NewSwitch (frame11, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"])
|
||||
frame11.auraCaptureSlider:SetPoint ("left", frame11.auraCaptureLabel, "right", 2)
|
||||
frame11.auraCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "aura", true)
|
||||
switch_icon_color (frame11.auraCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (frame11.auraCaptureImage, _detalhes.capture_real ["aura"])
|
||||
|
||||
window:CreateLineBackground2 (frame11, "auraCaptureSlider", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS_DESC"], frame11.auraCaptureImage)
|
||||
|
||||
--------------- Cloud Capture
|
||||
|
||||
g:NewLabel (frame11, _, "$parentCloudCaptureLabel", "cloudCaptureLabel", Loc ["STRING_OPTIONS_CLOUD"], "GameFontHighlightLeft")
|
||||
|
||||
g:NewSwitch (frame11, _, "$parentCloudAuraSlider", "cloudCaptureSlider", 60, 20, _, _, _detalhes.cloud_capture)
|
||||
frame11.cloudCaptureSlider:SetPoint ("left", frame11.cloudCaptureLabel, "right", 2)
|
||||
frame11.cloudCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes.cloud_capture = value
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame11, "cloudCaptureSlider", "cloudCaptureLabel", Loc ["STRING_OPTIONS_CLOUD_DESC"] )
|
||||
|
||||
--> Anchors
|
||||
|
||||
--general anchor
|
||||
g:NewLabel (frame11, _, "$parentDataCollectAnchor", "DataCollectAnchorLabel", Loc ["STRING_OPTIONS_DATACOLLECT_ANCHOR"], "GameFontNormal")
|
||||
|
||||
local x = window.left_start_at
|
||||
|
||||
titulo_performance_captures:SetPoint (x, -30)
|
||||
titulo_performance_captures_desc:SetPoint (x, -50)
|
||||
|
||||
local left_side = {
|
||||
{"DataCollectAnchorLabel", 1, true},
|
||||
{"damageCaptureImage", 2},
|
||||
{"healCaptureImage", 3},
|
||||
{"energyCaptureImage", 4},
|
||||
{"miscCaptureImage", 5},
|
||||
{"auraCaptureImage", 6},
|
||||
{"cloudCaptureLabel", 7, true},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame11, left_side, x, -90)
|
||||
|
||||
-- end
|
||||
window.creating = nil
|
||||
end
|
||||
|
||||
@@ -6570,6 +6572,13 @@ function window:update_all (editing_instance)
|
||||
_G.DetailsOptionsWindow2OverallNewBossSlider.MyObject:SetValue (_detalhes.overall_clear_newboss)
|
||||
_G.DetailsOptionsWindow2OverallNewChallengeSlider.MyObject:SetValue (_detalhes.overall_clear_newchallenge)
|
||||
|
||||
_G.DetailsOptionsWindow2CaptureDamageSlider.MyObject:SetValue (_detalhes.capture_real ["damage"])
|
||||
_G.DetailsOptionsWindow2CaptureHealSlider.MyObject:SetValue (_detalhes.capture_real ["heal"])
|
||||
_G.DetailsOptionsWindow2CaptureEnergySlider.MyObject:SetValue (_detalhes.capture_real ["energy"])
|
||||
_G.DetailsOptionsWindow2CaptureMiscSlider.MyObject:SetValue (_detalhes.capture_real ["miscdata"])
|
||||
_G.DetailsOptionsWindow2CaptureAuraSlider.MyObject:SetValue (_detalhes.capture_real ["aura"])
|
||||
_G.DetailsOptionsWindow2CloudAuraSlider.MyObject:SetValue (_detalhes.cloud_capture)
|
||||
|
||||
--> window 3
|
||||
|
||||
local skin = editing_instance.skin
|
||||
@@ -6731,12 +6740,7 @@ function window:update_all (editing_instance)
|
||||
_G.DetailsOptionsWindow10SliderSegmentsSave.MyObject:SetValue (_detalhes.segments_amount_to_save)
|
||||
|
||||
--> window 11
|
||||
_G.DetailsOptionsWindow11CaptureDamageSlider.MyObject:SetValue (_detalhes.capture_real ["damage"])
|
||||
_G.DetailsOptionsWindow11CaptureHealSlider.MyObject:SetValue (_detalhes.capture_real ["heal"])
|
||||
_G.DetailsOptionsWindow11CaptureEnergySlider.MyObject:SetValue (_detalhes.capture_real ["energy"])
|
||||
_G.DetailsOptionsWindow11CaptureMiscSlider.MyObject:SetValue (_detalhes.capture_real ["miscdata"])
|
||||
_G.DetailsOptionsWindow11CaptureAuraSlider.MyObject:SetValue (_detalhes.capture_real ["aura"])
|
||||
_G.DetailsOptionsWindow11CloudAuraSlider.MyObject:SetValue (_detalhes.cloud_capture)
|
||||
|
||||
|
||||
--> window 13
|
||||
_G.DetailsOptionsWindow13SelectProfileDropdown.MyObject:Select (_detalhes:GetCurrentProfileName())
|
||||
|
||||
@@ -4425,6 +4425,7 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
_detalhes.atributo_heal:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_energy:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_misc:UpdateSelectedToKFunction()
|
||||
_detalhes.atributo_custom:UpdateSelectedToKFunction()
|
||||
|
||||
----------> call widgets handlers
|
||||
self:SetBarSettings (self.row_info.height)
|
||||
@@ -6037,11 +6038,17 @@ function gump:CriaCabecalho (baseframe, instancia)
|
||||
|
||||
local CustomObject = _detalhes.custom [sub_atributo]
|
||||
|
||||
--> as addmenu dont support textcoords we need to add in parts, first adding text and menu, after we add the icon
|
||||
--> text and menu can be added in one call if doesnt need more details like color or right text
|
||||
CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. CustomObject.name, _, true)
|
||||
CoolTip:AddIcon (CustomObject.icon, 1, 1, 20, 20, 0, 1, 0, 1)
|
||||
|
||||
if (not CustomObject) then
|
||||
_this_instance:ResetAttribute()
|
||||
atributo = _this_instance.atributo
|
||||
sub_atributo = _this_instance.sub_atributo
|
||||
CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], _, true)
|
||||
CoolTip:AddIcon (_detalhes.sub_atributos [atributo].icones[sub_atributo] [1], 1, 1, 20, 20, unpack (_detalhes.sub_atributos [atributo].icones[sub_atributo] [2]))
|
||||
else
|
||||
CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. CustomObject:GetName(), _, true)
|
||||
CoolTip:AddIcon (CustomObject.icon, 1, 1, 20, 20, 0, 1, 0, 1)
|
||||
end
|
||||
|
||||
else
|
||||
local modo = _this_instance.modo
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+35
-26
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+252
-394
@@ -1,5 +1,3 @@
|
||||
--no inicio da luta gravar tabela com os coolsdowns de cada jogador e ir anotando quando eles sao usados.
|
||||
|
||||
--File Revision: 1
|
||||
--Last Modification: 27/07/2013
|
||||
-- Change Log:
|
||||
@@ -7,51 +5,10 @@
|
||||
|
||||
function _G._detalhes:Start()
|
||||
|
||||
--teste de box
|
||||
--[[
|
||||
local f = CreateFrame ("frame", "TestBoxFrame", UIParent)
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetSize (256, 256)
|
||||
f:SetMovable (true)
|
||||
|
||||
local t = f:CreateTexture (nil, "artwork")
|
||||
t:SetSize (90, 90)
|
||||
t:SetPoint ("topleft", f, "topleft")
|
||||
t:SetTexture ("Interface\\Addons\\Details\\box")
|
||||
t:SetTexCoord (0.29296875, 0.64453125, 0.265625-0.001953125, 0.6171875+0.001953125) -- 75 68 165 158 0.001953125 //
|
||||
|
||||
local left = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
local right = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
local top = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
local bottom = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
|
||||
left:SetPoint ("right", t, "left", -20, 0)
|
||||
right:SetPoint ("left", t, "right", 20, 0)
|
||||
top:SetPoint ("bottom", t, "top", 0, 20)
|
||||
bottom:SetPoint ("top", t, "bottom", 0, -20)
|
||||
|
||||
function f:UpdateLeftRight()
|
||||
left:SetText ("left: " .. string.format ("%.3f", t:GetLeft()))
|
||||
right:SetText ("right: " .. string.format ("%.3f", t:GetRight()))
|
||||
top:SetText ("top: " .. string.format ("%.3f", t:GetTop()))
|
||||
bottom:SetText ("bottom: " .. string.format ("%.3f", t:GetBottom()))
|
||||
end
|
||||
f:UpdateLeftRight()
|
||||
|
||||
f:SetScript ("OnMouseDown", function() f:StartMoving(); f:SetScript("OnUpdate", function() f:UpdateLeftRight() end) end)
|
||||
f:SetScript ("OnMouseUp", function() f:StopMovingOrSizing(); f:SetScript("OnUpdate", nil); f:UpdateLeftRight() end)
|
||||
|
||||
function _detalhes:updatetestbox()
|
||||
f:UpdateLeftRight()
|
||||
end
|
||||
_detalhes:ScheduleTimer("updatetestbox", 5)
|
||||
|
||||
--]]
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details defaults
|
||||
|
||||
--> parse all config
|
||||
--_detalhes:CountDataOnLoad()
|
||||
|
||||
--> single click row function replace
|
||||
--damage, dps, damage taken, friendly fire
|
||||
@@ -64,7 +21,7 @@ function _G._detalhes:Start()
|
||||
self.row_singleclick_overwrite [4] = {true, true, true, true, self.atributo_misc.ReportSingleDeadLine, self.atributo_misc.ReportSingleCooldownLine, self.atributo_misc.ReportSingleBuffUptimeLine, self.atributo_misc.ReportSingleDebuffUptimeLine}
|
||||
|
||||
self.click_to_report_color = {1, 0.8, 0, 1}
|
||||
--self.click_to_report_color = {0, 1, 0, 1}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> initialize
|
||||
|
||||
@@ -74,60 +31,38 @@ function _G._detalhes:Start()
|
||||
if (self.switch.InitSwitch) then
|
||||
self.switch:InitSwitch()
|
||||
end
|
||||
|
||||
--> custom window
|
||||
self.custom = self.custom or {}
|
||||
self:InitCustom()
|
||||
--self:InitCustom()
|
||||
|
||||
--> actor info
|
||||
self.janela_info = self.gump:CriaJanelaInfo()
|
||||
self.gump:Fade (self.janela_info, 1)
|
||||
|
||||
--> copy and paste window
|
||||
self:CreateCopyPasteWindow()
|
||||
self.CreateCopyPasteWindow = nil
|
||||
--> yesno frame
|
||||
self.yesNo = self.gump:NewPanel (UIParent, _, "DetailsYesNoWindow", _, 500, 80)
|
||||
self.yesNo:SetPoint ("center", UIParent, "center")
|
||||
self.gump:NewLabel (self.yesNo, _, "$parentAsk", "ask", "")
|
||||
self.yesNo ["ask"]:SetPoint ("center", self.yesNo, "center", 0, 25)
|
||||
self.yesNo ["ask"]:SetWidth (480)
|
||||
self.yesNo ["ask"]:SetJustifyH ("center")
|
||||
self.yesNo ["ask"]:SetHeight (22)
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ("Details")
|
||||
self.gump:NewButton (self.yesNo, _, "$parentNo", "no", 100, 30, function() self.yesNo:Hide() end, nil, nil, nil, Loc ["STRING_NO"])
|
||||
self.gump:NewButton (self.yesNo, _, "$parentYes", "yes", 100, 30, nil, nil, nil, nil, Loc ["STRING_YES"])
|
||||
self.yesNo ["no"]:SetPoint (10, -45)
|
||||
self.yesNo ["yes"]:SetPoint (390, -45)
|
||||
self.yesNo ["no"]:InstallCustomTexture()
|
||||
self.yesNo ["yes"]:InstallCustomTexture()
|
||||
self.yesNo ["yes"]:SetHook ("OnMouseUp", function() self.yesNo:Hide() end)
|
||||
function _detalhes:Ask (msg, func, ...)
|
||||
self.yesNo ["ask"].text = msg
|
||||
local p1, p2 = ...
|
||||
self.yesNo ["yes"]:SetClickFunction (func, p1, p2)
|
||||
self.yesNo:Show()
|
||||
end
|
||||
self.yesNo:Hide()
|
||||
|
||||
|
||||
--> start instances
|
||||
|
||||
--_detalhes.custom = {}
|
||||
--_detalhes.tabela_instancias = {}
|
||||
|
||||
if (self:QuantasInstancias() == 0) then
|
||||
self:CriarInstancia()
|
||||
else
|
||||
--self:ReativarInstancias()
|
||||
end
|
||||
self:GetLowerInstanceNumber()
|
||||
self:CheckConsolidates()
|
||||
|
||||
--> start time machine
|
||||
|
||||
self.timeMachine:Ligar()
|
||||
|
||||
--> update abbreviation shorcut
|
||||
|
||||
self.atributo_damage:UpdateSelectedToKFunction()
|
||||
self.atributo_heal:UpdateSelectedToKFunction()
|
||||
self.atributo_energy:UpdateSelectedToKFunction()
|
||||
self.atributo_misc:UpdateSelectedToKFunction()
|
||||
self.atributo_custom:UpdateSelectedToKFunction()
|
||||
|
||||
--> start instances updater
|
||||
|
||||
@@ -187,9 +122,9 @@ function _G._detalhes:Start()
|
||||
end
|
||||
self:ScheduleTimer ("RefreshAfterStartup", 5)
|
||||
|
||||
|
||||
|
||||
--> start garbage collector
|
||||
|
||||
self.ultima_coleta = 0
|
||||
self.intervalo_coleta = 720
|
||||
--self.intervalo_coleta = 10
|
||||
@@ -204,8 +139,7 @@ function _G._detalhes:Start()
|
||||
--> load parser capture options
|
||||
self:CaptureRefresh()
|
||||
--> register parser events
|
||||
--self.listener:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
self.parser_frame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
|
||||
self.listener:RegisterEvent ("PLAYER_REGEN_DISABLED")
|
||||
self.listener:RegisterEvent ("PLAYER_REGEN_ENABLED")
|
||||
self.listener:RegisterEvent ("SPELL_SUMMON")
|
||||
@@ -224,354 +158,277 @@ function _G._detalhes:Start()
|
||||
self.listener:RegisterEvent ("ENCOUNTER_END")
|
||||
|
||||
self.listener:RegisterEvent ("START_TIMER")
|
||||
--self.listener:RegisterEvent ("ARENA_PREP_OPPONENT_SPECIALIZATIONS")
|
||||
--self.listener:RegisterEvent ("ARENA_OPPONENT_UPDATE")
|
||||
|
||||
self.listener:RegisterEvent ("UNIT_NAME_UPDATE")
|
||||
|
||||
self.listener:RegisterEvent ("PET_BATTLE_OPENING_START")
|
||||
self.listener:RegisterEvent ("PET_BATTLE_CLOSE")
|
||||
|
||||
--self.listener:RegisterAllEvents()
|
||||
|
||||
-- self.listener:RegisterEvent ("SPELL_CAST_START")
|
||||
-- self.listener:RegisterEvent ("UNIT_SPELLCAST_STOP")
|
||||
-- self.listener:RegisterEvent ("UNIT_SPELLCAST_SUCCEEDED")
|
||||
-- self.listener:RegisterEvent ("UNIT_SPELLCAST_FAILED")
|
||||
-- self.listener:RegisterEvent ("UNIT_SPELLCAST_FAILED_QUIET")
|
||||
-- self.listener:RegisterEvent ("UNIT_SPELLCAST_INTERRUPTED")
|
||||
----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
self.parser_frame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
|
||||
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)
|
||||
|
||||
elseif (preset == 2) then
|
||||
GameCooltip:SetOption ("TextFont", "Friz Quadrata TT")
|
||||
GameCooltip:SetOption ("TextColor", "orange")
|
||||
GameCooltip:SetOption ("TextSize", 12)
|
||||
GameCooltip:SetOption ("FixedWidth", 220)
|
||||
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
|
||||
|
||||
--> group
|
||||
self.details_users = {}
|
||||
self.in_group = IsInGroup() or IsInRaid()
|
||||
|
||||
self.details_users = {}
|
||||
self.in_group = IsInGroup() or IsInRaid()
|
||||
|
||||
--> done
|
||||
self.initializing = nil
|
||||
|
||||
--> scan pets
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
|
||||
--> send messages gathered on initialization
|
||||
self:ScheduleTimer ("ShowDelayMsg", 10)
|
||||
self:ScheduleTimer ("ShowDelayMsg", 10)
|
||||
|
||||
--> send instance open signal
|
||||
for index, instancia in ipairs (self.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
self:SendEvent ("DETAILS_INSTANCE_OPEN", nil, instancia)
|
||||
--instancia:SetBarGrowDirection()
|
||||
for index, instancia in ipairs (self.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
self:SendEvent ("DETAILS_INSTANCE_OPEN", nil, instancia)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> all done, send started signal and we are ready
|
||||
function self:AnnounceStartup()
|
||||
self:SendEvent ("DETAILS_STARTED", "SEND_TO_ALL")
|
||||
end
|
||||
self:ScheduleTimer ("AnnounceStartup", 5)
|
||||
|
||||
--> send details startup done signal
|
||||
function self:AnnounceStartup()
|
||||
self:SendEvent ("DETAILS_STARTED", "SEND_TO_ALL")
|
||||
end
|
||||
self:ScheduleTimer ("AnnounceStartup", 5)
|
||||
|
||||
--> announce alpha version
|
||||
function self:AnnounceVersion()
|
||||
for index, instancia in ipairs (self.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
self.gump:Fade (instancia._version, "in", 0.1)
|
||||
function self:AnnounceVersion()
|
||||
for index, instancia in ipairs (self.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
self.gump:Fade (instancia._version, "in", 0.1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> restore cooltip anchor position
|
||||
DetailsTooltipAnchor:Restore()
|
||||
|
||||
--> cooltip anchor
|
||||
DetailsTooltipAnchor:Restore()
|
||||
--> check is this is the first run
|
||||
if (self.is_first_run) then
|
||||
_detalhes:OpenWelcomeWindow()
|
||||
|
||||
if (#self.custom == 0) then
|
||||
_detalhes:AddDefaultCustomDisplays()
|
||||
end
|
||||
|
||||
_detalhes:FillUserCustomSpells()
|
||||
end
|
||||
|
||||
--> start tutorial if this is first run
|
||||
if (self.tutorial.logons < 2 and self.is_first_run) then
|
||||
self:StartTutorial()
|
||||
end
|
||||
|
||||
--> send feedback panel if the user got 100 or more logons with details
|
||||
if (self.tutorial.logons > 100) then -- and self.tutorial.logons < 104
|
||||
|
||||
--[[
|
||||
if (self.tutorial.version_announce < 4) then
|
||||
self:ScheduleTimer ("AnnounceVersion", 20)
|
||||
self.tutorial.version_announce = self.tutorial.version_announce + 1
|
||||
else
|
||||
|
||||
for index, instancia in ipairs (self.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
self.gump:Fade (instancia._version, 0)
|
||||
instancia._version:SetText ("Details! Alpha " .. _detalhes.userversion .. " (core: " .. self.realversion .. ")")
|
||||
instancia._version:SetPoint ("bottomleft", instancia.baseframe, "bottomleft", 0, 1)
|
||||
self.gump:Fade (instancia._version, "in", 10)
|
||||
if (not self.tutorial.feedback_window1) then
|
||||
self.tutorial.feedback_window1 = true
|
||||
|
||||
local feedback_frame = CreateFrame ("FRAME", "DetailsFeedbackWindow", UIParent, "ButtonFrameTemplate")
|
||||
tinsert (UISpecialFrames, "DetailsFeedbackWindow")
|
||||
feedback_frame:SetPoint ("center", UIParent, "center")
|
||||
feedback_frame:SetSize (512, 200)
|
||||
feedback_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-GNOME]])
|
||||
|
||||
feedback_frame.TitleText:SetText ("Details! Need Your Help!")
|
||||
|
||||
feedback_frame.uppertext = feedback_frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
feedback_frame.uppertext:SetText ("Tell us about your experience using Details!, what you liked most, where we could improve, what things you want to see in the future?")
|
||||
feedback_frame.uppertext:SetPoint ("topleft", feedback_frame, "topleft", 60, -32)
|
||||
local font, _, flags = feedback_frame.uppertext:GetFont()
|
||||
feedback_frame.uppertext:SetFont (font, 10, flags)
|
||||
feedback_frame.uppertext:SetTextColor (1, 1, 1, .8)
|
||||
feedback_frame.uppertext:SetWidth (440)
|
||||
|
||||
if (instancia.auto_switch_to_old) then
|
||||
instancia:SwitchBack()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--]]
|
||||
|
||||
|
||||
|
||||
if (self.is_first_run) then
|
||||
|
||||
_detalhes:OpenWelcomeWindow()
|
||||
|
||||
if (#self.custom == 0) then
|
||||
local Healthstone = {
|
||||
["attribute"] = 2,
|
||||
["spell"] = "6262",
|
||||
["name"] = "Healthstone",
|
||||
["sattribute"] = 1,
|
||||
["target"] = "",
|
||||
["source"] = "[raid]",
|
||||
["icon"] = "Interface\\Icons\\warlock_ healthstone",
|
||||
}
|
||||
self.custom [#self.custom+1] = Healthstone
|
||||
|
||||
local HealingPotion = {
|
||||
["attribute"] = 2,
|
||||
["spell"] = "105708",
|
||||
["name"] = "Healing Potion",
|
||||
["sattribute"] = 1,
|
||||
["target"] = "",
|
||||
["source"] = "[raid]",
|
||||
["icon"] = "Interface\\Icons\\trade_alchemy_potiond3",
|
||||
}
|
||||
self.custom [#self.custom+1] = HealingPotion
|
||||
end
|
||||
|
||||
_detalhes:FillUserCustomSpells()
|
||||
|
||||
end
|
||||
|
||||
-- _detalhes:OpenWelcomeWindow()
|
||||
|
||||
--desligado por precaução
|
||||
if (self.tutorial.logons < 2 and self.is_first_run) then
|
||||
self:StartTutorial()
|
||||
end
|
||||
|
||||
--> feedback trhead
|
||||
if (self.tutorial.logons > 100) then -- and self.tutorial.logons < 104
|
||||
|
||||
--desligado por preocaução
|
||||
|
||||
if (not self.tutorial.feedback_window1) then
|
||||
self.tutorial.feedback_window1 = true
|
||||
|
||||
local feedback_frame = CreateFrame ("FRAME", "DetailsFeedbackWindow", UIParent, "ButtonFrameTemplate")
|
||||
tinsert (UISpecialFrames, "DetailsFeedbackWindow")
|
||||
feedback_frame:SetPoint ("center", UIParent, "center")
|
||||
feedback_frame:SetSize (512, 200)
|
||||
feedback_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-GNOME]])
|
||||
|
||||
feedback_frame.TitleText:SetText ("Details! Need Your Help!")
|
||||
|
||||
feedback_frame.uppertext = feedback_frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
feedback_frame.uppertext:SetText ("Tell us about your experience using Details!, what you liked most, where we could improve, what things you want to see in the future?")
|
||||
feedback_frame.uppertext:SetPoint ("topleft", feedback_frame, "topleft", 60, -32)
|
||||
local font, _, flags = feedback_frame.uppertext:GetFont()
|
||||
feedback_frame.uppertext:SetFont (font, 10, flags)
|
||||
feedback_frame.uppertext:SetTextColor (1, 1, 1, .8)
|
||||
feedback_frame.uppertext:SetWidth (440)
|
||||
|
||||
|
||||
local editbox = _detalhes.gump:NewTextEntry (feedback_frame, nil, "$parentTextEntry", "text", 387, 14)
|
||||
editbox:SetPoint (20, -106)
|
||||
editbox:SetAutoFocus (false)
|
||||
editbox:SetHook ("OnEditFocusGained", function()
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
editbox:HighlightText()
|
||||
end)
|
||||
editbox:SetHook ("OnEditFocusLost", function()
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
editbox:HighlightText()
|
||||
end)
|
||||
editbox:SetHook ("OnChar", function()
|
||||
local editbox = _detalhes.gump:NewTextEntry (feedback_frame, nil, "$parentTextEntry", "text", 387, 14)
|
||||
editbox:SetPoint (20, -106)
|
||||
editbox:SetAutoFocus (false)
|
||||
editbox:SetHook ("OnEditFocusGained", function()
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
editbox:HighlightText()
|
||||
end)
|
||||
editbox:SetHook ("OnEditFocusLost", function()
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
editbox:HighlightText()
|
||||
end)
|
||||
editbox:SetHook ("OnChar", function()
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
editbox:HighlightText()
|
||||
end)
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
editbox:HighlightText()
|
||||
end)
|
||||
editbox.text = "http://www.mmo-champion.com/threads/1480721-New-damage-meter-%28Details!%29-need-help-with-tests-and-feedbacks"
|
||||
|
||||
|
||||
feedback_frame.midtext = feedback_frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
feedback_frame.midtext:SetText ("visit the link above and let's make Details! stronger!")
|
||||
feedback_frame.midtext:SetPoint ("center", editbox.widget, "center")
|
||||
feedback_frame.midtext:SetPoint ("top", editbox.widget, "bottom", 0, -2)
|
||||
feedback_frame.midtext:SetJustifyH ("center")
|
||||
local font, _, flags = feedback_frame.midtext:GetFont()
|
||||
feedback_frame.midtext:SetFont (font, 10, flags)
|
||||
--feedback_frame.midtext:SetTextColor (1, 1, 1, 1)
|
||||
feedback_frame.midtext:SetWidth (440)
|
||||
|
||||
|
||||
feedback_frame.gnoma = feedback_frame:CreateTexture (nil, "artwork")
|
||||
feedback_frame.gnoma:SetPoint ("topright", feedback_frame, "topright", -1, -59)
|
||||
feedback_frame.gnoma:SetTexture ("Interface\\AddOns\\Details\\images\\icons2")
|
||||
feedback_frame.gnoma:SetSize (105*1.05, 107*1.05)
|
||||
feedback_frame.gnoma:SetTexCoord (0.2021484375, 0, 0.7919921875, 1)
|
||||
|
||||
|
||||
feedback_frame.midtext = feedback_frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
feedback_frame.midtext:SetText ("visit the link above and let's make Details! stronger!")
|
||||
feedback_frame.midtext:SetPoint ("center", editbox.widget, "center")
|
||||
feedback_frame.midtext:SetPoint ("top", editbox.widget, "bottom", 0, -2)
|
||||
feedback_frame.midtext:SetJustifyH ("center")
|
||||
local font, _, flags = feedback_frame.midtext:GetFont()
|
||||
feedback_frame.midtext:SetFont (font, 10, flags)
|
||||
--feedback_frame.midtext:SetTextColor (1, 1, 1, 1)
|
||||
feedback_frame.midtext:SetWidth (440)
|
||||
|
||||
|
||||
feedback_frame.gnoma = feedback_frame:CreateTexture (nil, "artwork")
|
||||
feedback_frame.gnoma:SetPoint ("topright", feedback_frame, "topright", -1, -59)
|
||||
feedback_frame.gnoma:SetTexture ("Interface\\AddOns\\Details\\images\\icons2")
|
||||
feedback_frame.gnoma:SetSize (105*1.05, 107*1.05)
|
||||
feedback_frame.gnoma:SetTexCoord (0.2021484375, 0, 0.7919921875, 1)
|
||||
|
||||
feedback_frame.close = CreateFrame ("Button", "DetailsFeedbackWindowCloseButton", feedback_frame, "OptionsButtonTemplate")
|
||||
feedback_frame.close:SetPoint ("bottomleft", feedback_frame, "bottomleft", 8, 4)
|
||||
feedback_frame.close:SetText ("Close")
|
||||
feedback_frame.close:SetScript ("OnClick", function (self)
|
||||
editbox:ClearFocus()
|
||||
feedback_frame:Hide()
|
||||
end)
|
||||
feedback_frame.close = CreateFrame ("Button", "DetailsFeedbackWindowCloseButton", feedback_frame, "OptionsButtonTemplate")
|
||||
feedback_frame.close:SetPoint ("bottomleft", feedback_frame, "bottomleft", 8, 4)
|
||||
feedback_frame.close:SetText ("Close")
|
||||
feedback_frame.close:SetScript ("OnClick", function (self)
|
||||
editbox:ClearFocus()
|
||||
feedback_frame:Hide()
|
||||
end)
|
||||
|
||||
feedback_frame.postpone = CreateFrame ("Button", "DetailsFeedbackWindowPostPoneButton", feedback_frame, "OptionsButtonTemplate")
|
||||
feedback_frame.postpone:SetPoint ("bottomright", feedback_frame, "bottomright", -10, 4)
|
||||
feedback_frame.postpone:SetText ("Remind-me Later")
|
||||
feedback_frame.postpone:SetScript ("OnClick", function (self)
|
||||
editbox:ClearFocus()
|
||||
feedback_frame:Hide()
|
||||
_detalhes.tutorial.feedback_window1 = false
|
||||
end)
|
||||
feedback_frame.postpone:SetWidth (130)
|
||||
|
||||
feedback_frame:SetScript ("OnHide", function()
|
||||
editbox:ClearFocus()
|
||||
end)
|
||||
|
||||
--0.0009765625 512
|
||||
function _detalhes:FeedbackSetFocus()
|
||||
DetailsFeedbackWindow:Show()
|
||||
DetailsFeedbackWindowTextEntry.MyObject:SetFocus()
|
||||
DetailsFeedbackWindowTextEntry.MyObject:HighlightText()
|
||||
end
|
||||
_detalhes:ScheduleTimer ("FeedbackSetFocus", 5)
|
||||
|
||||
feedback_frame.postpone = CreateFrame ("Button", "DetailsFeedbackWindowPostPoneButton", feedback_frame, "OptionsButtonTemplate")
|
||||
feedback_frame.postpone:SetPoint ("bottomright", feedback_frame, "bottomright", -10, 4)
|
||||
feedback_frame.postpone:SetText ("Remind-me Later")
|
||||
feedback_frame.postpone:SetScript ("OnClick", function (self)
|
||||
editbox:ClearFocus()
|
||||
feedback_frame:Hide()
|
||||
_detalhes.tutorial.feedback_window1 = false
|
||||
end)
|
||||
feedback_frame.postpone:SetWidth (130)
|
||||
|
||||
feedback_frame:SetScript ("OnHide", function()
|
||||
editbox:ClearFocus()
|
||||
end)
|
||||
|
||||
--0.0009765625 512
|
||||
function _detalhes:FeedbackSetFocus()
|
||||
DetailsFeedbackWindow:Show()
|
||||
DetailsFeedbackWindowTextEntry.MyObject:SetFocus()
|
||||
DetailsFeedbackWindowTextEntry.MyObject:HighlightText()
|
||||
end
|
||||
_detalhes:ScheduleTimer ("FeedbackSetFocus", 5)
|
||||
|
||||
|
||||
end
|
||||
|
||||
--> check is this is the first run of this version
|
||||
if (self.is_version_first_run) then
|
||||
|
||||
end
|
||||
|
||||
if (self.is_version_first_run) then
|
||||
|
||||
local enable_reset_warning = true
|
||||
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower_instance) then
|
||||
lower_instance = _detalhes:GetInstance (lower_instance)
|
||||
local enable_reset_warning = true
|
||||
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower_instance) then
|
||||
lower_instance:InstanceAlert (Loc ["STRING_VERSION_UPDATE"], {[[Interface\GossipFrame\AvailableQuestIcon]], 16, 16, false}, 60, {_detalhes.OpenNewsWindow})
|
||||
lower_instance = _detalhes:GetInstance (lower_instance)
|
||||
if (lower_instance) then
|
||||
lower_instance:InstanceAlert (Loc ["STRING_VERSION_UPDATE"], {[[Interface\GossipFrame\AvailableQuestIcon]], 16, 16, false}, 60, {_detalhes.OpenNewsWindow})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:FillUserCustomSpells()
|
||||
|
||||
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 18 and enable_reset_warning) then
|
||||
|
||||
--print ("Last Version:", _detalhes_database.last_version, "Last Interval Version:", _detalhes_database.last_realversion)
|
||||
_detalhes:FillUserCustomSpells()
|
||||
|
||||
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 20 and enable_reset_warning) then
|
||||
table.wipe (self.custom)
|
||||
_detalhes:AddDefaultCustomDisplays()
|
||||
end
|
||||
|
||||
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 18 and enable_reset_warning) then
|
||||
|
||||
--print ("Last Version:", _detalhes_database.last_version, "Last Interval Version:", _detalhes_database.last_realversion)
|
||||
|
||||
local resetwarning_frame = CreateFrame ("FRAME", "DetailsResetConfigWarningDialog", UIParent, "ButtonFrameTemplate")
|
||||
resetwarning_frame:SetFrameStrata ("LOW")
|
||||
tinsert (UISpecialFrames, "DetailsResetConfigWarningDialog")
|
||||
resetwarning_frame:SetPoint ("center", UIParent, "center")
|
||||
resetwarning_frame:SetSize (512, 200)
|
||||
resetwarning_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-GNOME]])
|
||||
resetwarning_frame:SetScript ("OnHide", function()
|
||||
DetailsBubble:HideBubble()
|
||||
end)
|
||||
|
||||
resetwarning_frame.TitleText:SetText ("Noooooooooooo!!!")
|
||||
local resetwarning_frame = CreateFrame ("FRAME", "DetailsResetConfigWarningDialog", UIParent, "ButtonFrameTemplate")
|
||||
resetwarning_frame:SetFrameStrata ("LOW")
|
||||
tinsert (UISpecialFrames, "DetailsResetConfigWarningDialog")
|
||||
resetwarning_frame:SetPoint ("center", UIParent, "center")
|
||||
resetwarning_frame:SetSize (512, 200)
|
||||
resetwarning_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-GNOME]])
|
||||
resetwarning_frame:SetScript ("OnHide", function()
|
||||
DetailsBubble:HideBubble()
|
||||
end)
|
||||
|
||||
resetwarning_frame.TitleText:SetText ("Noooooooooooo!!!")
|
||||
|
||||
resetwarning_frame.midtext = resetwarning_frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
resetwarning_frame.midtext:SetText ("A pack of murlocs has attacked Details! tech center, our gnomes engineers are working on fixing the damage.\n\n If something is messed in your Details!, especially the close, instance and reset buttons, you can either 'Reset Skin' or access the options panel.")
|
||||
resetwarning_frame.midtext:SetPoint ("topleft", resetwarning_frame, "topleft", 10, -90)
|
||||
resetwarning_frame.midtext:SetJustifyH ("center")
|
||||
resetwarning_frame.midtext:SetWidth (370)
|
||||
resetwarning_frame.midtext = resetwarning_frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
resetwarning_frame.midtext:SetText ("A pack of murlocs has attacked Details! tech center, our gnomes engineers are working on fixing the damage.\n\n If something is messed in your Details!, especially the close, instance and reset buttons, you can either 'Reset Skin' or access the options panel.")
|
||||
resetwarning_frame.midtext:SetPoint ("topleft", resetwarning_frame, "topleft", 10, -90)
|
||||
resetwarning_frame.midtext:SetJustifyH ("center")
|
||||
resetwarning_frame.midtext:SetWidth (370)
|
||||
|
||||
resetwarning_frame.gnoma = resetwarning_frame:CreateTexture (nil, "artwork")
|
||||
resetwarning_frame.gnoma:SetPoint ("topright", resetwarning_frame, "topright", -3, -80)
|
||||
resetwarning_frame.gnoma:SetTexture ("Interface\\AddOns\\Details\\images\\icons2")
|
||||
resetwarning_frame.gnoma:SetSize (89*1.00, 97*1.00)
|
||||
--resetwarning_frame.gnoma:SetTexCoord (0.212890625, 0.494140625, 0.798828125, 0.99609375) -- 109 409 253 510
|
||||
resetwarning_frame.gnoma:SetTexCoord (0.17578125, 0.001953125, 0.59765625, 0.787109375) -- 1 306 90 403
|
||||
|
||||
resetwarning_frame.close = CreateFrame ("Button", "DetailsFeedbackWindowCloseButton", resetwarning_frame, "OptionsButtonTemplate")
|
||||
resetwarning_frame.close:SetPoint ("bottomleft", resetwarning_frame, "bottomleft", 8, 4)
|
||||
resetwarning_frame.close:SetText ("Close")
|
||||
resetwarning_frame.close:SetScript ("OnClick", function (self)
|
||||
resetwarning_frame:Hide()
|
||||
end)
|
||||
|
||||
resetwarning_frame.gnoma = resetwarning_frame:CreateTexture (nil, "artwork")
|
||||
resetwarning_frame.gnoma:SetPoint ("topright", resetwarning_frame, "topright", -3, -80)
|
||||
resetwarning_frame.gnoma:SetTexture ("Interface\\AddOns\\Details\\images\\icons2")
|
||||
resetwarning_frame.gnoma:SetSize (89*1.00, 97*1.00)
|
||||
--resetwarning_frame.gnoma:SetTexCoord (0.212890625, 0.494140625, 0.798828125, 0.99609375) -- 109 409 253 510
|
||||
resetwarning_frame.gnoma:SetTexCoord (0.17578125, 0.001953125, 0.59765625, 0.787109375) -- 1 306 90 403
|
||||
|
||||
resetwarning_frame.close = CreateFrame ("Button", "DetailsFeedbackWindowCloseButton", resetwarning_frame, "OptionsButtonTemplate")
|
||||
resetwarning_frame.close:SetPoint ("bottomleft", resetwarning_frame, "bottomleft", 8, 4)
|
||||
resetwarning_frame.close:SetText ("Close")
|
||||
resetwarning_frame.close:SetScript ("OnClick", function (self)
|
||||
resetwarning_frame:Hide()
|
||||
end)
|
||||
|
||||
resetwarning_frame.see_updates = CreateFrame ("Button", "DetailsResetWindowSeeUpdatesButton", resetwarning_frame, "OptionsButtonTemplate")
|
||||
resetwarning_frame.see_updates:SetPoint ("bottomright", resetwarning_frame, "bottomright", -10, 4)
|
||||
resetwarning_frame.see_updates:SetText ("Update Info")
|
||||
resetwarning_frame.see_updates:SetScript ("OnClick", function (self)
|
||||
_detalhes.OpenNewsWindow()
|
||||
DetailsBubble:HideBubble()
|
||||
--resetwarning_frame:Hide()
|
||||
end)
|
||||
resetwarning_frame.see_updates:SetWidth (130)
|
||||
|
||||
resetwarning_frame.reset_skin = CreateFrame ("Button", "DetailsResetWindowResetSkinButton", resetwarning_frame, "OptionsButtonTemplate")
|
||||
resetwarning_frame.reset_skin:SetPoint ("right", resetwarning_frame.see_updates, "left", -5, 0)
|
||||
resetwarning_frame.reset_skin:SetText ("Reset Skin")
|
||||
resetwarning_frame.reset_skin:SetScript ("OnClick", function (self)
|
||||
--do the reset
|
||||
for index, instance in ipairs (_detalhes.tabela_instancias) do
|
||||
if (not instance.iniciada) then
|
||||
instance:RestauraJanela()
|
||||
local skin = instance.skin
|
||||
instance:ChangeSkin ("Default Skin")
|
||||
instance:ChangeSkin ("Minimalistic")
|
||||
instance:ChangeSkin (skin)
|
||||
instance:DesativarInstancia()
|
||||
else
|
||||
local skin = instance.skin
|
||||
instance:ChangeSkin ("Default Skin")
|
||||
instance:ChangeSkin ("Minimalistic")
|
||||
instance:ChangeSkin (skin)
|
||||
resetwarning_frame.see_updates = CreateFrame ("Button", "DetailsResetWindowSeeUpdatesButton", resetwarning_frame, "OptionsButtonTemplate")
|
||||
resetwarning_frame.see_updates:SetPoint ("bottomright", resetwarning_frame, "bottomright", -10, 4)
|
||||
resetwarning_frame.see_updates:SetText ("Update Info")
|
||||
resetwarning_frame.see_updates:SetScript ("OnClick", function (self)
|
||||
_detalhes.OpenNewsWindow()
|
||||
DetailsBubble:HideBubble()
|
||||
--resetwarning_frame:Hide()
|
||||
end)
|
||||
resetwarning_frame.see_updates:SetWidth (130)
|
||||
|
||||
resetwarning_frame.reset_skin = CreateFrame ("Button", "DetailsResetWindowResetSkinButton", resetwarning_frame, "OptionsButtonTemplate")
|
||||
resetwarning_frame.reset_skin:SetPoint ("right", resetwarning_frame.see_updates, "left", -5, 0)
|
||||
resetwarning_frame.reset_skin:SetText ("Reset Skin")
|
||||
resetwarning_frame.reset_skin:SetScript ("OnClick", function (self)
|
||||
--do the reset
|
||||
for index, instance in ipairs (_detalhes.tabela_instancias) do
|
||||
if (not instance.iniciada) then
|
||||
instance:RestauraJanela()
|
||||
local skin = instance.skin
|
||||
instance:ChangeSkin ("Default Skin")
|
||||
instance:ChangeSkin ("Minimalistic")
|
||||
instance:ChangeSkin (skin)
|
||||
instance:DesativarInstancia()
|
||||
else
|
||||
local skin = instance.skin
|
||||
instance:ChangeSkin ("Default Skin")
|
||||
instance:ChangeSkin ("Minimalistic")
|
||||
instance:ChangeSkin (skin)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
resetwarning_frame.reset_skin:SetWidth (130)
|
||||
end)
|
||||
resetwarning_frame.reset_skin:SetWidth (130)
|
||||
|
||||
resetwarning_frame.open_options = CreateFrame ("Button", "DetailsResetWindowOpenOptionsButton", resetwarning_frame, "OptionsButtonTemplate")
|
||||
resetwarning_frame.open_options:SetPoint ("right", resetwarning_frame.reset_skin, "left", -5, 0)
|
||||
resetwarning_frame.open_options:SetText ("Options Panel")
|
||||
resetwarning_frame.open_options:SetScript ("OnClick", function (self)
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (not lower_instance) then
|
||||
local instance = _detalhes:GetInstance (1)
|
||||
_detalhes.CriarInstancia (_, _, 1)
|
||||
_detalhes:OpenOptionsWindow (instance)
|
||||
else
|
||||
_detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance))
|
||||
end
|
||||
end)
|
||||
resetwarning_frame.open_options:SetWidth (130)
|
||||
|
||||
resetwarning_frame.open_options = CreateFrame ("Button", "DetailsResetWindowOpenOptionsButton", resetwarning_frame, "OptionsButtonTemplate")
|
||||
resetwarning_frame.open_options:SetPoint ("right", resetwarning_frame.reset_skin, "left", -5, 0)
|
||||
resetwarning_frame.open_options:SetText ("Options Panel")
|
||||
resetwarning_frame.open_options:SetScript ("OnClick", function (self)
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (not lower_instance) then
|
||||
local instance = _detalhes:GetInstance (1)
|
||||
_detalhes.CriarInstancia (_, _, 1)
|
||||
_detalhes:OpenOptionsWindow (instance)
|
||||
else
|
||||
_detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance))
|
||||
function _detalhes:ResetWarningDialog()
|
||||
DetailsResetConfigWarningDialog:Show()
|
||||
DetailsBubble:SetOwner (resetwarning_frame.gnoma, "bottomright", "topleft", 30, -37, 1)
|
||||
DetailsBubble:FlipHorizontal()
|
||||
DetailsBubble:SetBubbleText ("", "", "WWHYYYYYYYYY!!!!", "", "")
|
||||
DetailsBubble:TextConfig (14, nil, "deeppink")
|
||||
DetailsBubble:ShowBubble()
|
||||
|
||||
|
||||
end
|
||||
end)
|
||||
resetwarning_frame.open_options:SetWidth (130)
|
||||
|
||||
function _detalhes:ResetWarningDialog()
|
||||
DetailsResetConfigWarningDialog:Show()
|
||||
DetailsBubble:SetOwner (resetwarning_frame.gnoma, "bottomright", "topleft", 30, -37, 1)
|
||||
DetailsBubble:FlipHorizontal()
|
||||
DetailsBubble:SetBubbleText ("", "", "WWHYYYYYYYYY!!!!", "", "")
|
||||
DetailsBubble:TextConfig (14, nil, "deeppink")
|
||||
DetailsBubble:ShowBubble()
|
||||
|
||||
|
||||
_detalhes:ScheduleTimer ("ResetWarningDialog", 7)
|
||||
|
||||
end
|
||||
_detalhes:ScheduleTimer ("ResetWarningDialog", 7)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--> interface menu
|
||||
local f = CreateFrame ("frame", "DetailsInterfaceOptionsPanel", UIParent)
|
||||
@@ -1053,6 +910,7 @@ function _G._detalhes:Start()
|
||||
--_detalhes:OpenWelcomeWindow() --for debug
|
||||
end
|
||||
_detalhes:ScheduleTimer ("OpenOptionsWindowAtStart", 2)
|
||||
--_detalhes:OpenCustomDisplayWindow()
|
||||
|
||||
--BNSendFriendInvite ("tercio#1488")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user