- Fixed the minimap button issue.
- Major rewrite over window properties. - Skin support has been rewrite and now is more flexive. - Added new customization options on options panel.
This commit is contained in:
+45
-116
@@ -29,126 +29,21 @@ function _G._detalhes:Start()
|
||||
self.encounter = {}
|
||||
self.in_combat = false
|
||||
self.combat_id = self.combat_id or 0
|
||||
self.instances_amount = self.instances_amount or 12
|
||||
self.segments_amount = self.segments_amount or 12
|
||||
self.segments_amount_to_save = self.segments_amount_to_save or 5
|
||||
self.memory_threshold = self.memory_threshold or 3
|
||||
self.memory_ram = self.memory_ram or 64
|
||||
self.deadlog_limit = self.deadlog_limit or 12
|
||||
self.minimum_combat_time = self.minimum_combat_time or 5
|
||||
|
||||
if (type (self.trash_concatenate) ~= "boolean") then
|
||||
self.trash_concatenate = false
|
||||
end
|
||||
if (type (self.trash_auto_remove) ~= "boolean") then
|
||||
self.trash_auto_remove = false
|
||||
end
|
||||
|
||||
if (type (self.only_pvp_frags) ~= "boolean") then
|
||||
self.only_pvp_frags = false
|
||||
end
|
||||
|
||||
if (type (self.remove_realm_from_name) ~= "boolean") then
|
||||
self.remove_realm_from_name = true
|
||||
end
|
||||
|
||||
if (type (self.cloud_capture) ~= "boolean") then
|
||||
self.cloud_capture = true
|
||||
end
|
||||
|
||||
if (type (self.segments_panic_mode) ~= "boolean") then
|
||||
self.segments_panic_mode = true
|
||||
end
|
||||
|
||||
if (type (self.clear_graphic) ~= "boolean") then
|
||||
self.clear_graphic = self.clear_graphic or true
|
||||
end
|
||||
|
||||
if (type (self.clear_ungrouped) ~= "boolean") then
|
||||
self.clear_ungrouped = self.clear_ungrouped or true
|
||||
end
|
||||
|
||||
if (type (self.use_row_animations) ~= "boolean") then
|
||||
self.use_row_animations = self.use_row_animations or false
|
||||
end
|
||||
|
||||
--> instances (windows)
|
||||
self.solo = self.solo or nil
|
||||
self.raid = self.raid or nil
|
||||
self.opened_windows = 0
|
||||
|
||||
self.update_speed = self.update_speed or 1
|
||||
self.time_type = self.time_type or 1
|
||||
|
||||
self.row_fade_in = self.row_fade_in or {"in", 0.2}
|
||||
self.row_fade_out = self.row_fade_out or {"out", 0.2}
|
||||
self.windows_fade_in = self.windows_fade_in or {"in", 0.2}
|
||||
self.windows_fade_out = self.windows_fade_out or {"out", 0.2}
|
||||
|
||||
self.default_texture = [[Interface\AddOns\Details\images\bar4]]
|
||||
self.default_texture_name = "Details D'ictum"
|
||||
|
||||
self.default_bg_color = self.default_bg_color or 0.0941
|
||||
self.default_bg_alpha = self.default_bg_alpha or 0.7
|
||||
|
||||
self.new_window_size = self.new_window_size or {width = 300, height = 95}
|
||||
self.max_window_size = self.max_window_size or {width = 480, height = 450}
|
||||
self.window_clamp = self.window_clamp or {-8, 0, 30, -14}
|
||||
|
||||
self.report_lines = self.report_lines or 5
|
||||
self.report_to_who = self.report_to_who or ""
|
||||
|
||||
self.animate_scroll = self.animate_scroll or false
|
||||
self.use_scroll = self.use_scroll or false
|
||||
|
||||
self.tooltip_max_targets = 3
|
||||
self.tooltip_max_abilities = 3
|
||||
self.tooltip_max_pets = 1
|
||||
|
||||
self.font_sizes = self.font_sizes or {
|
||||
menus = 10
|
||||
}
|
||||
|
||||
self.tutorial = self.tutorial or {}
|
||||
self.tutorial.logons = self.tutorial.logons or 0
|
||||
self.tutorial.unlock_button = self.tutorial.unlock_button or 0
|
||||
self.tutorial.version_announce = self.tutorial.version_announce or 0
|
||||
self.tutorial.main_help_button = self.tutorial.main_help_button or 0
|
||||
self.tutorial.alert_frames = self.tutorial.alert_frames or {false, false, false, false, false, false}
|
||||
self.tutorial.logons = self.tutorial.logons + 1
|
||||
|
||||
self.character_data = self.character_data or {
|
||||
logons = 0,
|
||||
}
|
||||
|
||||
self.character_data.logons = self.character_data.logons + 1
|
||||
|
||||
--> class colors and tcoords
|
||||
if (not self.class_colors) then
|
||||
self.class_colors = {}
|
||||
for classe, tabela_cor in pairs ( RAID_CLASS_COLORS ) do
|
||||
self.class_colors [classe] = {tabela_cor.r, tabela_cor.g, tabela_cor.b}
|
||||
end
|
||||
self.class_colors ["UNKNOW"] = {0.2, 0.2, 0.2}
|
||||
self.class_colors ["UNGROUPPLAYER"] = {0.4, 0.4, 0.4}
|
||||
self.class_colors ["PET"] = {0.3, 0.4, 0.5}
|
||||
end
|
||||
self.class_colors ["ENEMY"] = self.class_colors ["ENEMY"] or {0.94117, 0, 0.01960, 1}
|
||||
|
||||
self.class_coords = {}
|
||||
for class, tcoord in pairs (_G.CLASS_ICON_TCOORDS) do
|
||||
self.class_coords [class] = tcoord
|
||||
end
|
||||
|
||||
self.class_icons_small = [[Interface\AddOns\Details\images\classes_small]]
|
||||
self.class_coords ["Alliance"] = {0.49609375, 0.7421875, 0.75, 1}
|
||||
self.class_coords ["Horde"] = {0.7421875, 0.98828125, 0.75, 1}
|
||||
self.class_coords ["PET"] = {0.25, 0.49609375, 0.75, 1}
|
||||
self.class_coords ["MONSTER"] = {0, 0.25, 0.75, 1}
|
||||
self.class_coords ["ENEMY"] = {0, 0.25, 0.75, 1}
|
||||
|
||||
self.class_coords ["UNKNOW"] = {0.5, 0.75, 0.75, 1}
|
||||
self.class_coords ["UNGROUPPLAYER"] = {0.5, 0.75, 0.75, 1}
|
||||
self.class_coords_version = 1
|
||||
self.class_colors_version = 1
|
||||
|
||||
self.school_colors = {
|
||||
[1] = {1.00, 1.00, 0.00},
|
||||
@@ -160,6 +55,9 @@ function _G._detalhes:Start()
|
||||
[64] = {1.00, 0.50, 1.00},
|
||||
["unknown"] = {0.5, 0.75, 0.75, 1}
|
||||
}
|
||||
|
||||
--> parse all config
|
||||
_detalhes:ApplyConfigDataOnLoad()
|
||||
|
||||
--> single click row function replace
|
||||
--damage, dps, damage taken, friendly fire
|
||||
@@ -226,7 +124,7 @@ function _G._detalhes:Start()
|
||||
end
|
||||
self:GetLowerInstanceNumber()
|
||||
self:CheckConsolidates()
|
||||
|
||||
|
||||
--> start time machine
|
||||
self.timeMachine:Ligar()
|
||||
|
||||
@@ -243,19 +141,32 @@ function _G._detalhes:Start()
|
||||
end
|
||||
end
|
||||
|
||||
function self:AtualizaGumps()
|
||||
function self:RefreshAfterStartup()
|
||||
|
||||
self:AtualizaGumpPrincipal (-1, true)
|
||||
self.AtualizaGumps = nil
|
||||
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
|
||||
for index = 1, #self.tabela_instancias do
|
||||
local instance = self.tabela_instancias [index]
|
||||
if (instance:IsAtiva()) then
|
||||
--> refresh wallpaper
|
||||
if (instance.wallpaper.enabled) then
|
||||
instance:InstanceWallpaper (true)
|
||||
end
|
||||
|
||||
--> refresh desaturated icons if is lower instance
|
||||
if (index == lower_instance) then
|
||||
instance:DesaturateMenu()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.ToolBar:ReorganizeIcons()
|
||||
|
||||
self.RefreshAfterStartup = nil
|
||||
end
|
||||
self:ScheduleTimer ("AtualizaGumps", 4)
|
||||
self:ScheduleTimer ("RefreshAfterStartup", 4)
|
||||
|
||||
--> start garbage collector
|
||||
self.ultima_coleta = 0
|
||||
@@ -311,9 +222,10 @@ function _G._detalhes:Start()
|
||||
for index, instancia in ipairs (self.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
self:SendEvent ("DETAILS_INSTANCE_OPEN", nil, instancia)
|
||||
--instancia:SetBarGrowDirection()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--> all done, send started signal and we are ready
|
||||
function self:AnnounceStartup()
|
||||
self:SendEvent ("DETAILS_STARTED", "SEND_TO_ALL")
|
||||
@@ -336,7 +248,7 @@ function _G._detalhes:Start()
|
||||
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:SetText ("Details! Alpha " .. _detalhes.userversion .. " (core: " .. self.realversion .. ")")
|
||||
instancia._version:SetPoint ("bottomleft", instancia.baseframe, "bottomleft", 0, 1)
|
||||
self.gump:Fade (instancia._version, "in", 10)
|
||||
end
|
||||
@@ -405,7 +317,15 @@ function _G._detalhes:Start()
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Spell_ChargePositive]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125)
|
||||
|
||||
--> reopen window 64: 0.0078125
|
||||
GameCooltip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPEN"], nil, true)
|
||||
local reopen = function()
|
||||
for _, instance in ipairs (_detalhes.tabela_instancias) do
|
||||
if (not instance:IsAtiva()) then
|
||||
_detalhes:CriarInstancia (instance.meu_id)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
GameCooltip:AddMenu (1, reopen, nil, nil, nil, Loc ["STRING_MINIMAPMENU_REOPEN"], nil, true)
|
||||
GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_VoidShift]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125)
|
||||
|
||||
GameCooltip:AddMenu (1, _detalhes.ReabrirTodasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPENALL"], nil, true)
|
||||
@@ -434,7 +354,7 @@ function _G._detalhes:Start()
|
||||
})
|
||||
|
||||
if (minimapIcon and not LDBIcon:IsRegistered ("Details!")) then
|
||||
LDBIcon:Register ("Details!", minimapIcon, [[Interface\AddOns\Details\images\minimap]])
|
||||
LDBIcon:Register ("Details!", minimapIcon, self.minimap)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -471,5 +391,14 @@ function _G._detalhes:Start()
|
||||
--> MicroButtonAlertTemplate
|
||||
self.MicroButtonAlert = CreateFrame ("frame", "DetailsMicroButtonAlert", UIParent, "MicroButtonAlertTemplate")
|
||||
self.MicroButtonAlert:Hide()
|
||||
|
||||
|
||||
--[[
|
||||
print ("primeiro:")
|
||||
local instancia = _detalhes.tabela_instancias [1]
|
||||
for i = 1, instancia.barras [1]:GetNumPoints() do
|
||||
local point, relativeTo, relativePoint, xOfs, yOfs = instancia.barras [1]:GetPoint (i)
|
||||
print (point, relativeTo, relativePoint, xOfs, yOfs)
|
||||
end
|
||||
print ("---------------")
|
||||
--]]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user