From e2d29109444aaf9e3d34f2f5bacf160ca5225d1a Mon Sep 17 00:00:00 2001 From: tercio Date: Mon, 9 Jun 2014 16:42:54 -0300 Subject: [PATCH] Alpha 1.16.0 - Added option to be able to save the window's size and position within the profile. - Added performance profile options. - Added auto switch based on group roles also a switch for wipe. - Fixed a bug where sometimes all non boss segments was considered boss encounters. - Fixed the padlock image when sliders are deactivated. - NewAPI: _detalhes:CheckForPerformanceProfile() check if is necessary change the performance profile. - NewAPI: _detalhes:GetActorsOnDamageCache() return damage object from raid members inside the parser cache. - NewAPI: _detalhes:GetActorsOnHealingCache() return healing object from raid members inside the parser cache. --- boot.lua | 2 +- classes/classe_damage.lua | 4 +- classes/classe_energy.lua | 4 +- classes/classe_heal.lua | 4 +- classes/classe_instancia.lua | 114 +++++ classes/classe_instancia_include.lua | 9 + classes/classe_others.lua | 4 +- core/control.lua | 51 +- core/gears.lua | 135 +++++ core/parser.lua | 12 + framework/slider.lua | 34 +- functions/loaddata.lua | 3 + functions/profiles.lua | 15 +- functions/skins.lua | 3 + gumps/janela_options.lua | 739 ++++++++++++++++++++++++--- gumps/janela_principal.lua | 6 +- gumps/janela_welcome.lua | 10 +- images/atributos_icones.tga | Bin 26718 -> 21890 bytes locales/Details-enUS.lua | 43 +- locales/Details-ptBR.lua | 2 +- startup.lua | 5 + 21 files changed, 1073 insertions(+), 126 deletions(-) diff --git a/boot.lua b/boot.lua index 23e4d0cd..eb9dc0d5 100644 --- a/boot.lua +++ b/boot.lua @@ -8,7 +8,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners") - _detalhes.userversion = "v1.15.4" --tirar janela welcome + _detalhes.userversion = "v1.16.0" _detalhes.version = "Alpha 019" _detalhes.realversion = 19 diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 7d1be6ea..eaee8cd4 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -1299,7 +1299,7 @@ end esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra - if (instancia.use_row_animations and forcar) then + if (_detalhes.is_using_row_animations and forcar) then esta_barra.tem_animacao = 0 esta_barra:SetScript ("OnUpdate", nil) end @@ -1308,7 +1308,7 @@ end elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela então compara a porcentagem --> apenas atualizar - if (instancia.use_row_animations) then + if (_detalhes.is_using_row_animations) then local upRow = barras_container [qual_barra-1] if (upRow) then diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index 2a996117..132a6c72 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -501,7 +501,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior, esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra - if (instancia.use_row_animations and forcar) then + if (_detalhes.is_using_row_animations and forcar) then esta_barra.tem_animacao = 0 esta_barra:SetScript ("OnUpdate", nil) end @@ -510,7 +510,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior, elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela então compara a porcentagem --> apenas atualizar - if (instancia.use_row_animations) then + if (_detalhes.is_using_row_animations) then local upRow = barras_container [qual_barra-1] if (upRow) then diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 37d11efb..d604690e 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -689,7 +689,7 @@ function atributo_heal:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra - if (instancia.use_row_animations and forcar) then + if (_detalhes.is_using_row_animations and forcar) then esta_barra.tem_animacao = 0 esta_barra:SetScript ("OnUpdate", nil) end @@ -698,7 +698,7 @@ function atributo_heal:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela então compara a porcentagem --> apenas atualizar - if (instancia.use_row_animations) then + if (_detalhes.is_using_row_animations) then local upRow = barras_container [qual_barra-1] if (upRow) then diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index b06a3aba..9644af34 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -18,6 +18,7 @@ local _GetChannelName = GetChannelName --> wow api locals local _UnitExists = UnitExists --> wow api locals local _UnitName = UnitName --> wow api locals local _UnitIsPlayer = UnitIsPlayer --> wow api locals +local _UnitGroupRolesAssigned = UnitGroupRolesAssigned --> wow api locals local _detalhes = _G._detalhes local gump = _detalhes.gump @@ -1101,6 +1102,103 @@ function _detalhes:RestauraJanela (index, temp) end +function _detalhes:SwitchBack() + local prev_switch = self.auto_switch_to_old + + if (prev_switch) then + if (self.modo ~= prev_switch [1]) then + _detalhes:AlteraModo (self, prev_switch [1]) + end + + if (self.modo == _detalhes._detalhes_props["MODO_RAID"]) then + _detalhes.RaidTables:switch (nil, prev_switch [5], self) + + elseif (self.modo == _detalhes._detalhes_props["MODO_ALONE"]) then + _detalhes.SoloTables:switch (nil, prev_switch [6]) + + else + _detalhes:TrocaTabela (self, prev_switch [4], prev_switch [2], prev_switch [3]) + end + + self.auto_switch_to_old = nil + end +end + +function _detalhes:SwitchTo (switch_table, nosave) + if (not nosave) then + self.auto_switch_to_old = {self.modo, self.atributo, self.sub_atributo, self.segmento, self:GetRaidPluginName(), _detalhes.SoloTables.Mode} + end + + if (switch_table [1] == "raid") then + _detalhes.RaidTables:EnableRaidMode (self, switch_table [2]) + else + --muda para um atributo normal + if (self.modo ~= _detalhes._detalhes_props["MODO_GROUP"]) then + _detalhes:AlteraModo (self, _detalhes._detalhes_props["MODO_GROUP"]) + end + _detalhes:TrocaTabela (self, nil, switch_table [1], switch_table [2]) + end +end + +--backtable indexes: [1]: mode [2]: attribute [3]: sub attribute [4]: segment [5]: raidmode index [6]: solomode index +function _detalhes:CheckSwitchOnCombatEnd (nowipe) + + self:SwitchBack() + + local role = _UnitGroupRolesAssigned ("player") + + if (role == "DAMAGER" and self.switch_damager) then + self:SwitchTo (self.switch_damager) + + elseif (role == "HEALER" and self.switch_healer) then + self:SwitchTo (self.switch_healer) + + elseif (role == "TANK" and self.switch_tank) then + self:SwitchTo (self.switch_tank, true) + + end + + if (self.switch_all_roles_after_wipe and not nowipe) then + if (_detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.instance_type == "raid" and not _detalhes.tabela_vigente.is_boss.killed and _detalhes.tabela_vigente.is_boss.name) then + self:SwitchBack() + self:SwitchTo (self.switch_all_roles_after_wipe) + end + end + +end + +function _detalhes:CheckSwitchOnLogon() + for index, instancia in ipairs (_detalhes.tabela_instancias) do + if (instancia.ativa) then + instancia:CheckSwitchOnCombatEnd (true) + end + end +end + +function _detalhes:CheckSwitchOnCombatStart() + + self:SwitchBack() + + local all_roles = self.switch_all_roles_in_combat + + local role = _UnitGroupRolesAssigned ("player") + + if (role == "DAMAGER" and self.switch_damager_in_combat) then + self:SwitchTo (self.switch_damager_in_combat) + + elseif (role == "HEALER" and self.switch_healer_in_combat) then + self:SwitchTo (self.switch_healer_in_combat) + + elseif (role == "TANK" and self.switch_tank_in_combat) then + self:SwitchTo (self.switch_tank_in_combat) + + elseif (self.switch_all_roles_in_combat) then + self:SwitchTo (self.switch_all_roles_in_combat) + + end + +end + function _detalhes:ExportSkin() --create the table @@ -1119,6 +1217,13 @@ function _detalhes:ExportSkin() end end + --export size and positioning + if (_detalhes.profile_save_pos) then + exported.posicao = self.posicao + else + exported.posicao = nil + end + --export mini displays if (self.StatusBar and self.StatusBar.left) then exported.StatusBarSaved = { @@ -1186,6 +1291,15 @@ function _detalhes:ApplySavedSkin (style) --> apply all changed attributes self:ChangeSkin() + + --export size and positioning + if (_detalhes.profile_save_pos) then + self.posicao = style.posicao + self:RestoreMainWindowPosition() + else + self.posicao = table_deepcopy (self.posicao) + end + end ------------------------------------------------------------------------------------------------------------------------ diff --git a/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua index 04f65577..6ff319db 100644 --- a/classes/classe_instancia_include.lua +++ b/classes/classe_instancia_include.lua @@ -159,6 +159,15 @@ _detalhes.instance_defaults = { hide_in_combat_type = 1, hide_in_combat_alpha = 0, + --switches + switch_all_roles_in_combat = false, + switch_all_roles_after_wipe = false, + switch_damager = false, + switch_damager_in_combat = false, + switch_healer = false, + switch_healer_in_combat = false, + switch_tank = false, + switch_tank_in_combat = false, --strata strata = "LOW", grab_on_top = false, diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 735b27b6..298267d3 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -731,7 +731,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra - if (instancia.use_row_animations and forcar) then + if (_detalhes.is_using_row_animations and forcar) then esta_barra.tem_animacao = 0 esta_barra:SetScript ("OnUpdate", nil) end @@ -740,7 +740,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela então compara a porcentagem --> apenas atualizar - if (instancia.use_row_animations) then + if (_detalhes.is_using_row_animations) then local upRow = barras_container [qual_barra-1] if (upRow) then diff --git a/core/control.lua b/core/control.lua index c0a0e3c4..8726e351 100644 --- a/core/control.lua +++ b/core/control.lua @@ -5,12 +5,12 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") local _tempo = time() local _ + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> local pointers @@ -328,27 +328,11 @@ _detalhes:UptadeRaidMembersCache() _detalhes:HaveOneCurrentInstance() - --> hide / alpha in combat + --> hide / alpha / switch in combat for index, instancia in ipairs (_detalhes.tabela_instancias) do if (instancia.ativa) then - instancia:SetCombatAlpha (nil, nil, true) - - if (instancia.auto_switch_to) then - --salva o estado atual - instancia.auto_switch_to_old = {instancia.modo, instancia.atributo, instancia.sub_atributo, instancia.segmento, instancia:GetRaidPluginName(), _detalhes.SoloTables.Mode} - - --muda para um plugin de raid - if (instancia.auto_switch_to [1] == "raid") then - _detalhes.RaidTables:EnableRaidMode (instancia, instancia.auto_switch_to [2]) - else - --muda para um atributo normal - if (instancia.modo ~= _detalhes._detalhes_props["MODO_GROUP"]) then - _detalhes:AlteraModo (instancia, _detalhes._detalhes_props["MODO_GROUP"]) - end - _detalhes:TrocaTabela (instancia, nil, instancia.auto_switch_to [1], instancia.auto_switch_to [2]) - end - end + instancia:CheckSwitchOnCombatStart() end end @@ -583,39 +567,16 @@ instancia:SetCombatAlpha (nil, nil, true) if (instancia.auto_switch_to_old) then - instancia:SwitchBack() + instancia:CheckSwitchOnCombatEnd() end end end + _table_wipe (_detalhes.encounter_table) + _detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente) end - --backtable indexes: [1]: mode [2]: attribute [3]: sub attribute [4]: segment [5]: raidmode index [6]: solomode index - - function _detalhes:SwitchBack() - local backtable = self.auto_switch_to_old - if (not backtable) then - return - end - - if (self.modo ~= self.auto_switch_to_old [1]) then - _detalhes:AlteraModo (self, self.auto_switch_to_old [1]) - end - - if (self.modo == _detalhes._detalhes_props["MODO_RAID"]) then - _detalhes.RaidTables:switch (nil, self.auto_switch_to_old [5], self) - - elseif (self.modo == _detalhes._detalhes_props["MODO_ALONE"]) then - _detalhes.SoloTables:switch (nil, self.auto_switch_to_old [6]) - - else - _detalhes:TrocaTabela (self, self.auto_switch_to_old [4], self.auto_switch_to_old [2], self.auto_switch_to_old [3]) - end - - self.auto_switch_to_old = nil - end - function _detalhes:MakeEqualizeOnActor (player, realm, receivedActor) local combat = _detalhes:GetCombat ("current") diff --git a/core/gears.lua b/core/gears.lua index 36692872..a4afd370 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -1,4 +1,8 @@ local _detalhes = _G._detalhes +local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) + + +local GetNumGroupMembers = GetNumGroupMembers function _detalhes:UpdateGears() @@ -6,4 +10,135 @@ function _detalhes:UpdateGears() _detalhes:UpdateControl() _detalhes:UpdateCombat() +end + +function _detalhes:SetWindowUpdateSpeed (interval, nosave) + if (not interval) then + interval = _detalhes.update_speed + end + + if (not nosave) then + _detalhes.update_speed = interval + end + + _detalhes:CancelTimer (_detalhes.atualizador) + _detalhes.atualizador = _detalhes:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", interval, -1) +end + +function _detalhes:SetUseAnimations (enabled, nosave) + if (enabled == nil) then + enabled = _detalhes.use_row_animations + end + + if (not nosave) then + _detalhes.use_row_animations = enabled + end + + _detalhes.is_using_row_animations = enabled +end + +function _detalhes:HavePerformanceProfileEnabled() + return _detalhes.performance_profile_enabled +end + +_detalhes.PerformanceIcons = { + ["RaidFinder"] = {icon = [[Interface\PvPRankBadges\PvPRank15]], color = {1, 1, 1, 1}}, + ["Raid15"] = {icon = [[Interface\PvPRankBadges\PvPRank15]], color = {1, .8, 0, 1}}, + ["Raid30"] = {icon = [[Interface\PvPRankBadges\PvPRank15]], color = {1, .8, 0, 1}}, + ["Mythic"] = {icon = [[Interface\PvPRankBadges\PvPRank15]], color = {1, .4, 0, 1}}, + ["Battleground15"] = {icon = [[Interface\PvPRankBadges\PvPRank07]], color = {1, 1, 1, 1}}, + ["Battleground40"] = {icon = [[Interface\PvPRankBadges\PvPRank07]], color = {1, 1, 1, 1}}, + ["Arena"] = {icon = [[Interface\PvPRankBadges\PvPRank12]], color = {1, 1, 1, 1}}, + ["Dungeon"] = {icon = [[Interface\PvPRankBadges\PvPRank01]], color = {1, 1, 1, 1}}, +} + +function _detalhes:CheckForPerformanceProfile() + + local type = _detalhes:GetPerformanceRaidType() + + local profile = _detalhes.performance_profiles [type] + + if (profile and profile.enabled) then + _detalhes:SetWindowUpdateSpeed (profile.update_speed, true) + _detalhes:SetUseAnimations (profile.use_row_animations, true) + _detalhes:CaptureSet (profile.damage, "damage") + _detalhes:CaptureSet (profile.heal, "heal") + _detalhes:CaptureSet (profile.energy, "energy") + _detalhes:CaptureSet (profile.miscdata, "miscdata") + _detalhes:CaptureSet (profile.aura, "aura") + + if (not _detalhes.performance_profile_lastenabled or _detalhes.performance_profile_lastenabled ~= type) then + _detalhes:InstanceAlert (Loc ["STRING_OPTIONS_PERFORMANCE_PROFILE_LOAD"] .. type, {_detalhes.PerformanceIcons [type].icon, 14, 14, false, 0, 1, 0, 1, unpack (_detalhes.PerformanceIcons [type].color)} , 5, {_detalhes.empty_function}) + end + + _detalhes.performance_profile_enabled = type + _detalhes.performance_profile_lastenabled = type + else + _detalhes:SetWindowUpdateSpeed (_detalhes.update_speed) + _detalhes:SetUseAnimations (_detalhes.use_row_animations) + _detalhes:CaptureSet (_detalhes.capture_real ["damage"], "damage") + _detalhes:CaptureSet (_detalhes.capture_real ["heal"], "heal") + _detalhes:CaptureSet (_detalhes.capture_real ["energy"], "energy") + _detalhes:CaptureSet (_detalhes.capture_real ["miscdata"], "miscdata") + _detalhes:CaptureSet (_detalhes.capture_real ["aura"], "aura") + _detalhes.performance_profile_enabled = nil + end + +end + +function _detalhes:GetPerformanceRaidType() + + local name, type, difficulty, difficultyName, maxPlayers, playerDifficulty, isDynamicInstance, mapID, instanceGroupSize = GetInstanceInfo() + + if (type == "none") then + return nil + end + + if (type == "pvp") then + if (maxPlayers == 40) then + return "Battleground40" + elseif (maxPlayers == 15) then + return "Battleground15" + else + return nil + end + end + + if (type == "arena") then + return "Arena" + end + + if (type == "raid") then + --mythic + --if (difficulty == 15) then + -- return "Mythic" + --end + + --raid finder + if (difficulty == 7) then + return "RaidFinder" + end + + --flex + if (difficulty == 14) then + if (GetNumGroupMembers > 15) then + return "Raid30" + else + return "Raid15" + end + end + + --normal heroic + if (maxPlayers == 10) then + return "Raid15" + elseif (maxPlayers == 25) then + return "Raid30" + end + end + + if (type == "party") then + return "Dungeon" + end + + return nil end \ No newline at end of file diff --git a/core/parser.lua b/core/parser.lua index 28c2dcba..647f4301 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -2457,6 +2457,7 @@ end _detalhes:SchedulePetUpdate (7) + _detalhes:CheckForPerformanceProfile() end function _detalhes.parser_functions:PLAYER_ENTERING_WORLD (...) @@ -2605,6 +2606,7 @@ _detalhes:WipePets() _detalhes:SchedulePetUpdate (1) _detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true) + _detalhes:CheckSwitchOnLogon() end else _detalhes.in_group = IsInGroup() or IsInRaid() @@ -2615,6 +2617,7 @@ _detalhes:SchedulePetUpdate (1) _table_wipe (_detalhes.details_users) _detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true) + _detalhes:CheckSwitchOnLogon() else _detalhes:SchedulePetUpdate (2) _detalhes:CheckDetailsUsers() @@ -2640,6 +2643,8 @@ _detalhes.can_panic_mode = true end + _detalhes:CheckSwitchOnLogon() --eh logon mesmo + if (_detalhes.wipe_full_config) then _detalhes_global = nil _detalhes_database = nil @@ -2766,6 +2771,13 @@ print ("group damage", #_detalhes.cache_healing_group) end + function _detalhes:GetActorsOnDamageCache() + return _detalhes.cache_damage_group + end + function _detalhes:GetActorsOnHealingCache() + return _detalhes.cache_damage_group + end + function _detalhes:ClearParserCache() --> clear cache | not sure if replacing the old table is the best approach diff --git a/framework/slider.lua b/framework/slider.lua index a3cd9772..7e251bbe 100644 --- a/framework/slider.lua +++ b/framework/slider.lua @@ -281,14 +281,30 @@ local SliderMetaFunctions = {} end function SliderMetaFunctions:Enable() self.slider:Enable() - self.slider.lock:Hide() + if (not self.lock_texture) then + gump:NewImage (self, [[Interface\PetBattles\PetBattle-LockIcon]], 12, 12, "overlay", {0.0546875, 0.9453125, 0.0703125, 0.9453125}, "lock_texture", "$parentLockTexture") + self.lock_texture:SetDesaturated (true) + self.lock_texture:SetPoint ("center", self.amt, "center") + end + self.lock_texture:Hide() self.slider.amt:Show() + self:SetAlpha (1) return _rawset (self, "lockdown", false) end + function SliderMetaFunctions:Disable() + self.slider:Disable() - self.slider.lock:Show() self.slider.amt:Hide() + self:SetAlpha (.4) + + if (not self.lock_texture) then + gump:NewImage (self, [[Interface\PetBattles\PetBattle-LockIcon]], 12, 12, "overlay", {0.0546875, 0.9453125, 0.0703125, 0.9453125}, "lock_texture", "$parentLockTexture") + self.lock_texture:SetDesaturated (true) + self.lock_texture:SetPoint ("center", self.amt, "center") + end + self.lock_texture:Show() + return _rawset (self, "lockdown", true) end @@ -306,6 +322,10 @@ local SliderMetaFunctions = {} local OnEnter = function (slider) + if (_rawget (slider.MyObject, "lockdown")) then + return + end + DetailsFrameworkSliderButtons:ShowMe (slider) if (slider.MyObject.OnEnterHook) then @@ -339,6 +359,10 @@ local SliderMetaFunctions = {} local OnLeave = function (slider) + if (_rawget (slider.MyObject, "lockdown")) then + return + end + DetailsFrameworkSliderButtons:PrepareToHide() if (slider.MyObject.OnLeaveHook) then @@ -770,6 +794,12 @@ local switch_disable = function (self) _rawset (self, "lockdown", true) end local switch_enable = function (self) + if (not self.lock_texture) then + gump:NewImage (self, [[Interface\PetBattles\PetBattle-LockIcon]], 12, 12, "overlay", {0.0546875, 0.9453125, 0.0703125, 0.9453125}, "lock_texture", "$parentLockTexture") + self.lock_texture:SetDesaturated (true) + self.lock_texture:SetPoint ("center", self._thumb, "center") + end + self.lock_texture:Hide() self._text:Show() self:SetAlpha (1) diff --git a/functions/loaddata.lua b/functions/loaddata.lua index e3e58fe3..bb3827e7 100644 --- a/functions/loaddata.lua +++ b/functions/loaddata.lua @@ -294,6 +294,9 @@ function _detalhes:LoadConfig() for captureType, captureValue in pairs (_detalhes.capture_real) do _detalhes.capture_current [captureType] = captureValue end + + --> row animations + _detalhes:SetUseAnimations() --> initialize spell cache _detalhes:ClearSpellCache() diff --git a/functions/profiles.lua b/functions/profiles.lua index b18bc6be..30ac84f2 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -572,8 +572,9 @@ local default_profile = { overall_clear_newchallenge = true, --> skins - standard_skin = false, --? - skin = "Default Skin", --? + standard_skin = false, + skin = "Default Skin", + profile_save_pos = false, --> tooltip tooltip = { @@ -633,6 +634,16 @@ local default_global_data = { savedCustomSpells = {}, savedTimeCaptures = {}, tutorial = {logons = 0, unlock_button = 0, version_announce = 0, main_help_button = 0, alert_frames = {false, false, false, false, false, false}, }, + performance_profiles = { + ["RaidFinder"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true}, + ["Raid15"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true}, + ["Raid30"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true}, + ["Mythic"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true}, + ["Battleground15"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true}, + ["Battleground40"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true}, + ["Arena"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true}, + ["Dungeon"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true}, + } } _detalhes.default_global_data = default_global_data diff --git a/functions/skins.lua b/functions/skins.lua index e7548529..3b98cc40 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -437,6 +437,9 @@ local _ instance1.baseframe:SetPoint ("bottomleft", RightChatDataPanel, "topleft", 1, 1) instance2.baseframe:SetPoint ("bottomright", RightChatToggleButton, "topright", -1, 1) + instance1:SaveMainWindowPosition() + instance2:SaveMainWindowPosition() + end diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 2f0ccf14..a35b68ce 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -823,6 +823,14 @@ local menus = { --labels nos menus self.label:SetTextColor (1, .8, 0) + if (self.have_icon) then + self.have_icon:SetBlendMode ("ADD") + end + + if (self.MyObject and self.MyObject.have_icon) then + self.MyObject.have_icon:SetBlendMode ("ADD") + end + if (self.parent and self.parent.info) then _detalhes:CooltipPreset (2) GameCooltip:AddLine (self.parent.info) @@ -837,12 +845,19 @@ local menus = { --labels nos menus self = self.background_frame end + if (self.have_icon) then + self.have_icon:SetBlendMode ("BLEND") + end + if (self.MyObject and self.MyObject.have_icon) then + self.MyObject.have_icon:SetBlendMode ("BLEND") + end + GameCooltip:Hide() self.label:SetTextColor (1, 1, 1) end - function window:create_line_background2 (frameX, label, parent) + function window:create_line_background2 (frameX, label, parent, icon) local f = CreateFrame ("frame", nil, frameX) f:SetPoint ("left", label.widget or label, "left", -2, 0) f:SetSize (260, 16) @@ -854,6 +869,7 @@ local menus = { --labels nos menus f:SetBackdropColor (0, 0, 0, 0) f.parent = parent f.label = label + f.have_icon = icon if (parent.widget) then parent.widget.background_frame = f else @@ -872,12 +888,13 @@ local menus = { --labels nos menus return f end - function window:CreateLineBackground2 (frame, widget_name, label_name, desc_loc) + function window:CreateLineBackground2 (frame, widget_name, label_name, desc_loc, icon) if (type (widget_name) == "table") then widget_name.info = desc_loc widget_name.have_tooltip = desc_loc - local f = window:create_line_background2 (frame, label_name, widget_name) + widget_name.have_icon = icon + local f = window:create_line_background2 (frame, label_name, widget_name, icon) if (widget_name.SetHook) then widget_name:SetHook ("OnEnter", background_on_enter2) widget_name:SetHook ("OnLeave", background_on_leave2) @@ -890,7 +907,8 @@ local menus = { --labels nos menus frame [widget_name].info = desc_loc frame [widget_name].have_tooltip = desc_loc - local f = window:create_line_background2 (frame, frame [label_name], frame [widget_name]) + frame [widget_name].have_icon = icon + local f = window:create_line_background2 (frame, frame [label_name], frame [widget_name], icon) frame [widget_name]:SetHook ("OnEnter", background_on_enter2) frame [widget_name]:SetHook ("OnLeave", background_on_leave2) return f @@ -916,7 +934,7 @@ local menus = { --labels nos menus if (istitle and y ~= y_start) then y = y - 10 end - + if (type (widget) == "string") then widget = frame [widget] end @@ -1453,30 +1471,12 @@ function window:CreateFrame18() titulo_misc_settings_desc.width = 350 titulo_misc_settings_desc.height = 20 - --> auto switch - g:NewLabel (frame18, _, "$parentAutoSwitchLabel", "autoSwitchLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH"], "GameFontHighlightLeft") - -- - local onSelectAutoSwitch = function (_, _, switch_to) - if (switch_to == 0) then - _G.DetailsOptionsWindow.instance.auto_switch_to = nil - return - end - - local selected = window.lastSwitchList [switch_to] - _G.DetailsOptionsWindow.instance.auto_switch_to = selected - - --if (selected [1] == "raid") then - - --else - -- _G.DetailsOptionsWindow.instance.auto_switch_to = selected - --end - - end - - local buildSwitchMenu = function() + local Current_Switch_Func = function()end + + local BuildSwitchMenu = function() window.lastSwitchList = {} - local t = {{value = 0, label = "NONE", onclick = onSelectAutoSwitch, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]]}} + local t = {{value = 0, label = "NONE", onclick = Current_Switch_Func, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]]}} local attributes = _detalhes.sub_atributos local i = 1 @@ -1485,30 +1485,262 @@ function window:CreateFrame18() local icones = sub_atributo.icones for index, att_name in ipairs (sub_atributo.lista) do local texture, texcoord = unpack (icones [index]) - tinsert (t, {value = i, label = att_name, onclick = onSelectAutoSwitch, icon = texture, texcoord = texcoord}) + tinsert (t, {value = i, label = att_name, onclick = Current_Switch_Func, icon = texture, texcoord = texcoord}) window.lastSwitchList [i] = {atributo, index, i} i = i + 1 end end for index, ptable in ipairs (_detalhes.RaidTables.Menu) do - tinsert (t, {value = i, label = ptable [1], onclick = onSelectAutoSwitch, icon = ptable [2]}) + tinsert (t, {value = i, label = ptable [1], onclick = Current_Switch_Func, icon = ptable [2]}) window.lastSwitchList [i] = {"raid", ptable [4], i} i = i + 1 end return t end + + local healer_icon1 = g:NewImage (frame18, [[Interface\LFGFRAME\UI-LFG-ICON-ROLES]], 20, 20, nil, {GetTexCoordsForRole("HEALER")}, "HealerIcon1", "$parentHealerIcon1") + local healer_icon2 = g:NewImage (frame18, [[Interface\LFGFRAME\UI-LFG-ICON-ROLES]], 20, 20, nil, {GetTexCoordsForRole("HEALER")}, "HealerIcon2", "$parentHealerIcon2") + + local dps_icon1 = g:NewImage (frame18, [[Interface\LFGFRAME\UI-LFG-ICON-ROLES]], 20, 20, nil, {GetTexCoordsForRole("DAMAGER")}, "DpsIcon1", "$parentDpsIcon1") + local dps_icon2 = g:NewImage (frame18, [[Interface\LFGFRAME\UI-LFG-ICON-ROLES]], 20, 20, nil, {GetTexCoordsForRole("DAMAGER")}, "DpsIcon2", "$parentDpsIcon2") - local d = g:NewDropDown (frame18, _, "$parentAutoSwitchDropdown", "autoSwitchDropdown", 160, 20, buildSwitchMenu, 1) -- func, default - d.onenter_backdrop = dropdown_backdrop_onenter - d.onleave_backdrop = dropdown_backdrop_onleave - d:SetBackdrop (dropdown_backdrop) - d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + local tank_icon1 = g:NewImage (frame18, [[Interface\LFGFRAME\UI-LFG-ICON-ROLES]], 20, 20, nil, {GetTexCoordsForRole("TANK")}, "TankIcon1", "$parentTankIcon1") + local tank_icon2 = g:NewImage (frame18, [[Interface\LFGFRAME\UI-LFG-ICON-ROLES]], 20, 20, nil, {GetTexCoordsForRole("TANK")}, "TankIcon2", "$parentTankIcon2") + + -- auto switch all roles in combat + g:NewLabel (frame18, _, "$parentAutoSwitchLabel", "autoSwitchLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH"], "GameFontHighlightLeft") + -- + local OnSelectAutoSwitchOnCombatAllRoles = function (_, _, switch_to) + if (switch_to == 0) then + _G.DetailsOptionsWindow.instance.switch_all_roles_in_combat = false + return + end + + local selected = window.lastSwitchList [switch_to] + _G.DetailsOptionsWindow.instance.switch_all_roles_in_combat = selected + end + + local BuildThisMenu = function() + Current_Switch_Func = OnSelectAutoSwitchOnCombatAllRoles + return BuildSwitchMenu() + end + + local d = g:NewDropDown (frame18, _, "$parentAutoSwitchDropdown", "autoSwitchDropdown", 160, 20, BuildThisMenu, 1) + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + frame18.autoSwitchDropdown:SetPoint ("left", frame18.autoSwitchLabel, "right", 2, 0) + + window:CreateLineBackground2 (frame18, "autoSwitchDropdown", "autoSwitchLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"]) - frame18.autoSwitchDropdown:SetPoint ("left", frame18.autoSwitchLabel, "right", 2, 0) + -- auto switch after a wipe + g:NewLabel (frame18, _, "$parentAutoSwitchWipeLabel", "AutoSwitchWipeLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_WIPE"], "GameFontHighlightLeft") + -- + local OnSelectAutoSwitchWipe = function (_, _, switch_to) + if (switch_to == 0) then + _G.DetailsOptionsWindow.instance.switch_all_roles_after_wipe = false + return + end + + local selected = window.lastSwitchList [switch_to] + _G.DetailsOptionsWindow.instance.switch_all_roles_after_wipe = selected + end + + local BuildThisMenu = function() + Current_Switch_Func = OnSelectAutoSwitchWipe + return BuildSwitchMenu() + end + + local d = g:NewDropDown (frame18, _, "$parentAutoSwitchWipeDropdown", "autoSwitchWipeDropdown", 160, 20, BuildThisMenu, 1) -- func, default + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + frame18.autoSwitchWipeDropdown:SetPoint ("left", frame18.AutoSwitchWipeLabel, "right", 2, 0) + + window:CreateLineBackground2 (frame18, "autoSwitchWipeDropdown", "AutoSwitchWipeLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_WIPE_DESC"]) + + -- auto switch damage no in combat + g:NewLabel (frame18, _, "$parentAutoSwitchDamageNoCombatLabel", "AutoSwitchDamageNoCombatLabel", "", "GameFontHighlightLeft") + -- + local OnSelectAutoSwitchDamageNoCombat = function (_, _, switch_to) + if (switch_to == 0) then + _G.DetailsOptionsWindow.instance.switch_damager = false + return + end + + local selected = window.lastSwitchList [switch_to] + _G.DetailsOptionsWindow.instance.switch_damager = selected + end + + local BuildThisMenu = function() + Current_Switch_Func = OnSelectAutoSwitchDamageNoCombat + return BuildSwitchMenu() + end + + local d = g:NewDropDown (frame18, _, "$parentAutoSwitchDamageNoCombatDropdown", "AutoSwitchDamageNoCombatDropdown", 160, 20, BuildThisMenu, 1) -- func, default + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + frame18.AutoSwitchDamageNoCombatDropdown:SetPoint ("left", dps_icon1, "right", 2, 0) + frame18.AutoSwitchDamageNoCombatLabel:SetPoint ("left", dps_icon1, "left", 0, 0) + + window:CreateLineBackground2 (frame18, "AutoSwitchDamageNoCombatDropdown", "AutoSwitchDamageNoCombatLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_DAMAGER_DESC"], dps_icon1) + + -- auto switch damage in combat + g:NewLabel (frame18, _, "$parentAutoSwitchDamageCombatLabel", "AutoSwitchDamageCombatLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_COMBAT"], "GameFontHighlightLeft") + -- + local OnSelectAutoSwitchDamageCombat = function (_, _, switch_to) + if (switch_to == 0) then + _G.DetailsOptionsWindow.instance.switch_damager_in_combat = false + return + end + + local selected = window.lastSwitchList [switch_to] + _G.DetailsOptionsWindow.instance.switch_damager_in_combat = selected + end + + local BuildThisMenu = function() + Current_Switch_Func = OnSelectAutoSwitchDamageCombat + return BuildSwitchMenu() + end + + local d = g:NewDropDown (frame18, _, "$parentAutoSwitchDamageCombatDropdown", "AutoSwitchDamageCombatDropdown", 160, 20, BuildThisMenu, 1) -- func, default + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + frame18.AutoSwitchDamageCombatDropdown:SetPoint ("left", frame18.AutoSwitchDamageCombatLabel, "right", 2, -1) + frame18.AutoSwitchDamageCombatLabel:SetPoint ("left", dps_icon2, "right", 2, 1) + + window:CreateLineBackground2 (frame18, "AutoSwitchDamageCombatDropdown", "AutoSwitchDamageCombatLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_DAMAGER_DESC"], dps_icon2) + + -- auto switch heal in no combat + g:NewLabel (frame18, _, "$parentAutoSwitchHealNoCombatLabel", "AutoSwitchHealNoCombatLabel", "", "GameFontHighlightLeft") + -- + local OnSelectAutoSwitchHealNoCombat = function (_, _, switch_to) + if (switch_to == 0) then + _G.DetailsOptionsWindow.instance.switch_healer = false + return + end + + local selected = window.lastSwitchList [switch_to] + _G.DetailsOptionsWindow.instance.switch_healer = selected + end + + local BuildThisMenu = function() + Current_Switch_Func = OnSelectAutoSwitchHealNoCombat + return BuildSwitchMenu() + end + + local d = g:NewDropDown (frame18, _, "$parentAutoSwitchHealNoCombatDropdown", "AutoSwitchHealNoCombatDropdown", 160, 20, BuildThisMenu, 1) -- func, default + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + --frame18.AutoSwitchHealNoCombatDropdown:SetPoint ("left", frame18.AutoSwitchHealNoCombatLabel, "right", 2, 0) + frame18.AutoSwitchHealNoCombatDropdown:SetPoint ("left", healer_icon1, "right", 2, 0) + frame18.AutoSwitchHealNoCombatLabel:SetPoint ("left", healer_icon1, "left", 0, 0) + + window:CreateLineBackground2 (frame18, "AutoSwitchHealNoCombatDropdown", "AutoSwitchHealNoCombatLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_HEALER_DESC"], healer_icon1) + + -- auto switch heal in combat + g:NewLabel (frame18, _, "$parentAutoSwitchHealCombatLabel", "AutoSwitchHealCombatLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_COMBAT"], "GameFontHighlightLeft") + -- + local OnSelectAutoSwitchHealCombat = function (_, _, switch_to) + if (switch_to == 0) then + _G.DetailsOptionsWindow.instance.switch_healer_in_combat = false + return + end + + local selected = window.lastSwitchList [switch_to] + _G.DetailsOptionsWindow.instance.switch_healer_in_combat = selected + end + + local BuildThisMenu = function() + Current_Switch_Func = OnSelectAutoSwitchHealCombat + return BuildSwitchMenu() + end + + local d = g:NewDropDown (frame18, _, "$parentAutoSwitchHealCombatDropdown", "AutoSwitchHealCombatDropdown", 160, 20, BuildThisMenu, 1) -- func, default + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + --frame18.AutoSwitchHealCombatDropdown:SetPoint ("left", frame18.AutoSwitchHealCombatLabel, "right", 2, 0) + frame18.AutoSwitchHealCombatDropdown:SetPoint ("left", frame18.AutoSwitchHealCombatLabel, "right", 2, -1) + frame18.AutoSwitchHealCombatLabel:SetPoint ("left", healer_icon2, "right", 2, 1) + + window:CreateLineBackground2 (frame18, "AutoSwitchHealCombatDropdown", "AutoSwitchHealCombatLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_HEALER_DESC"], healer_icon2) + + -- auto switch tank in no combat + g:NewLabel (frame18, _, "$parentAutoSwitchTankNoCombatLabel", "AutoSwitchTankNoCombatLabel", "", "GameFontHighlightLeft") + -- + local OnSelectAutoSwitchTankNoCombat = function (_, _, switch_to) + if (switch_to == 0) then + _G.DetailsOptionsWindow.instance.switch_tank = false + return + end + + local selected = window.lastSwitchList [switch_to] + _G.DetailsOptionsWindow.instance.switch_tank = selected + end + + local BuildThisMenu = function() + Current_Switch_Func = OnSelectAutoSwitchTankNoCombat + return BuildSwitchMenu() + end + + local d = g:NewDropDown (frame18, _, "$parentAutoSwitchTankNoCombatDropdown", "AutoSwitchTankNoCombatDropdown", 160, 20, BuildThisMenu, 1) -- func, default + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + frame18.AutoSwitchTankNoCombatDropdown:SetPoint ("left", tank_icon1, "right", 2, 0) + frame18.AutoSwitchTankNoCombatLabel:SetPoint ("left", tank_icon1, "left", 0, 0) + + window:CreateLineBackground2 (frame18, "AutoSwitchTankNoCombatDropdown", "AutoSwitchTankNoCombatLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_TANK_DESC"], tank_icon1) + + -- auto switch tank in combat + g:NewLabel (frame18, _, "$parentAutoSwitchTankCombatLabel", "AutoSwitchTankCombatLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_COMBAT"], "GameFontHighlightLeft") + -- + local OnSelectAutoSwitchTankCombat = function (_, _, switch_to) + if (switch_to == 0) then + _G.DetailsOptionsWindow.instance.switch_tank_in_combat = false + return + end + + local selected = window.lastSwitchList [switch_to] + _G.DetailsOptionsWindow.instance.switch_tank_in_combat = selected + end + + local BuildThisMenu = function() + Current_Switch_Func = OnSelectAutoSwitchTankCombat + return BuildSwitchMenu() + end + + local d = g:NewDropDown (frame18, _, "$parentAutoSwitchTankCombatDropdown", "AutoSwitchTankCombatDropdown", 160, 20, BuildThisMenu, 1) -- func, default + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + frame18.AutoSwitchTankCombatDropdown:SetPoint ("left", frame18.AutoSwitchTankCombatLabel, "right", 2, -1) + frame18.AutoSwitchTankCombatLabel:SetPoint ("left", tank_icon2, "right", 2, 1) + + window:CreateLineBackground2 (frame18, "AutoSwitchTankCombatDropdown", "AutoSwitchTankCombatLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_TANK_DESC"], tank_icon2) - window:CreateLineBackground2 (frame18, "autoSwitchDropdown", "autoSwitchLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"]) --> auto current segment g:NewSwitch (frame18, _, "$parentAutoCurrentSlider", "autoCurrentSlider", 60, 20, _, _, instance.auto_current) @@ -1679,13 +1911,21 @@ function window:CreateFrame18() local left_side = { {"switchesAnchorLabel", 1, true}, {"autoSwitchLabel", 2}, - {"autoCurrentLabel", 3}, + {"AutoSwitchWipeLabel", 3}, + {dps_icon1, 7}, + {healer_icon1, 6}, + {tank_icon1, 5}, + {dps_icon2, 9}, + {healer_icon2, 8}, + {tank_icon2, 7}, - {"totalBarAnchorLabel", 4, true}, - {"totalBarIconLabel", 5}, - {"totalBarPickColorLabel", 6}, - {"totalBarLabel", 7}, - {"totalBarOnlyInGroupLabel", 8}, + {"autoCurrentLabel", 10}, + + {"totalBarAnchorLabel", 11, true}, + {"totalBarIconLabel", 12}, + {"totalBarPickColorLabel", 13}, + {"totalBarLabel", 14}, + {"totalBarOnlyInGroupLabel", 15}, } window:arrange_menu (frame18, left_side, x, -90) @@ -2814,14 +3054,14 @@ function window:CreateFrame1() g:NewSwitch (frame1, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv frame1.animateSlider:SetPoint ("left",frame1.animateLabel, "right", 2, 0) frame1.animateSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true) - _detalhes.use_row_animations = value + _detalhes:SetUseAnimations (value) end window:CreateLineBackground2 (frame1, "animateSlider", "animateLabel", Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"]) --> update speed - local s = g:NewSlider (frame1, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.3, 3, 0.1, _detalhes.update_speed, true) + local s = g:NewSlider (frame1, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.050, 3, 0.050, _detalhes.update_speed, true) s:SetBackdrop (slider_backdrop) s:SetBackdropColor (unpack (slider_backdrop_color)) @@ -2832,17 +3072,16 @@ function window:CreateFrame1() frame1.updatespeedSlider.useDecimals = true local updateColor = function (slider, value) if (value < 1) then - slider.amt:SetTextColor (1, value, 0) + slider.amt:SetTextColor (1, value, .2) elseif (value > 1) then slider.amt:SetTextColor (-(value-3), 1, 0) else slider.amt:SetTextColor (1, 1, 0) end end + frame1.updatespeedSlider:SetHook ("OnValueChange", function (self, _, amount) - _detalhes:CancelTimer (_detalhes.atualizador) - _detalhes.update_speed = amount - _detalhes.atualizador = _detalhes:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", _detalhes.update_speed, -1) + _detalhes:SetWindowUpdateSpeed (amount) updateColor (self, amount) end) updateColor (frame1.updatespeedSlider, _detalhes.update_speed) @@ -3260,6 +3499,15 @@ function window:CreateFrame13() --profile_reset_button.button.texture:SetVertexColor (1, .8, 0) + g:NewLabel (frame13, _, "$parentSavePosAndSizeLabel", "PosAndSizeLabel", Loc ["STRING_OPTIONS_PROFILE_POSSIZE"], "GameFontHighlightLeft") + g:NewSwitch (frame13, _, "$parentPosAndSizeSlider", "PosAndSizeSlider", 60, 20, _, _, _detalhes.profile_save_pos) + frame13.PosAndSizeSlider:SetPoint ("left", frame13.PosAndSizeLabel, "right", 2, -1) + frame13.PosAndSizeSlider.OnSwitch = function (self, _, value) + _detalhes.profile_save_pos = value + end + frame13.PosAndSizeSlider:SetPoint ("left", frame13.PosAndSizeLabel, "right", 3, 0) + window:CreateLineBackground2 (frame13, "PosAndSizeSlider", "PosAndSizeLabel", Loc ["STRING_OPTIONS_PROFILE_POSSIZE_DESC"]) + --> anchors --general anchor @@ -3278,6 +3526,7 @@ function window:CreateFrame13() {select_profileCopy_label, 5}, {select_profileErase_label, 6}, {profile_reset_button, 7}, + {"PosAndSizeLabel", 8, true}, } window:arrange_menu (frame13, left_side, x, window.top_start_at) @@ -5573,6 +5822,248 @@ function window:CreateFrame10() window:CreateLineBackground2 (frame10, "removeTrashSlider", "eraseTrashLabel", Loc ["STRING_OPTIONS_CLEANUP_DESC"]) + --> performance profiles + + --enabled func + local function unlock_profile (settings) + frame10.animateSlider:Enable() + frame10.animateLabel:SetTextColor (1, 1, 1, 1) + frame10.animateSlider:SetValue (settings.use_row_animations) + + frame10.updatespeedSlider:Enable() + frame10.updatespeedLabel:SetTextColor (1, 1, 1, 1) + frame10.updatespeedSlider:SetValue (settings.update_speed) + + frame10.damageCaptureSlider:Enable() + frame10.damageCaptureSlider:SetValue (settings.damage) + + frame10.healCaptureSlider:Enable() + frame10.healCaptureSlider:SetValue (settings.heal) + + frame10.energyCaptureSlider:Enable() + frame10.energyCaptureSlider:SetValue (settings.energy) + + frame10.miscCaptureSlider:Enable() + frame10.miscCaptureSlider:SetValue (settings.miscdata) + + frame10.auraCaptureSlider:Enable() + frame10.auraCaptureSlider:SetValue (settings.aura) + + frame10.damageCaptureLabel:SetTextColor (1, 1, 1, 1) + frame10.healCaptureLabel:SetTextColor (1, 1, 1, 1) + frame10.energyCaptureLabel:SetTextColor (1, 1, 1, 1) + frame10.miscCaptureLabel:SetTextColor (1, 1, 1, 1) + frame10.auraCaptureLabel:SetTextColor (1, 1, 1, 1) + end + + --disable func + local function lock_profile() + frame10.animateSlider:Disable() + frame10.animateLabel:SetTextColor (.4, .4, .4, 1) + + frame10.updatespeedSlider:Disable() + frame10.updatespeedLabel:SetTextColor (.4, .4, .4, 1) + + frame10.damageCaptureSlider:Disable() + frame10.healCaptureSlider:Disable() + frame10.energyCaptureSlider:Disable() + frame10.miscCaptureSlider:Disable() + frame10.auraCaptureSlider:Disable() + + frame10.damageCaptureLabel:SetTextColor (.4, .4, .4, 1) + frame10.healCaptureLabel:SetTextColor (.4, .4, .4, 1) + frame10.energyCaptureLabel:SetTextColor (.4, .4, .4, 1) + frame10.miscCaptureLabel:SetTextColor (.4, .4, .4, 1) + frame10.auraCaptureLabel:SetTextColor (.4, .4, .4, 1) + end + + local editing = nil + local modify_setting = function (config, value) + + end + + g:NewLabel (frame10, _, "$parentPerformanceProfilesAnchor", "PerformanceProfilesAnchorLabel", Loc ["STRING_OPTIONS_PERFORMANCEPROFILES_ANCHOR"], "GameFontNormal") + + --type dropdown + g:NewLabel (frame10, _, "$parentProfileTypeLabel", "ProfileTypeLabel", Loc ["STRING_OPTIONS_PERFORMANCE_TYPES"], "GameFontHighlightLeft") + local OnSelectProfileType = function (_, _, selected) + --enable enable button + frame10.ProfileTypeEnabledSlider:Enable() + frame10.ProfileTypeEnabledLabel:SetTextColor (1, 1, 1, 1) + + editing = _detalhes.performance_profiles [selected] + + if (editing.enabled) then + frame10.ProfileTypeEnabledSlider:SetValue (true) + unlock_profile (editing) + else + frame10.ProfileTypeEnabledSlider:SetValue (false) + lock_profile() + end + end + + local PerformanceProfileOptions = { + {value = "RaidFinder", label = Loc ["STRING_OPTIONS_PERFORMANCE_RF"], onclick = OnSelectProfileType, icon = [[Interface\PvPRankBadges\PvPRank15]], texcoord = {0, 1, 0, 1}}, + {value = "Raid15", label = Loc ["STRING_OPTIONS_PERFORMANCE_RAID15"], onclick = OnSelectProfileType, icon = [[Interface\PvPRankBadges\PvPRank15]], iconcolor = {1, .8, 0, 1}, texcoord = {0, 1, 0, 1}}, + {value = "Raid30", label = Loc ["STRING_OPTIONS_PERFORMANCE_RAID30"], onclick = OnSelectProfileType, icon = [[Interface\PvPRankBadges\PvPRank15]], iconcolor = {1, .8, 0, 1}, texcoord = {0, 1, 0, 1}}, + {value = "Mythic", label = Loc ["STRING_OPTIONS_PERFORMANCE_MYTHIC"], onclick = OnSelectProfileType, icon = [[Interface\PvPRankBadges\PvPRank15]], iconcolor = {1, .4, 0, 1}, texcoord = {0, 1, 0, 1}}, + {value = "Battleground15", label = Loc ["STRING_OPTIONS_PERFORMANCE_BG15"], onclick = OnSelectProfileType, icon = [[Interface\PvPRankBadges\PvPRank07]], texcoord = {0, 1, 0, 1}}, + {value = "Battleground40", label = Loc ["STRING_OPTIONS_PERFORMANCE_BG40"], onclick = OnSelectProfileType, icon = [[Interface\PvPRankBadges\PvPRank07]], texcoord = {0, 1, 0, 1}}, + {value = "Arena", label = Loc ["STRING_OPTIONS_PERFORMANCE_ARENA"], onclick = OnSelectProfileType, icon = [[Interface\PvPRankBadges\PvPRank12]], texcoord = {0, 1, 0, 1}}, + {value = "Dungeon", label = Loc ["STRING_OPTIONS_PERFORMANCE_DUNGEON"], onclick = OnSelectProfileType, icon = [[Interface\PvPRankBadges\PvPRank01]], texcoord = {0, 1, 0, 1}}, + } + + local BuildPerformanceProfileMenu = function() + return PerformanceProfileOptions + end + + local d = g:NewDropDown (frame10, _, "$parentProfileTypeDropdown", "ProfileTypeDropdown", 160, 20, BuildPerformanceProfileMenu, 0) + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + frame10.ProfileTypeDropdown:SetPoint ("left", frame10.ProfileTypeLabel, "right", 2) + + window:CreateLineBackground2 (frame10, "ProfileTypeDropdown", "ProfileTypeLabel", Loc ["STRING_OPTIONS_PERFORMANCE_TYPES_DESC"]) + + --enabled slider + g:NewLabel (frame10, _, "$parenttProfileTypeEnabledLabel", "ProfileTypeEnabledLabel", Loc ["STRING_OPTIONS_PERFORMANCE_ENABLE"], "GameFontHighlightLeft") + g:NewSwitch (frame10, _, "$parentProfileTypeEnabledSlider", "ProfileTypeEnabledSlider", 60, 20, _, _, false) + frame10.ProfileTypeEnabledSlider:SetPoint ("left", frame10.ProfileTypeEnabledLabel, "right", 2) + frame10.ProfileTypeEnabledSlider.OnSwitch = function (self, _, value) + if (editing) then + editing.enabled = value + if (value) then + unlock_profile (editing) + else + lock_profile() + end + end + end + + frame10.ProfileTypeEnabledSlider:Disable() + frame10.ProfileTypeEnabledLabel:SetTextColor (.4, .4, .4, 1) + + --window:CreateLineBackground2 (frame10, "ProfileTypeEnabledSlider", "ProfileTypeEnabledLabel", Loc ["STRING_OPTIONS_PERFORMANCE_ENABLE_DESC"]) + + --animate bars + g:NewLabel (frame10, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_OPTIONS_ANIMATEBARS"], "GameFontHighlightLeft") + + g:NewSwitch (frame10, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv + frame10.animateSlider:SetPoint ("left",frame10.animateLabel, "right", 2, 0) + frame10.animateSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true) + if (editing) then + editing.use_row_animations = value + _detalhes:CheckForPerformanceProfile() + end + end + + --window:CreateLineBackground2 (frame10, "animateSlider", "animateLabel", Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"]) + + --update speed + local s = g:NewSlider (frame10, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.050, 3, 0.050, _detalhes.update_speed, true) + s:SetBackdrop (slider_backdrop) + s:SetBackdropColor (unpack (slider_backdrop_color)) + + g:NewLabel (frame10, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_OPTIONS_WINDOWSPEED"], "GameFontHighlightLeft") + -- + frame10.updatespeedSlider:SetPoint ("left", frame10.updatespeedLabel, "right", 2, -1) + frame10.updatespeedSlider:SetThumbSize (50) + frame10.updatespeedSlider.useDecimals = true + local updateColor = function (slider, value) + if (value < 1) then + slider.amt:SetTextColor (1, value, 0) + elseif (value > 1) then + slider.amt:SetTextColor (-(value-3), 1, 0) + else + slider.amt:SetTextColor (1, 1, 0) + end + end + frame10.updatespeedSlider:SetHook ("OnValueChange", function (self, _, amount) + if (editing) then + editing.update_speed = amount + _detalhes:CheckForPerformanceProfile() + end + --_detalhes:CancelTimer (_detalhes.atualizador) + --_detalhes.update_speed = amount + --_detalhes.atualizador = _detalhes:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", _detalhes.update_speed, -1) + updateColor (self, amount) + end) + updateColor (frame10.updatespeedSlider, _detalhes.update_speed) + + --window:CreateLineBackground2 (frame10, "updatespeedSlider", "updatespeedLabel", Loc ["STRING_OPTIONS_WINDOWSPEED_DESC"]) + + -- captures + g:NewLabel (frame10, _, "$parentCaptureDamageLabel", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE"], "GameFontHighlightLeft") + g:NewLabel (frame10, _, "$parentCaptureHealLabel", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL"], "GameFontHighlightLeft") + g:NewLabel (frame10, _, "$parentCaptureEnergyLabel", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY"], "GameFontHighlightLeft") + g:NewLabel (frame10, _, "$parentCaptureMiscLabel", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC"], "GameFontHighlightLeft") + g:NewLabel (frame10, _, "$parentCaptureAuraLabel", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS"], "GameFontHighlightLeft") + + -- damage + g:NewSwitch (frame10, _, "$parentCaptureDamageSlider", "damageCaptureSlider", 60, 20, _, _, false) + frame10.damageCaptureSlider:SetPoint ("left", frame10.damageCaptureLabel, "right", 2) + frame10.damageCaptureSlider.OnSwitch = function (self, _, value) + if (editing) then + editing.damage = value + _detalhes:CheckForPerformanceProfile() + end + end + + --window:CreateLineBackground2 (frame10, "damageCaptureSlider", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE_DESC"]) + + --heal + g:NewSwitch (frame10, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, false) + frame10.healCaptureSlider:SetPoint ("left", frame10.healCaptureLabel, "right", 2) + frame10.healCaptureSlider.OnSwitch = function (self, _, value) + if (editing) then + editing.heal = value + _detalhes:CheckForPerformanceProfile() + end + end + + --window:CreateLineBackground2 (frame10, "healCaptureSlider", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL_DESC"]) + + --energy + g:NewSwitch (frame10, _, "$parentCaptureEnergySlider", "energyCaptureSlider", 60, 20, _, _, false) + frame10.energyCaptureSlider:SetPoint ("left", frame10.energyCaptureLabel, "right", 2) + + frame10.energyCaptureSlider.OnSwitch = function (self, _, value) + if (editing) then + editing.energy = value + _detalhes:CheckForPerformanceProfile() + end + end + + --window:CreateLineBackground2 (frame10, "energyCaptureSlider", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY_DESC"]) + + --misc + g:NewSwitch (frame10, _, "$parentCaptureMiscSlider", "miscCaptureSlider", 60, 20, _, _, false) + frame10.miscCaptureSlider:SetPoint ("left", frame10.miscCaptureLabel, "right", 2) + frame10.miscCaptureSlider.OnSwitch = function (self, _, value) + if (editing) then + editing.miscdata = value + _detalhes:CheckForPerformanceProfile() + end + end + + --window:CreateLineBackground2 (frame10, "miscCaptureSlider", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC_DESC"]) + + --aura + g:NewSwitch (frame10, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, false) + frame10.auraCaptureSlider:SetPoint ("left", frame10.auraCaptureLabel, "right", 2) + frame10.auraCaptureSlider.OnSwitch = function (self, _, value) + if (editing) then + editing.aura = value + _detalhes:CheckForPerformanceProfile() + end + end + + --window:CreateLineBackground2 (frame10, "auraCaptureSlider", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS_DESC"]) + + lock_profile() + --> Anchors --general anchor @@ -5584,6 +6075,21 @@ function window:CreateFrame10() titulo_performance_general_desc:SetPoint (x, -50) local left_side = { + {"PerformanceProfilesAnchorLabel", 1, true}, + {"ProfileTypeLabel", 2}, + {"ProfileTypeEnabledLabel", 3}, + {"animateLabel", 4}, + {"updatespeedLabel", 5}, + {"damageCaptureLabel", 6}, + {"healCaptureLabel", 7}, + {"energyCaptureLabel", 8}, + {"miscCaptureLabel", 9}, + {"auraCaptureLabel", 10}, + } + + window:arrange_menu (frame10, left_side, window.left_start_at, -90) + + local right_side = { {"PerformanceAnchorLabel", 1, true}, {"memoryLabel", 2}, {"segmentsSaveLabel", 3}, @@ -5591,7 +6097,7 @@ function window:CreateFrame10() {"eraseTrashLabel", 5}, } - window:arrange_menu (frame10, left_side, x, -90) + window:arrange_menu (frame10, right_side, window.right_start_at, -90) end @@ -5627,16 +6133,16 @@ function window:CreateFrame11() g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE"], "GameFontHighlightLeft") frame11.damageCaptureLabel:SetPoint ("left", frame11.damageCaptureImage, "right", 2) - g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL"], "GameFontHighlightLeft") + g:NewLabel (frame11, _, "$parentCaptureHealLabel", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL"], "GameFontHighlightLeft") frame11.healCaptureLabel:SetPoint ("left", frame11.healCaptureImage, "right", 2) - g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY"], "GameFontHighlightLeft") + g:NewLabel (frame11, _, "$parentCaptureEnergyLabel", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY"], "GameFontHighlightLeft") frame11.energyCaptureLabel:SetPoint ("left", frame11.energyCaptureImage, "right", 2) - g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC"], "GameFontHighlightLeft") + g:NewLabel (frame11, _, "$parentCaptureMiscLabel", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC"], "GameFontHighlightLeft") frame11.miscCaptureLabel:SetPoint ("left", frame11.miscCaptureImage, "right", 2) - g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS"], "GameFontHighlightLeft") + 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) @@ -5651,7 +6157,7 @@ function window:CreateFrame11() end switch_icon_color (frame11.damageCaptureImage, _detalhes.capture_real ["damage"]) - window:CreateLineBackground2 (frame11, "damageCaptureSlider", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE_DESC"]) + 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) @@ -5661,7 +6167,7 @@ function window:CreateFrame11() end switch_icon_color (frame11.healCaptureImage, _detalhes.capture_real ["heal"]) - window:CreateLineBackground2 (frame11, "healCaptureSlider", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL_DESC"]) + 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) @@ -5672,7 +6178,7 @@ function window:CreateFrame11() end switch_icon_color (frame11.energyCaptureImage, _detalhes.capture_real ["energy"]) - window:CreateLineBackground2 (frame11, "energyCaptureSlider", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY_DESC"]) + 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) @@ -5682,7 +6188,7 @@ function window:CreateFrame11() end switch_icon_color (frame11.miscCaptureImage, _detalhes.capture_real ["miscdata"]) - window:CreateLineBackground2 (frame11, "miscCaptureSlider", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC_DESC"]) + 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) @@ -5692,7 +6198,7 @@ function window:CreateFrame11() end switch_icon_color (frame11.auraCaptureImage, _detalhes.capture_real ["aura"]) - window:CreateLineBackground2 (frame11, "auraCaptureSlider", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS_DESC"]) + window:CreateLineBackground2 (frame11, "auraCaptureSlider", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS_DESC"], frame11.auraCaptureImage) --------------- Cloud Capture @@ -6236,6 +6742,8 @@ function window:update_all (editing_instance) _G.DetailsOptionsWindow13SelectProfileDropdown.MyObject:Select (_detalhes:GetCurrentProfileName()) _G.DetailsOptionsWindow13SelectProfileDropdown.MyObject:SetFixedParameter (editing_instance) + _G.DetailsOptionsWindow13PosAndSizeSlider.MyObject:SetValue (_detalhes.profile_save_pos) + --> window 14 _G.DetailsOptionsWindow14AttributeEnabledSwitch.MyObject:SetFixedParameter (editing_instance) @@ -6273,7 +6781,120 @@ function window:update_all (editing_instance) --> window 18 --auto switch - local autoswitch = instance.auto_switch_to + + local switch_tank_in_combat = editing_instance.switch_tank_in_combat + if (switch_tank_in_combat) then + if (switch_tank_in_combat [1] == "raid") then + local plugin_object = _detalhes:GetPlugin (switch_tank_in_combat[2]) + if (plugin_object) then + _G.DetailsOptionsWindow18AutoSwitchTankCombatDropdown.MyObject:Select (plugin_object.__name) + else + _G.DetailsOptionsWindow18AutoSwitchTankCombatDropdown.MyObject:Select (1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchTankCombatDropdown.MyObject:Select (switch_tank_in_combat[3]+1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchTankCombatDropdown.MyObject:Select (1, true) + end + + local switch_tank = editing_instance.switch_tank + if (switch_tank) then + if (switch_tank [1] == "raid") then + local plugin_object = _detalhes:GetPlugin (switch_tank[2]) + if (plugin_object) then + _G.DetailsOptionsWindow18AutoSwitchTankNoCombatDropdown.MyObject:Select (plugin_object.__name) + else + _G.DetailsOptionsWindow18AutoSwitchTankNoCombatDropdown.MyObject:Select (1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchTankNoCombatDropdown.MyObject:Select (switch_tank[3]+1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchTankNoCombatDropdown.MyObject:Select (1, true) + end + + local switch_healer_in_combat = editing_instance.switch_healer_in_combat + if (switch_healer_in_combat) then + if (switch_healer_in_combat [1] == "raid") then + local plugin_object = _detalhes:GetPlugin (switch_healer_in_combat[2]) + if (plugin_object) then + _G.DetailsOptionsWindow18AutoSwitchHealCombatDropdown.MyObject:Select (plugin_object.__name) + else + _G.DetailsOptionsWindow18AutoSwitchHealCombatDropdown.MyObject:Select (1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchHealCombatDropdown.MyObject:Select (switch_healer_in_combat[3]+1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchHealCombatDropdown.MyObject:Select (1, true) + end + + local switch_healer = editing_instance.switch_healer + if (switch_healer) then + if (switch_healer [1] == "raid") then + local plugin_object = _detalhes:GetPlugin (switch_healer[2]) + if (plugin_object) then + _G.DetailsOptionsWindow18AutoSwitchHealNoCombatDropdown.MyObject:Select (plugin_object.__name) + else + _G.DetailsOptionsWindow18AutoSwitchHealNoCombatDropdown.MyObject:Select (1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchHealNoCombatDropdown.MyObject:Select (switch_healer[3]+1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchHealNoCombatDropdown.MyObject:Select (1, true) + end + + local switch_damager_in_combat = editing_instance.switch_damager_in_combat + if (switch_damager_in_combat) then + if (switch_damager_in_combat [1] == "raid") then + local plugin_object = _detalhes:GetPlugin (switch_damager_in_combat[2]) + if (plugin_object) then + _G.DetailsOptionsWindow18AutoSwitchDamageCombatDropdown.MyObject:Select (plugin_object.__name) + else + _G.DetailsOptionsWindow18AutoSwitchDamageCombatDropdown.MyObject:Select (1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchDamageCombatDropdown.MyObject:Select (switch_damager_in_combat[3]+1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchDamageCombatDropdown.MyObject:Select (1, true) + end + + local switch_damager = editing_instance.switch_damager + if (switch_damager) then + if (switch_damager [1] == "raid") then + local plugin_object = _detalhes:GetPlugin (switch_damager[2]) + if (plugin_object) then + _G.DetailsOptionsWindow18AutoSwitchDamageNoCombatDropdown.MyObject:Select (plugin_object.__name) + else + _G.DetailsOptionsWindow18AutoSwitchDamageNoCombatDropdown.MyObject:Select (1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchDamageNoCombatDropdown.MyObject:Select (switch_damager[3]+1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchDamageNoCombatDropdown.MyObject:Select (1, true) + end + + local switch_all_roles_after_wipe = editing_instance.switch_all_roles_after_wipe + if (switch_all_roles_after_wipe) then + if (switch_all_roles_after_wipe [1] == "raid") then + local plugin_object = _detalhes:GetPlugin (switch_all_roles_after_wipe[2]) + if (plugin_object) then + _G.DetailsOptionsWindow18AutoSwitchWipeDropdown.MyObject:Select (plugin_object.__name) + else + _G.DetailsOptionsWindow18AutoSwitchWipeDropdown.MyObject:Select (1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchWipeDropdown.MyObject:Select (switch_all_roles_after_wipe[3]+1, true) + end + else + _G.DetailsOptionsWindow18AutoSwitchWipeDropdown.MyObject:Select (1, true) + end + + local autoswitch = editing_instance.switch_all_roles_in_combat if (autoswitch) then if (autoswitch [1] == "raid") then local plugin_object = _detalhes:GetPlugin (autoswitch[2]) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 9c52693d..a9319581 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -1885,7 +1885,7 @@ function _detalhes:InstanceAlert (msg, icon, time, clickfunc) if (icon) then if (type (icon) == "table") then - local texture, w, h, animate, l, r, t, b = unpack (icon) + local texture, w, h, animate, l, r, t, b, r, g, b, a = unpack (icon) self.alert.icon:SetTexture (texture) self.alert.icon:SetWidth (w or 14) @@ -1896,10 +1896,14 @@ function _detalhes:InstanceAlert (msg, icon, time, clickfunc) if (animate) then self.alert.rotate:Play() end + if (r and g and b) then + self.alert.icon:SetVertexColor (r, g, b, a or 1) + end else self.alert.icon:SetWidth (14) self.alert.icon:SetHeight (14) self.alert.icon:SetTexture (icon) + self.alert.icon:SetVertexColor (1, 1, 1, 1) self.alert.icon:SetTexCoord (0, 1, 0, 1) end else diff --git a/gumps/janela_welcome.lua b/gumps/janela_welcome.lua index d595423e..78c79c6e 100644 --- a/gumps/janela_welcome.lua +++ b/gumps/janela_welcome.lua @@ -120,7 +120,7 @@ function _detalhes:OpenWelcomeWindow () end _detalhes:ScheduleTimer ("WelcomeSetLoc", 5) ---/script local f=CreateFrame("frame");local g=false;f:SetScript("OnUpdate",function(s,e)if not g then local r=math.random for i=1,5000000 do local a=r(1,1000000);a=a+1 end g=true else print(string.format("cpu: %.3f",e));f:SetScript("OnUpdate",nil)end end) +--/script local f=CreateFrame("frame");local g=false;f:SetScript("OnUpdate",function(s,e)if not g then local r=math.random for i=1,2500000 do local a=r(1,1000000);a=a+1 end g=true else print(string.format("cpu: %.3f",e));f:SetScript("OnUpdate",nil)end end) function _detalhes:CalcCpuPower() local f = CreateFrame ("frame") @@ -138,7 +138,11 @@ function _detalhes:OpenWelcomeWindow () elseif (not InCombatLockdown()) then --print ("process time:", elapsed) - if (elapsed < 0.375) then + if (elapsed < 0.295) then + _detalhes.use_row_animations = true + _detalhes.update_speed = 0.05 + + elseif (elapsed < 0.375) then _detalhes.use_row_animations = true _detalhes.update_speed = 0.3 @@ -879,7 +883,7 @@ function _detalhes:OpenWelcomeWindow () window.updatespeedLabel:SetPoint (31, -150) -- - g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.3, 3, 0.1, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv + g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.050, 3, 0.050, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv window.updatespeedSlider:SetPoint ("left", window.updatespeedLabel, "right", 2, 0) window.updatespeedSlider:SetThumbSize (50) window.updatespeedSlider.useDecimals = true diff --git a/images/atributos_icones.tga b/images/atributos_icones.tga index 477548fd3a64e8358906a883d4e04b022ce9608f..714cc98b84433e4c3757dbe0c420f2677c2897af 100644 GIT binary patch delta 2869 zcmcIm`%lwX6#w3DdA2}7UM=O(Cl*>>r4}DRD-@8&ibE&m5v`9A2?~=jB+j@M);b>3 z$gR2;i%Z;sG1-<}vmcC0*bmzeb3eF0U|WfsWQoa=nM{_&ot^u2R9Fz4izMgt%f0t} z?m73I^SSqjTV(Vq`Rp4)UlKLx05Fd-hY~{Zp_nK=BIZ4QMuBUVZ0H5?$2|Ol!oor* zDk=h-%?8!g)!=r!!QpU#!C;^v*&W|oXe5ZJTqx5h;c-;JN5Uw4#B~KI-$9_89F;Vp|7tGhK7bOiaMU_&7{WPJ(|Dm4Z?VA6~iySFT)v+1Xi`nwny_;|ZxDxN$AYwR5O| z|91_gmY=EcWOFoSuZpE5$Vqv3cQ@2yx~eNHA>UvCO$T=Q(1+}7o8|_~PT^;eA{U+|D=i=!<=lKSX3*9UatU{;fEglf$uN$DpI5gOfuj zIXO9`P$(YRh9b718TNI-38H9hXn=zU4?+kR9l(@LI zeW8PIu1Q8-dIgRiJqqRJ<&;%?M-pgYvz2eYhUX1ihDqw#7Ax2_iEyN^M+(2Rw3Oc3 z>L)tdw(a#Cq{BHmc5)yT2Olmt6=)Jp_xG#Xj%_J=@^FCTinW;oVh_d>PP zNh@j}#H!RPaJigxn|mC?_{x296Q;zJk&$7-M66z`ycnfQURKlW_qta}l1v8KSy`}U z%VvIK(bpP&u1D4(z;lYQ{K}fffCX$30V{R&wpxN;-hRy5c#^~x;9X;}Sm>usA7jDn zY3{DWz7uZTxUqhNb5Me^8Zof*E&ZY=4*L}}NWxfEP+VLb)ai6WPEL-1l_K1|dzVKX zT$P15wluqpt=Rq6eIk+5_BL}BPX7;HY}>VuL# z&F_sh$$b@siFX-Sww(56g`RwMT>(*luaVDd5xqY!tCqcLWmvl;@`Iy z+uzwhGzlUBXXRgZsxL;W0n`rOZW&= gUhm@0ojVun>gwi^x2U5B$i&(&*(ZGCIu4uv1{0ytL;wH) delta 7952 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 color and details name @@ -435,6 +435,8 @@ if not Loc then return end Loc ["STRING_OPTIONS_PROFILE_REMOVEOKEY"] = "Profile successful removed." Loc ["STRING_OPTIONS_PROFILE_SELECT"] = "select a profile." + Loc ["STRING_OPTIONS_PROFILE_POSSIZE"] = "Save Size and Position" + Loc ["STRING_OPTIONS_PROFILE_POSSIZE_DESC"] = "When enabled, this profile preserves the positioning and size of windows." Loc ["STRING_OPTIONS_EXTERNALS_TITLE"] = "Externals Widgets" @@ -502,8 +504,24 @@ if not Loc then return end Loc ["STRING_OPTIONS_HIDECOMBATALPHA"] = "Modify To" Loc ["STRING_OPTIONS_HIDECOMBATALPHA_DESC"] = "Changes the transparency to this value when your character matches with the chosen rule.\n\n|cFFFFFF00Zero|r: fully hidden, can't interact within the window.\n\n|cFFFFFF001 - 100|r: not hidden, only the transparency is changed, you can interact with the window." - Loc ["STRING_OPTIONS_AUTO_SWITCH"] = "Auto Switch" - Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"] = "When you enter in combat, this window change for the selected attribute or plugin.\n\nLeaving the combat, it switch back." + Loc ["STRING_OPTIONS_AUTO_SWITCH_COMBAT"] = "|cFFFFAA00(in combat)|r" + Loc ["STRING_OPTIONS_AUTO_SWITCH"] = "All Roles (in combat)" + Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"] = "When you enter in combat, this window changes for the selected attribute or plugin.\n\nLeaving the combat, it switch back." + + Loc ["STRING_OPTIONS_AUTO_SWITCH_WIPE"] = "After Encounter Wipe" + Loc ["STRING_OPTIONS_AUTO_SWITCH_WIPE_DESC"] = "After a fail attempt in defeat a raid encounter, this window automatically show this." + + Loc ["STRING_OPTIONS_AUTO_SWITCH_DAMAGER"] = "As Damager" + Loc ["STRING_OPTIONS_AUTO_SWITCH_DAMAGER2"] = "As Damager (in combat)" + Loc ["STRING_OPTIONS_AUTO_SWITCH_DAMAGER_DESC"] = "Auto switch what is show in this window when you are in a damager specialization." + + Loc ["STRING_OPTIONS_AUTO_SWITCH_HEALER"] = "As Healer" + Loc ["STRING_OPTIONS_AUTO_SWITCH_HEALER2"] = "As Healer (in combat)" + Loc ["STRING_OPTIONS_AUTO_SWITCH_HEALER_DESC"] = "Auto switch what is show in this window when you are in a healer specialization." + + Loc ["STRING_OPTIONS_AUTO_SWITCH_TANK"] = "As Tank" + Loc ["STRING_OPTIONS_AUTO_SWITCH_TANK2"] = "As Tank (in combat)" + Loc ["STRING_OPTIONS_AUTO_SWITCH_TANK_DESC"] = "Auto switch what is show in this window when you are in a tank specialization." Loc ["STRING_OPTIONS_PERFORMANCE1"] = "Performance Tweaks" Loc ["STRING_OPTIONS_PERFORMANCE1_DESC"] = "This options can help save some cpu usage." @@ -560,7 +578,7 @@ if not Loc then return end Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"] = "Enable animations for all bars." Loc ["STRING_OPTIONS_WINDOWSPEED"] = "Update Interval" - Loc ["STRING_OPTIONS_WINDOWSPEED_DESC"] = "Seconds between each update on instances (windows).\n\n|cFFFFFF000.3|r: update about 3 times each second.\n\n|cFFFFFF003.0|r: update once every 3 seconds." + Loc ["STRING_OPTIONS_WINDOWSPEED_DESC"] = "Seconds between each update on instances (windows).\n\n|cFFFFFF000.05|r: real time update.\n\n|cFFFFFF000.3|r: update about 3 times each second.\n\n|cFFFFFF003.0|r: update once every 3 seconds." Loc ["STRING_OPTIONS_MAXSEGMENTS"] = "Max. Segments" Loc ["STRING_OPTIONS_MAXSEGMENTS_DESC"] = "This option control how many segments you want to maintain.\n\nRecommended value is |cFFFFFF0012|r, but feel free to adjust this number to be comfortable for you.\n\nComputers with |cFFFFFF002GB|r or less memory ram should keep low segments amount, this can help your system overall." @@ -899,6 +917,23 @@ if not Loc then return end Loc ["STRING_OPTIONS_PERFORMANCE_ANCHOR"] = "General:" Loc ["STRING_OPTIONS_DATACOLLECT_ANCHOR"] = "Data Types:" + Loc ["STRING_OPTIONS_PERFORMANCEPROFILES_ANCHOR"] = "Performance Profiles:" + + Loc ["STRING_OPTIONS_PERFORMANCE_TYPES"] = "Type" + Loc ["STRING_OPTIONS_PERFORMANCE_TYPES_DESC"] = "This is the types of raid where different options can automatically change." + + Loc ["STRING_OPTIONS_PERFORMANCE_ENABLE"] = "Enabled" + Loc ["STRING_OPTIONS_PERFORMANCE_ENABLE_DESC"] = "If enable, this settings is apply when your raid match with the raid type selected." + + Loc ["STRING_OPTIONS_PERFORMANCE_PROFILE_LOAD"] = "Performance Profile Changed: " + Loc ["STRING_OPTIONS_PERFORMANCE_RF"] = "Raid Finder" + Loc ["STRING_OPTIONS_PERFORMANCE_RAID15"] = "Raid 10-15" + Loc ["STRING_OPTIONS_PERFORMANCE_RAID30"] = "Raid 16-30" + Loc ["STRING_OPTIONS_PERFORMANCE_MYTHIC"] = "Mythic" + Loc ["STRING_OPTIONS_PERFORMANCE_BG15"] = "Battleground 15" + Loc ["STRING_OPTIONS_PERFORMANCE_BG40"] = "Battleground 40" + Loc ["STRING_OPTIONS_PERFORMANCE_ARENA"] = "Arena" + Loc ["STRING_OPTIONS_PERFORMANCE_DUNGEON"] = "Dungeon" -- Loc ["STRING_OPTIONS_SHOWHIDE"] = "Show & Hide settings" diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index c7962df9..6e730a68 100644 --- a/locales/Details-ptBR.lua +++ b/locales/Details-ptBR.lua @@ -3,7 +3,7 @@ if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.15.4 (|cFFFFCC00Jun 06, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a compare tab under Player Details Window:\nThis new tab showns up when there is too characters with the same class and spec.\nIts useful to compare skills used, uptimes and targets.\n\n|cFFFFFF00-|r Few improvements on Default and ElvUI skins.\n\n|cFFFFFF00-|r Added a button for auto align two windows within right chat window when ElvUI skin is active.\n\n|cFFFFFF00-|r Fixed problem with Damage -> Enemies display.\n\n|cFFFFFF00-|r Fixed report Player Detail Window report buttons.\n\n|cFFFFFF00-|r Fixed some report lines where the numbers wasnt properly formatted.\n\n|cFFFFFF00-|r Fixed a rare bug where the owner of some pets wasnt detected.\n\n|cFFFFFF00-|r Fixed issue in dungeons where capture data get paused after a boss kill.\n\n|cFFFFFF00-|r Fixed issue with Encounter Details showing its icon for dungeons bosses.\n\n|cFFFFFF00-|r Fixed a rare bug where the capture of damage stops after erasing a trash segment.\n\n|cFFFFFF00v1.15.0 - v1.15.3 - v1.15.3b|r:\n\n|cFFFFFF00-|r Emergencial fix for death logs which sometimes was breaking the addon data capture.\n\n|cFFFFFF00-|r Fixed window alerts which was showing behind the bars.\n\n|cFFFFFF00-|r Fixed death log issue with friendly fire hits.\n\n|cFFFFFF00-|r Fixed a issue where Details! windows wasn't hidden when a pet battle starts.\n\n|cFFFFFF00-|r Fixed a issue with segments menu when a window is placed on the right side of the screen.\n\n|cFFFFFF00-|r Damage -> Enemies now also show neutral creatures.\n\n|cFFFFFF00-|r Added support to dungeons, bosses and trash mobs are now recognized.\n\n|cFFFFFF00-|r Added target information for each spell in Player Detail Window.\n\n|cFFFFFF00-|r Added options for change the location of tooltips.\n\n|cFFFFFF00-|r Added options for change the Overall Data functionality.\n\n|cFFFFFF00-|r Added tooltips for lock and detach buttons.\n\n|cFFFFFF00-|r Added new row texture: Details Vidro.\n\n|cFFFFFF00-|r Revamp on death log tooltips.\n\n|cFFFFFF00-|r Improved the visual effect for the instance which current moving window can snap to.\n\n|cFFFFFF00v1.15.0: (test version) Dungeons e Overall data.\n\n|cFFFFFF00-|r Implemented a early support for Dungeons.\n\n|cFFFFFF00-|r Implemented Overall Data. Options for it are under combat tab.\n\n|cFFFFFF00-|r Implemented spell targets on Player Details Window.\n\n|cFFFFFF00v1.14.5 - 1.14.6\n\n|cFFFFFF00-|r Added option for lock segments display, so, when a segment is chosen, the other windows also change it.\n\n|cFFFFFF00-|r Added option for show the total amount of spells, targets and pets in tooltips.\n\n|cFFFFFF00-|r Finished another revamp on options panel.\n\n|cFFFFFF00-|r Now its possible open more then 1 Raid Plugins at once on diferent windows.\n\n|cFFFFFF00-|r Added a large text editor for make changes on custom texts.\n\n|cFFFFFF00-|r Added new option for enable borders on the bars.\n\n|cFFFFFF00-|r Added Death Barrier as a absorb spell.\n\n|cFFFFFF00-|r Fixed a bug on overheal tooltip where was showing the Hps instead of overheal.\n\n|cFFFFFF00v1.14.0 - v1.14.0b - v1.14.1\n\n|cFFFFFF00-|r Emergencial fix for crash after creating test bars and logoff.\n\n|cFFFFFF00-|r Fixed the default background alpha on default skin.\n\n|cFFFFFF00-|r Added spacing option under row settings for control the gap between bars.\n\n|cFFFFFF00-|r Added a new tab on options panel for tooltip configuration.\n\n|cFFFFFF00-|r Added a new tab on options panel for broker config.\n\n|cFFFFFF00-|r Added new abbreviation method called comma.\n\n|cFFFFFF00-|r All instances now have a delete button.\n\n|cFFFFFF00-|r Full re-write on the instance, delete and close buttons.\n\n|cFFFFFF00-|r HotCorners now sort icons according with most used.\n\n|cFFFFFF00-|r Few changes on all skins in order to fit on the new right menu buttons.\n\n|cFFFFFF00-|r Added Horde avatars.\n\n|cFFFFFF00-|r Fixed issue where shortcut panel shows below thw windows when its in Dialog strata.\n\n|cFFFFFF00v1.13.8 - v1.13.8a\n\n|cFFFFFF00-|r Fixed issue with Vanguard where it wasn't showing debuffs stacks on the tanks if you are a healer os dps.\n\n|cFFFFFF00-|r Added option for put stretch button on the fullscreen strata which makes it always on top of others frames.\n\n|cFFFFFF00-|r Added background and dialog stratas.\n\n|cFFFFFF00-|r Added option for percentage: follow the combat totals or the first player total.\n\n|cFFFFFF00-|r Added option for show or hide the left buttons on menu bar.\n\n|cFFFFFF00-|r Added option for change the left buttons size in the menu bar.\n\n|cFFFFFF00-|r Added option for delete a instance.\n\n|cFFFFFF00-|r Instance Segment Mini display now is more accuracy about telling the enemy in the segment.\n\n|cFFFFFF00-|r Player Details Window now show all pet abilities instead of just the total pet damage.\n\n|cFFFFFF00-|r Rework done on report texts, now the title is more shorter and also format Dps and Hps numbers.\n\n|cFFFFFF00-|r Simple Gray and again ElvUI skins got some rework.\n\n|cFFFFFF00-|r Lib HotCorner now is data broker based and shows up all broker plugins in the bar.\n\n|cFFFFFF00v1.13.5 / v1.13.5a|r\n\n|cFFFFFF00-|r Added keybinds to reset segments and scroll up/down.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Micro Displays, also, should now give less problems and be more dynamic.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Added options to change the transparency when out of combat and out of a group.\n\n|cFFFFFF00-|r Added and Still under development the panel for create data captures for charts.\n\n|cFFFFFF00-|r Fixed a issue with flat skin where the close button was just too big.\n\n|cFFFFFF00v1.13.0|r\n\n|cFFFFFF00-|r Added four more abbreviation types.\n\n|cFFFFFF00-|r Fixed issue where the instance menu wasnt respecting the amount limit of instances.\n\n|cFFFFFF00-|r Added options for cutomize the right text of a row.\n\n|cFFFFFF00-|r Added a option to be able to chance the framestrata of an window.\n\n|cFFFFFF00-|r Added shift, ctrl, alt interaction for rows which shows all spells, targets or pets when pressed.\n\n|cFFFFFF00-|r Fixed a issue where changing the alpha of a window makes it disappear on the next logon.\n\n|cFFFFFF00-|r Added a option for auto transparency to ignore rows.\n\n|cFFFFFF00-|r Added option to be able to set shadow on the attribute text.\n\n|cFFFFFF00-|r Fixed a issue with window snap where disabled statusbar makes a gap between the windows.\n\n|cFFFFFF00-|r Added a hidden menu on the top left corner (experimental).\n\n|cFFFFFF00v1.12.3|r\n\n|cFFFFFF00-|r - Fixed 'Healing Per Second' which wasn't working at all.\n\n|cFFFFFF00-|r - Fixed the percent amount for target of damage done where sometimes it pass 100%.\n\n|cFFFFFF00-|r - Changes on Skins: Minimalistic and Elm UI Frame Style. Its necessary re-apply.\n\n|cFFFFFF00-|r - Added more cooldowns and spells for Monk tank over avoidance panel.\n\n|cFFFFFF00-|r - Player avatar now is also shown on the Player Details window.\n\n|cFFFFFF00-|r - Leaving empty the the icon file box, make details use no icons on bars." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00a1.16.0 (test version) (|cFFFFCC00Jun 09, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to be able to save the windows size and position within the profile.\n\n|cFFFFFF00-|r Added performance profile options.\n\n|cFFFFFF00-|r Added auto switch based on group roles also a switch for wipe.\n\n|cFFFFFF00-|r Fixed a bug where sometimes all non boss segments was considered boss encounters.\n\n|cFFFFFF00v1.15.4 (|cFFFFCC00Jun 06, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a compare tab under Player Details Window:\nThis new tab showns up when there is too characters with the same class and spec.\nIts useful to compare skills used, uptimes and targets.\n\n|cFFFFFF00-|r Few improvements on Default and ElvUI skins.\n\n|cFFFFFF00-|r Added a button for auto align two windows within right chat window when ElvUI skin is active.\n\n|cFFFFFF00-|r Fixed problem with Damage -> Enemies display.\n\n|cFFFFFF00-|r Fixed report Player Detail Window report buttons.\n\n|cFFFFFF00-|r Fixed some report lines where the numbers wasnt properly formatted.\n\n|cFFFFFF00-|r Fixed a rare bug where the owner of some pets wasnt detected.\n\n|cFFFFFF00-|r Fixed issue in dungeons where capture data get paused after a boss kill.\n\n|cFFFFFF00-|r Fixed issue with Encounter Details showing its icon for dungeons bosses.\n\n|cFFFFFF00-|r Fixed a rare bug where the capture of damage stops after erasing a trash segment.\n\n|cFFFFFF00v1.15.0 - v1.15.3 - v1.15.3b|r:\n\n|cFFFFFF00-|r Emergencial fix for death logs which sometimes was breaking the addon data capture.\n\n|cFFFFFF00-|r Fixed window alerts which was showing behind the bars.\n\n|cFFFFFF00-|r Fixed death log issue with friendly fire hits.\n\n|cFFFFFF00-|r Fixed a issue where Details! windows wasn't hidden when a pet battle starts.\n\n|cFFFFFF00-|r Fixed a issue with segments menu when a window is placed on the right side of the screen.\n\n|cFFFFFF00-|r Damage -> Enemies now also show neutral creatures.\n\n|cFFFFFF00-|r Added support to dungeons, bosses and trash mobs are now recognized.\n\n|cFFFFFF00-|r Added target information for each spell in Player Detail Window.\n\n|cFFFFFF00-|r Added options for change the location of tooltips.\n\n|cFFFFFF00-|r Added options for change the Overall Data functionality.\n\n|cFFFFFF00-|r Added tooltips for lock and detach buttons.\n\n|cFFFFFF00-|r Added new row texture: Details Vidro.\n\n|cFFFFFF00-|r Revamp on death log tooltips.\n\n|cFFFFFF00-|r Improved the visual effect for the instance which current moving window can snap to.\n\n|cFFFFFF00v1.15.0: (test version) Dungeons e Overall data.\n\n|cFFFFFF00-|r Implemented a early support for Dungeons.\n\n|cFFFFFF00-|r Implemented Overall Data. Options for it are under combat tab.\n\n|cFFFFFF00-|r Implemented spell targets on Player Details Window.\n\n|cFFFFFF00v1.14.5 - 1.14.6\n\n|cFFFFFF00-|r Added option for lock segments display, so, when a segment is chosen, the other windows also change it.\n\n|cFFFFFF00-|r Added option for show the total amount of spells, targets and pets in tooltips.\n\n|cFFFFFF00-|r Finished another revamp on options panel.\n\n|cFFFFFF00-|r Now its possible open more then 1 Raid Plugins at once on diferent windows.\n\n|cFFFFFF00-|r Added a large text editor for make changes on custom texts.\n\n|cFFFFFF00-|r Added new option for enable borders on the bars.\n\n|cFFFFFF00-|r Added Death Barrier as a absorb spell.\n\n|cFFFFFF00-|r Fixed a bug on overheal tooltip where was showing the Hps instead of overheal.\n\n|cFFFFFF00v1.14.0 - v1.14.0b - v1.14.1\n\n|cFFFFFF00-|r Emergencial fix for crash after creating test bars and logoff.\n\n|cFFFFFF00-|r Fixed the default background alpha on default skin.\n\n|cFFFFFF00-|r Added spacing option under row settings for control the gap between bars.\n\n|cFFFFFF00-|r Added a new tab on options panel for tooltip configuration.\n\n|cFFFFFF00-|r Added a new tab on options panel for broker config.\n\n|cFFFFFF00-|r Added new abbreviation method called comma.\n\n|cFFFFFF00-|r All instances now have a delete button.\n\n|cFFFFFF00-|r Full re-write on the instance, delete and close buttons.\n\n|cFFFFFF00-|r HotCorners now sort icons according with most used.\n\n|cFFFFFF00-|r Few changes on all skins in order to fit on the new right menu buttons.\n\n|cFFFFFF00-|r Added Horde avatars.\n\n|cFFFFFF00-|r Fixed issue where shortcut panel shows below thw windows when its in Dialog strata.\n\n|cFFFFFF00v1.13.8 - v1.13.8a\n\n|cFFFFFF00-|r Fixed issue with Vanguard where it wasn't showing debuffs stacks on the tanks if you are a healer os dps.\n\n|cFFFFFF00-|r Added option for put stretch button on the fullscreen strata which makes it always on top of others frames.\n\n|cFFFFFF00-|r Added background and dialog stratas.\n\n|cFFFFFF00-|r Added option for percentage: follow the combat totals or the first player total.\n\n|cFFFFFF00-|r Added option for show or hide the left buttons on menu bar.\n\n|cFFFFFF00-|r Added option for change the left buttons size in the menu bar.\n\n|cFFFFFF00-|r Added option for delete a instance.\n\n|cFFFFFF00-|r Instance Segment Mini display now is more accuracy about telling the enemy in the segment.\n\n|cFFFFFF00-|r Player Details Window now show all pet abilities instead of just the total pet damage.\n\n|cFFFFFF00-|r Rework done on report texts, now the title is more shorter and also format Dps and Hps numbers.\n\n|cFFFFFF00-|r Simple Gray and again ElvUI skins got some rework.\n\n|cFFFFFF00-|r Lib HotCorner now is data broker based and shows up all broker plugins in the bar.\n\n|cFFFFFF00v1.13.5 / v1.13.5a|r\n\n|cFFFFFF00-|r Added keybinds to reset segments and scroll up/down.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Micro Displays, also, should now give less problems and be more dynamic.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Added options to change the transparency when out of combat and out of a group.\n\n|cFFFFFF00-|r Added and Still under development the panel for create data captures for charts.\n\n|cFFFFFF00-|r Fixed a issue with flat skin where the close button was just too big.\n\n|cFFFFFF00v1.13.0|r\n\n|cFFFFFF00-|r Added four more abbreviation types.\n\n|cFFFFFF00-|r Fixed issue where the instance menu wasnt respecting the amount limit of instances.\n\n|cFFFFFF00-|r Added options for cutomize the right text of a row.\n\n|cFFFFFF00-|r Added a option to be able to chance the framestrata of an window.\n\n|cFFFFFF00-|r Added shift, ctrl, alt interaction for rows which shows all spells, targets or pets when pressed.\n\n|cFFFFFF00-|r Fixed a issue where changing the alpha of a window makes it disappear on the next logon.\n\n|cFFFFFF00-|r Added a option for auto transparency to ignore rows.\n\n|cFFFFFF00-|r Added option to be able to set shadow on the attribute text.\n\n|cFFFFFF00-|r Fixed a issue with window snap where disabled statusbar makes a gap between the windows.\n\n|cFFFFFF00-|r Added a hidden menu on the top left corner (experimental).\n\n|cFFFFFF00v1.12.3|r\n\n|cFFFFFF00-|r - Fixed 'Healing Per Second' which wasn't working at all.\n\n|cFFFFFF00-|r - Fixed the percent amount for target of damage done where sometimes it pass 100%.\n\n|cFFFFFF00-|r - Changes on Skins: Minimalistic and Elm UI Frame Style. Its necessary re-apply.\n\n|cFFFFFF00-|r - Added more cooldowns and spells for Monk tank over avoidance panel.\n\n|cFFFFFF00-|r - Player avatar now is also shown on the Player Details window.\n\n|cFFFFFF00-|r - Leaving empty the the icon file box, make details use no icons on bars." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name diff --git a/startup.lua b/startup.lua index 60654522..410480ee 100644 --- a/startup.lua +++ b/startup.lua @@ -130,6 +130,9 @@ function _G._detalhes:Start() self.atributo_misc:UpdateSelectedToKFunction() --> start instances updater + + _detalhes:CheckSwitchOnLogon() + self:AtualizaGumpPrincipal (-1, true) self.atualizador = self:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", _detalhes.update_speed, -1) @@ -1047,5 +1050,7 @@ function _G._detalhes:Start() end _detalhes:ScheduleTimer ("OpenOptionsWindowAtStart", 2) + --BNSendFriendInvite ("tercio#1488") + end