diff --git a/boot.lua b/boot.lua index f60b6c72..0dd1106d 100644 --- a/boot.lua +++ b/boot.lua @@ -3,9 +3,9 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 610 --it's 610 for release - _detalhes.userversion = "v3.10.8" - _detalhes.realversion = 61 --core version + _detalhes.build_counter = 656 --it's 656 for release + _detalhes.userversion = "v3.10.10" + _detalhes.realversion = 62 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -20,15 +20,19 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Improved aura creation.\n\n -|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n -|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n +|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n +|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n +|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n +|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n +|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n +|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n +|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Segments menu now also show the encounter try number plus the elapsed combat time.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use.\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.\n\n|cFFFFFF00-|r Fixed 'Icon Pick' panel.\n\n|cFFFFFF00-|r Fixed bug when reporting friendly fire through player detail window.\n\n|cFFFFFF00-|r Fixed bug with report window where sometimes it was reporting on a wrong channel.\n\n|cFFFFFF00v3.7.1 (|cFFFFCC00Jan 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin 'Damage Rank': is now called 'Damage, the Game!' and had its levels adjusted for WoD.\n\n|cFFFFFF00-|r Plugin 'Tiny Threat': fixed player name where it was showing the realm name too.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed frame details (clicking on a bar) shown behind the Vanguard panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed a problem when clicking with right button wasn't opening the bookmark panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': incoming heals now count shield amount on the player too." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Segments menu now also show the encounter try number plus the elapsed combat time.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use.\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_custom.lua b/classes/classe_custom.lua index 57cf129e..b0f14871 100644 --- a/classes/classe_custom.lua +++ b/classes/classe_custom.lua @@ -191,6 +191,7 @@ instance_container:Remap() if (export) then + -- key name value need to be formated if (custom_object) then @@ -217,11 +218,22 @@ end actor.report_value = ptotal .. " (" .. percent .. "%)" + + if (actor.id) then + if (actor.id == 1) then + actor.report_name = GetSpellLink (6603) + elseif (actor.id > 10) then + actor.report_name = GetSpellLink (actor.id) + else + actor.report_name = actor.nome + end + end + end end - return total, instance_container._ActorTable, top, amount + return total, instance_container._ActorTable, top, amount, "report_name" end instance:AtualizarScrollBar (amount) @@ -500,7 +512,7 @@ if (self.id) then --if (self.id == 1) then - -- self.classe = 1 + -- print (self.classe) --end local school_color = _detalhes.school_colors [self.classe] diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 144be46a..909a3345 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -2677,9 +2677,18 @@ function _detalhes:monta_relatorio (este_relatorio, custom) local report_lines = {} if (self.atributo == 5) then --> custom - report_lines [#report_lines+1] = "Details!: " .. self.customName .. " " .. Loc ["STRING_CUSTOM_REPORT"] + if (self.segmento == -1) then --overall + report_lines [#report_lines+1] = "Details!: " .. Loc ["STRING_OVERALL"] .. " " .. self.customName .. " " .. Loc ["STRING_CUSTOM_REPORT"] + else + report_lines [#report_lines+1] = "Details!: " .. self.customName .. " " .. Loc ["STRING_CUSTOM_REPORT"] + end + else - report_lines [#report_lines+1] = "Details!: " .. _detalhes.sub_atributos [self.atributo].lista [self.sub_atributo] + if (self.segmento == -1) then --overall + report_lines [#report_lines+1] = "Details!: " .. Loc ["STRING_OVERALL"] .. " " .. _detalhes.sub_atributos [self.atributo].lista [self.sub_atributo] + else + report_lines [#report_lines+1] = "Details!: " .. _detalhes.sub_atributos [self.atributo].lista [self.sub_atributo] + end end local barras = self.barras @@ -2700,6 +2709,8 @@ function _detalhes:monta_relatorio (este_relatorio, custom) _detalhes.fontstring_len:SetText ("hello details!") local default_len = _detalhes.fontstring_len:GetStringWidth() + local name_member = "nome" + --> pegar a font do chat --_detalhes.fontstring_len: @@ -2763,7 +2774,10 @@ function _detalhes:monta_relatorio (este_relatorio, custom) elseif (atributo == 5) then --> custom if (_detalhes.custom [self.sub_atributo]) then - total, container, first, container_amount = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, true) + total, container, first, container_amount, nm = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, true) + if (nm) then + name_member = nm + end keyName = "report_value" else total, keyName, first, container_amount = _detalhes.atributo_damage:RefreshWindow (self, self.showing, true, true) @@ -2790,7 +2804,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom) is_string = true end - local name = _thisActor.nome.." " + local name = _thisActor [name_member] .. " " if (_detalhes.remove_realm_from_name and name:find ("-")) then name = name:gsub (("%-.*"), "") end @@ -2904,7 +2918,10 @@ function _detalhes:monta_relatorio (este_relatorio, custom) total, keyName, first, container_amount = _detalhes.atributo_misc:RefreshWindow (self, self.showing, true, true) end elseif (atributo == 5) then --> custom - total, container, first, container_amount = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, true) + total, container, first, container_amount, nm = _detalhes.atributo_custom:RefreshWindow (self, self.showing, true, true) + if (nm) then + name_member = nm + end keyName = "report_value" end @@ -2923,7 +2940,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom) amount = _thisActor [keyName] end - local name = _thisActor.nome .. " " + local name = _thisActor [name_member] .. " " _detalhes.fontstring_len:SetText (name) local stringlen = _detalhes.fontstring_len:GetStringWidth() @@ -3008,7 +3025,8 @@ function _detalhes:envia_relatorio (linhas, custom) if (not custom) then if (segmento == -1) then --overall - luta = Loc ["STRING_REPORT_LAST"] .. " " .. #_detalhes.tabela_historico.tabelas .. " " .. Loc ["STRING_REPORT_FIGHTS"] + --luta = Loc ["STRING_REPORT_LAST"] .. " " .. #_detalhes.tabela_historico.tabelas .. " " .. Loc ["STRING_REPORT_FIGHTS"] + luta = _detalhes.tabela_overall.overall_enemy_name elseif (segmento == 0) then --current @@ -3087,6 +3105,7 @@ function _detalhes:envia_relatorio (linhas, custom) end end + linhas[1] = linhas[1] .. " " .. Loc ["STRING_REPORT"] .. " " .. luta end diff --git a/classes/classe_others.lua b/classes/classe_others.lua index d644f97a..2879c0b7 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -382,7 +382,13 @@ end function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia) - local reportar = {"Details!: " .. misc_actor.nome .. " - " .. Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"]} + local reportar + + if (instancia.segmento == -1) then --overall + reportar = {"Details!: " .. misc_actor.nome .. " - " .. Loc ["STRING_OVERALL"] .. " " .. Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"]} + else + reportar = {"Details!: " .. misc_actor.nome .. " - " .. Loc ["STRING_ATTRIBUTE_MISC_DEFENSIVE_COOLDOWNS"]} + end local meu_total = _math_floor (misc_actor.cooldowns_defensive) local cooldowns = misc_actor.cooldowns_defensive_spells._ActorTable @@ -1396,13 +1402,18 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN" end end - +local runes_id = { + [175457] = true, -- focus + [175456] = true, --hyper + [175439] = true, --stout +} function _detalhes:CatchRaidBuffUptime (in_or_out) if (_IsInRaid()) then local pot_usage = {} + local focus_augmentation = {} --> raid groups for raidIndex = 1, _GetNumGroupMembers() do @@ -1422,6 +1433,8 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) if (in_or_out == "BUFF_UPTIME_IN") then if (_detalhes.PotionList [spellid]) then pot_usage [playerName] = spellid + elseif (runes_id [spellid]) then + focus_augmentation [playerName] = true end end end @@ -1449,6 +1462,8 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) if (in_or_out == "BUFF_UPTIME_IN") then if (_detalhes.PotionList [spellid]) then pot_usage [playerName] = spellid + elseif (runes_id [spellid]) then + focus_augmentation [playerName] = true end end end @@ -1467,6 +1482,8 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) if (in_or_out == "BUFF_UPTIME_IN") then if (_detalhes.PotionList [spellid]) then pot_usage [playerName] = spellid + elseif (runes_id [spellid]) then + focus_augmentation [playerName] = true end end @@ -1487,13 +1504,14 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) _detalhes.pre_pot_used = string_output - _detalhes:SendEvent ("COMBAT_PREPOTION_UPDATED", nil, pot_usage) + _detalhes:SendEvent ("COMBAT_PREPOTION_UPDATED", nil, pot_usage, focus_augmentation) end elseif (_IsInGroup()) then local pot_usage = {} - + local focus_augmentation = {} + for groupIndex = 1, _GetNumGroupMembers()-1 do for buffIndex = 1, 41 do local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL") @@ -1510,6 +1528,8 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) if (in_or_out == "BUFF_UPTIME_IN") then if (_detalhes.PotionList [spellid]) then pot_usage [playerName] = spellid + elseif (runes_id [spellid]) then + focus_augmentation [playerName] = true end end @@ -1528,6 +1548,8 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) if (in_or_out == "BUFF_UPTIME_IN") then if (_detalhes.PotionList [spellid]) then pot_usage [playerName] = spellid + elseif (runes_id [spellid]) then + focus_augmentation [playerName] = true end end @@ -1547,13 +1569,14 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) end _detalhes.pre_pot_used = string_output - _detalhes:SendEvent ("COMBAT_PREPOTION_UPDATED", nil, pot_usage) + _detalhes:SendEvent ("COMBAT_PREPOTION_UPDATED", nil, pot_usage, focus_augmentation) end else local pot_usage = {} - + local focus_augmentation = {} + for buffIndex = 1, 41 do local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL") if (name and unitCaster == "player") then @@ -1564,6 +1587,8 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) if (in_or_out == "BUFF_UPTIME_IN") then if (_detalhes.PotionList [spellid]) then pot_usage [playerName] = spellid + elseif (runes_id [spellid]) then + focus_augmentation [playerName] = true end end @@ -1584,7 +1609,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) end _detalhes.pre_pot_used = string_output - _detalhes:SendEvent ("COMBAT_PREPOTION_UPDATED", nil, pot_usage) + _detalhes:SendEvent ("COMBAT_PREPOTION_UPDATED", nil, pot_usage, focus_augmentation) end @@ -1724,7 +1749,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra) local meu_total = _math_floor (self ["cooldowns_defensive"]) local minha_tabela = self.cooldowns_defensive_spells._ActorTable ---> habilidade usada para interromper +--> spells local cooldowns_usados = {} for _spellid, _tabela in _pairs (minha_tabela) do @@ -1748,7 +1773,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra) GameCooltip:AddLine (Loc ["STRING_NO_SPELL"]) end ---> quem foi que o cara reviveu +--> targets local meus_alvos = self.cooldowns_defensive_targets local alvos = {} @@ -2387,7 +2412,7 @@ function atributo_misc:r_onlyrefresh_shadow (actor) return shadow end - + local somar_keys = function (habilidade, habilidade_tabela1) for key, value in _pairs (habilidade) do if (_type (value) == "number") then @@ -2405,7 +2430,7 @@ end local somar_habilidades = function (container1, container2) for spellid, habilidade in _pairs (container2._ActorTable) do local habilidade_tabela1 = container1:PegaHabilidade (spellid, true, nil, false) - somar_alvos (habilidade.targets, habilidade_tabela1.targets) + somar_alvos (habilidade_tabela1.targets, habilidade.targets) somar_keys (habilidade, habilidade_tabela1) end end diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index cebc974a..f3ca1522 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -1,7 +1,3 @@ ---File Revision: 1 ---Last Modification: 27/07/2013 --- Change Log: - -- 27/07/2013: Finished alpha version. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -25,8 +21,6 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> status bar core functions ---[[ This file contains Api and Internal functions, plus 4 built-in plugins - You can use this four plugins to learn how they works--]] --> hida all micro frames function _detalhes.StatusBar:Hide (instance, side) @@ -289,7 +283,9 @@ local onEnterCooltipTexts = { {text = "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:14:14:0:1:512:512:8:70:224:306|t " .. Loc ["STRING_PLUGIN_TOOLTIP_LEFTBUTTON"]}, {text = "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:14:14:0:1:512:512:8:70:328:409|t " .. Loc ["STRING_PLUGIN_TOOLTIP_RIGHTBUTTON"]}} - + + local on_enter_backdrop = {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16} + local OnEnter = function (frame) --|TTexturePath: size X: size Y: point offset Y X : texture size : coordx1 L : coordx2 R : coordy1 T : coordy2 B |t @@ -297,21 +293,20 @@ _detalhes.OnEnterMainWindow (frame.child.instance) - local passou = 0 - frame:SetScript ("OnUpdate", function (self, elapsed) - passou = passou + elapsed - if (passou > 0.5) then - if (not _detalhes.popup.mouseOver and not _detalhes.popup.buttonOver and not _detalhes.popup.active) then - GameCooltip:Reset() - GameCooltip:AddFromTable (onEnterCooltipTexts) - GameCooltip:SetOption ("TextSize", 9.5) - GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) - GameCooltip:ShowCooltip (frame, "tooltip") - end - self:SetScript ("OnUpdate", nil) - _detalhes.popup.active = true - end - end) + frame:SetBackdrop (on_enter_backdrop) + frame:SetBackdropColor (0.7, 0.7, 0.7, 0.6) + + GameCooltip:Reset() + GameCooltip:AddFromTable (onEnterCooltipTexts) + GameCooltip:SetOption ("TextSize", 9) + GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + + GameCooltip:SetOption ("ButtonHeightMod", -4) + GameCooltip:SetOption ("ButtonsYMod", -4) + GameCooltip:SetOption ("YSpacingMod", -4) + GameCooltip:SetOption ("FixedHeight", 46) + + GameCooltip:ShowCooltip (frame, "tooltip") return true end @@ -319,24 +314,12 @@ --> on leave local OnLeave = function (frame) + frame:SetBackdrop (nil) + _detalhes.OnLeaveMainWindow (frame.child.instance) - if (_detalhes.popup.active) then - local passou = 0 - frame:SetScript ("OnUpdate", function (self, elapsed) - passou = passou+elapsed - if (passou > 0.3) then - if (not _detalhes.popup.mouseOver and not _detalhes.popup.buttonOver and _detalhes.popup.Host == frame) then - _detalhes.popup:ShowMe (false) - end - _detalhes.popup.active = false - self:SetScript ("OnUpdate", nil) - end - end) - else - _detalhes.popup.active = false - frame:SetScript ("OnUpdate", nil) - end + _detalhes.popup:Hide() + return true end @@ -478,6 +461,7 @@ function _detalhes.StatusBar:CreateChildFrame (instance, name, w, h) --local frame = _detalhes.gump:NewPanel (instance.baseframe.cabecalho.fechar, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false) local frame = _detalhes.gump:NewPanel (instance.baseframe, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false) + frame:SetFrameLevel (instance.baseframe:GetFrameLevel()+4) --create widgets local text = _detalhes.gump:NewLabel (frame, nil, "$parentText", "text", "0") @@ -1469,14 +1453,21 @@ window.instance = nil window:SetFrameStrata ("FULLSCREEN") window:DisableGradient() +window:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize=12}) +window:SetBackdropColor (0, 0, 0, 0.9) + local extraWindow = _detalhes.gump:NewPanel (window, nil, "DetailsStatusBarOptions2", "extra", 300, 180) extraWindow:SetPoint ("left", window, "right") extraWindow.close_with_right = true extraWindow.locked = false +extraWindow:Hide() + extraWindow:SetHook ("OnHide", function() window:Hide() end) extraWindow:DisableGradient() +extraWindow:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize=12}) +extraWindow:SetBackdropColor (0, 0, 0, 0.9) --> text style _detalhes.gump:NewLabel (window, _, "$parentTextStyleLabel", "textstyle", Loc ["STRING_PLUGINOPTIONS_TEXTSTYLE"]) diff --git a/core/util.lua b/core/util.lua index 64446da7..4f7f2fe8 100644 --- a/core/util.lua +++ b/core/util.lua @@ -1,8 +1,3 @@ ---File Revision: 1 ---Last Modification: 27/07/2013 --- Change Log: - -- 27/07/2013: Finished alpha version. - ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- local _detalhes = _G._detalhes @@ -219,6 +214,47 @@ end end + function _detalhes.table.dump (t, s, deep) + + s = s or "" + deep = deep or 0 + local space = "" + for i = 1, deep do + space = space .. " " + end + + for key, value in pairs (t) do + + local tpe = _type (value) + + if (type (key) ~= "string") then + key = "unknown?" + end + + if (tpe == "table") then + s = s .. space .. "[" .. key .. "] = |cFFa9ffa9table {|r\n" + s = s .. _detalhes.table.dump (value, nil, deep+1) + s = s .. space .. "|cFFa9ffa9}|r\n" + + elseif (tpe == "string") then + s = s .. space .. "[" .. key .. "] = '|cFFfff1c1" .. value .. "|r'\n" + + elseif (tpe == "number") then + s = s .. space .. "[" .. key .. "] = |cFFffc1f4" .. value .. "|r\n" + + elseif (tpe == "function") then + s = s .. space .. "[" .. key .. "] = function()\n" + + elseif (tpe == "boolean") then + s = s .. space .. "[" .. key .. "] = |cFF99d0ff" .. (value and "true" or "false") .. "|r\n" + + end + + end + + return s + end + function _detalhes:hex (num) local hexstr = '0123456789abcdef' local s = '' diff --git a/core/windows.lua b/core/windows.lua index 6bd928f6..6fb71b0b 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -2598,6 +2598,8 @@ end end + current_combat.enemy = "Illidan Stormrage" + end --old versions dialog diff --git a/functions/slash.lua b/functions/slash.lua index ed51fe9e..a7c145e5 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -120,8 +120,12 @@ function SlashCmdList.DETAILS (msg, editbox) elseif (command == Loc ["STRING_SLASH_CHANGES"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS1"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS2"] or command == "news" or command == "updates") then _detalhes:OpenNewsWindow() + elseif (command == "feedback") then + _detalhes.OpenFeedbackWindow() + -------- debug --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + elseif (msg == "exitlog") then local exitlog = _detalhes_global.exit_log diff --git a/functions/spells.lua b/functions/spells.lua index 5f3afdd3..14cbf5c6 100644 --- a/functions/spells.lua +++ b/functions/spells.lua @@ -1574,6 +1574,7 @@ do --["MAGE"] = {}, [159916] = {120, 6}, -- "Amplify Magic" [157913] = {45, 3, 1}, -- "Evanesce" + [110960] = {90, 20, 1}, -- greater invisibility - 110959 too --["MONK"] = {}, [115295] = {30, 30, 1}, -- Guard @@ -1654,7 +1655,7 @@ do -- Mage [45438] = {300, 12}, -- Ice Block - ["MAGE"] = {45438, 159916, 157913}, + ["MAGE"] = {45438, 159916, 157913, 110960}, -- Monk [122470] = {90, 10}, -- Touch of Karma diff --git a/gumps/janela_news.lua b/gumps/janela_news.lua index 53f87cbc..ba50b0c0 100644 --- a/gumps/janela_news.lua +++ b/gumps/janela_news.lua @@ -10,6 +10,11 @@ function _detalhes:OpenNewsWindow (text_to_show, dumpvalues, keeptext) news_window:Title (Loc ["STRING_NEWS_TITLE"]) if (text_to_show and type (text_to_show) == "table") then + + DetailsNewsWindowLower:SetSize (450, 5000) + DetailsNewsWindowSlider:SetMinMaxValues (0, 5000) + DetailsNewsWindowText:SetHeight (5000) + local s = "" for _, text in ipairs (text_to_show) do if (type (text) == "string" or type (text) == "number") then @@ -18,13 +23,7 @@ function _detalhes:OpenNewsWindow (text_to_show, dumpvalues, keeptext) end if (dumpvalues) then - for key, value in pairs (text_to_show) do - if (type (value) == "function" or type (value) == "table") then - s = s .. "[" .. key .. "] = " .. type (value) .. "\n" - else - s = s .. "[" .. key .. "] = " .. value .. "\n" - end - end + s = _detalhes.table.dump (text_to_show) end if (keeptext) then @@ -87,10 +86,9 @@ function _detalhes:CreateOrOpenNewsWindow() local reinstall = _detalhes.gump:NewLabel (frame, nil, "$parentReinstall", nil, "", "GameFontHighlightLeft", 10) reinstall:SetPoint ("left", textura, "right", 2, -2) reinstall.text = Loc ["STRING_NEWS_REINSTALL"] - - + local frame_upper = CreateFrame ("scrollframe", nil, frame) - local frame_lower = CreateFrame ("frame", nil, frame_upper) + local frame_lower = CreateFrame ("frame", "DetailsNewsWindowLower", frame_upper) frame_lower:SetSize (450, 2000) frame_upper:SetPoint ("topleft", frame, "topleft", 15, -70) frame_upper:SetWidth (465) @@ -102,7 +100,7 @@ function _detalhes:CreateOrOpenNewsWindow() frame_upper:SetBackdropColor (.1, .1, .1, .3) frame_upper:SetScrollChild (frame_lower) - local slider = CreateFrame ("slider", nil, frame) + local slider = CreateFrame ("slider", "DetailsNewsWindowSlider", frame) slider.bg = slider:CreateTexture (nil, "background") slider.bg:SetAllPoints (true) slider.bg:SetTexture (0, 0, 0, 0.5) @@ -134,7 +132,7 @@ function _detalhes:CreateOrOpenNewsWindow() slider:SetValue (current - 20) end end) - + --> text box local texto = frame_lower:CreateFontString ("DetailsNewsWindowText", "overlay", "GameFontNormal") texto:SetPoint ("topleft", frame_lower, "topleft") diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 16277f31..f93b67e1 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -2005,7 +2005,12 @@ function _detalhes:ReportSingleLine (instancia, barra) local actor_name = barra.texto_esquerdo:GetText() or "" actor_name = actor_name:gsub ((".*%."), "") - reportar = {"Details! " .. Loc ["STRING_CUSTOM_REPORT"] .. " " .. instancia.customName .. ": " .. actor_name} + if (instancia.segmento == -1) then --overall + reportar = {"Details!: " .. Loc ["STRING_OVERALL"] .. " " .. instancia.customName .. ": " .. actor_name .. " " .. Loc ["STRING_CUSTOM_REPORT"]} + else + reportar = {"Details!: " .. instancia.customName .. ": " .. actor_name .. " " .. Loc ["STRING_CUSTOM_REPORT"]} + end + --> dump cooltip local GameCooltip = GameCooltip @@ -2016,7 +2021,7 @@ function _detalhes:ReportSingleLine (instancia, barra) end else - reportar = {"Details! " .. Loc ["STRING_REPORT"] .. " " .. _detalhes.sub_atributos [instancia.atributo].lista [instancia.sub_atributo]} + reportar = {"Details!: " .. Loc ["STRING_REPORT"] .. " " .. _detalhes.sub_atributos [instancia.atributo].lista [instancia.sub_atributo]} reportar [#reportar+1] = barra.texto_esquerdo:GetText() .. " " .. barra.texto_direita:GetText() end diff --git a/gumps/janela_welcome.lua b/gumps/janela_welcome.lua index 5798a137..e864d129 100644 --- a/gumps/janela_welcome.lua +++ b/gumps/janela_welcome.lua @@ -233,7 +233,7 @@ local window_openned_at = time() -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> Avatar and Nickname Page - +--[=[ local bg555 = window:CreateTexture (nil, "overlay") bg555:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) bg555:SetPoint ("bottomright", window, "bottomright", -10, 10) @@ -386,508 +386,10 @@ local window_openned_at = time() for _, widget in ipairs (pages[#pages]) do widget:Hide() end +--]=] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---> Skins Page - - --SKINS - - local bg55 = window:CreateTexture (nil, "overlay") - bg55:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) - bg55:SetPoint ("bottomright", window, "bottomright", -10, 10) - bg55:SetHeight (125*3)--125 - bg55:SetWidth (89*3)--82 - bg55:SetAlpha (.05) - bg55:SetTexCoord (1, 0, 0, 1) - - local texto55 = window:CreateFontString (nil, "overlay", "GameFontNormal") - texto55:SetPoint ("topleft", window, "topleft", 20, -80) - texto55:SetText (Loc ["STRING_WELCOME_42"]) - - local texto555 = window:CreateFontString (nil, "overlay", "GameFontNormal") - --texto555:SetPoint ("topleft", window, "topleft", 30, -190) - texto555:SetText (Loc ["STRING_WELCOME_45"]) - texto555:SetTextColor (1, 1, 1, 1) - - local changemind = g:NewLabel (window, _, "$parentChangeMind55Label", "changemind55Label", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange") - window.changemind55Label:SetPoint ("center", window, "center") - window.changemind55Label:SetPoint ("bottom", window, "bottom", 0, 19) - window.changemind55Label.align = "|" - - local texto_appearance = window:CreateFontString (nil, "overlay", "GameFontNormal") - texto_appearance:SetPoint ("topleft", window, "topleft", 30, -110) - texto_appearance:SetText (Loc ["STRING_WELCOME_43"]) - texto_appearance:SetWidth (460) - texto_appearance:SetHeight (100) - texto_appearance:SetJustifyH ("left") - texto_appearance:SetJustifyV ("top") - texto_appearance:SetTextColor (1, 1, 1, 1) - - local skins_image = window:CreateTexture (nil, "overlay") - skins_image:SetTexture ([[Interface\Addons\Details\images\icons2]]) - skins_image:SetPoint ("topright", window, "topright", -30, -24) - skins_image:SetWidth (214) - skins_image:SetHeight (133) - skins_image:SetTexCoord (0, 0.41796875, 0, 0.259765625) --0, 0, 214 133 - - --import settings - local import_label = g:NewLabel (window, _, "$parentImportSettingsLabel", "ImportLabel", Loc ["STRING_WELCOME_46"] .. ":", "GameFontNormal") - import_label:SetPoint ("topleft", window, "topleft", 30, -160) - - local convert_table = { - ["bartexture"] = "row_info-texture", - ["barfont"] = "row_info-font_face", - ["barfontsize"] = "row_info-font_size", - ["barspacing"] = "row_info-space-between", - ["barheight"] = "row_info-height", - ["barbgcolor"] = "row_info-fixed_texture_background_color", - ["reversegrowth"] = "bars_grow_direction", - ["barcolor"] = "row_info-fixed_texture_color", - ["title"] = "attribute_text", - ["background"] = "null" - } - - local onSelectImport = function (_, _, keyname) - --window.ImportDropdown:Select (false) - local addon1_profile = _G.Skada.db.profile.windows [1] - local value = addon1_profile [keyname] - local dvalue = convert_table [keyname] - - if (dvalue) then - - local instance1 = _detalhes:GetInstance (1) - - if (keyname == "barbgcolor") then - instance1.row_info.fixed_texture_background_color[1] = value.r - instance1.row_info.fixed_texture_background_color[2] = value.g - instance1.row_info.fixed_texture_background_color[3] = value.b - instance1.row_info.fixed_texture_background_color[4] = value.a - value = instance1.row_info.fixed_texture_background_color - - elseif (keyname == "title") then - local v = instance1.attribute_text - v.enabled = true - v.text_face = value.font - v.anchor = {-17, 4} - v.text_size = value.fontsize - instance1.color[1], instance1.color[2], instance1.color[3], instance1.color[4] = value.color.r, value.color.g, value.color.b, value.color.a - value = v - - elseif (keyname == "background") then - instance1.bg_alpha = value.color.a - instance1.bg_r = value.color.r - instance1.bg_g = value.color.g - instance1.bg_b = value.color.b - instance1.backdrop_texture = value.texture - - instance1:ChangeSkin() - return - end - - local key1, key2, key3 = strsplit ("-", dvalue) - if (key3) then - instance1 [key1] [key2] [key3] = value - elseif (key2) then - instance1 [key1] [key2] = value - elseif (key1) then - instance1 [key1] = value - end - - instance1:ChangeSkin() - end - - end - - local ImportMenu = function() - local options = {} - if (_G.Skada) then - tinsert (options, {value = "bartexture", label = Loc ["STRING_WELCOME_47"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - tinsert (options, {value = "barfont", label = Loc ["STRING_WELCOME_48"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - tinsert (options, {value = "barfontsize", label = Loc ["STRING_WELCOME_49"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - tinsert (options, {value = "barspacing", label = Loc ["STRING_WELCOME_50"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - tinsert (options, {value = "barheight", label = Loc ["STRING_WELCOME_51"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - tinsert (options, {value = "barbgcolor", label = Loc ["STRING_WELCOME_52"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - tinsert (options, {value = "reversegrowth", label = Loc ["STRING_WELCOME_53"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - tinsert (options, {value = "barcolor", label = Loc ["STRING_WELCOME_54"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - tinsert (options, {value = "title", label = Loc ["STRING_WELCOME_55"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - tinsert (options, {value = "background", label = Loc ["STRING_WELCOME_56"] .. "Skada)", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - --tinsert (options, {value = "", label = "", onclick = onSelectImport, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) - end - return options - end - - local import_dropdown = g:NewDropDown (window, _, "$parentImportDropdown", "ImportDropdown", 140, 20, ImportMenu, false) - import_dropdown:SetPoint ("left", import_label, "right", 2, 0) - import_dropdown.tooltip = Loc ["STRING_WELCOME_57"] - - --wallpapaer and skin - local wallpaper_label_switch = g:NewLabel (window, _, "$parentBackgroundLabel", "enablewallpaperLabel", Loc ["STRING_WELCOME_44"] .. ":", "GameFontNormal") - wallpaper_label_switch:SetPoint ("topleft", window, "topleft", 30, -200) - - --skin - local onSelectSkin = function (_, _, skin_name) - local instance1 = _detalhes:GetInstance (1) - instance1:ChangeSkin (skin_name) - end - - local buildSkinMenu = function() - local skinOptions = {} - for skin_name, skin_table in pairs (_detalhes.skins) do - skinOptions [#skinOptions+1] = {value = skin_name, label = skin_name, onclick = onSelectSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", desc = skin_table.desc} - end - return skinOptions - end - - local instance1 = _detalhes:GetInstance (1) - local skin_dropdown = g:NewDropDown (window, _, "$parentSkinDropdown", "skinDropdown", 140, 20, buildSkinMenu, instance1.skin) - skin_dropdown.tooltip = Loc ["STRING_WELCOME_58"] - - local skin_label = g:NewLabel (window, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"] .. ":", "GameFontNormal") - skin_dropdown:SetPoint ("left", skin_label, "right", 2) - skin_label:SetPoint ("topleft", window, "topleft", 30, -140) - - --skin_dropdown:Select ("WoW Interface") - - --> icon type - local OnSelectIconFile = function (_, _, iconpath) - instance1:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, iconpath) - if (instance1.row_info.use_spec_icons) then - instance1:SetBarSpecIconSettings (false) - end - end - local OnSelectIconFileSpec = function (_, _, iconpath) - instance1:SetBarSpecIconSettings (true, iconpath, true) - end - - local iconsize = {16, 16} - local icontexture = [[Interface\WorldStateFrame\ICONS-CLASSES]] - local iconcoords = {0.25, 0.50, 0, 0.25} - local list = { - {value = [[]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE1"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize, iconcolor = {1, 1, 1, .3}}, - {value = [[Interface\AddOns\Details\images\classes_small]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE2"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, - {value = [[Interface\AddOns\Details\images\spec_icons_normal]], label = "Specialization", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize}, - {value = [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], label = "Specialization Alpha", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize}, - {value = [[Interface\AddOns\Details\images\classes_small_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE3"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, - {value = [[Interface\AddOns\Details\images\classes_small_alpha]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE4"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, - {value = [[Interface\AddOns\Details\images\classes_small_alpha_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE6"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, - {value = [[Interface\AddOns\Details\images\classes]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE5"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, - } - local BuiltIconList = function() - return list - end - - local default - if (instance1.row_info.use_spec_icons) then - default = instance1.row_info.spec_file - else - default = instance1.row_info.icon_file - end - - local d = g:NewDropDown (window, _, "$parentIconSelectDropdown", "IconSelectDropdown", 140, 20, BuiltIconList, default) - - g:NewLabel (window, _, "$parentIconsAnchor", "rowIconsLabel", Loc ["STRING_OPTIONS_TEXT_ROWICONS_ANCHOR"], "GameFontNormal") - - d:SetPoint ("left", window.rowIconsLabel, "right", 2) - window.rowIconsLabel:SetPoint ("topleft", window, "topleft", 30, -180) - - --wallpapper - --> agora cria os 2 dropdown da categoria e wallpaper - - local onSelectSecTexture = function (_, _, texturePath) - if (texturePath:find ("TALENTFRAME")) then - instance1:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 0.703125}, nil, nil, {1, 1, 1, 1}) - elseif (texturePath:find ("EncounterJournal")) then - instance1:InstanceWallpaper (texturePath, nil, nil, {0.06, 0.68, 0.1, 0.57}, nil, nil, {1, 1, 1, 1}) - else - instance1:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 1}, nil, nil, {1, 1, 1, 1}) - end - end - - local subMenu = { - - ["ARCHEOLOGY"] = { - {value = [[Interface\ARCHEOLOGY\Arch-BookCompletedLeft]], label = "Book Wallpaper", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-BookCompletedLeft]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\Arch-BookItemLeft]], label = "Book Wallpaper 2", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-BookItemLeft]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\Arch-Race-DraeneiBIG]], label = "Draenei", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-Race-DraeneiBIG]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\Arch-Race-DwarfBIG]], label = "Dwarf", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-Race-DwarfBIG]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\Arch-Race-NightElfBIG]], label = "Night Elf", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-Race-NightElfBIG]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\Arch-Race-OrcBIG]], label = "Orc", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-Race-OrcBIG]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\Arch-Race-PandarenBIG]], label = "Pandaren", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-Race-PandarenBIG]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\Arch-Race-TrollBIG]], label = "Troll", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-Race-TrollBIG]], texcoord = nil}, - - {value = [[Interface\ARCHEOLOGY\ArchRare-AncientShamanHeaddress]], label = "Ancient Shaman", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-AncientShamanHeaddress]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-BabyPterrodax]], label = "Baby Pterrodax", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-BabyPterrodax]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-ChaliceMountainKings]], label = "Chalice Mountain Kings", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-ChaliceMountainKings]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-ClockworkGnome]], label = "Clockwork Gnomes", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-ClockworkGnome]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-QueenAzsharaGown]], label = "Queen Azshara Gown", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-QueenAzsharaGown]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-QuilinStatue]], label = "Quilin Statue", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-QuilinStatue]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\Arch-TempRareSketch]], label = "Rare Sketch", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-TempRareSketch]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-ScepterofAzAqir]], label = "Scepter of Az Aqir", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-ScepterofAzAqir]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-ShriveledMonkeyPaw]], label = "Shriveled Monkey Paw", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-ShriveledMonkeyPaw]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-StaffofAmmunrae]], label = "Staff of Ammunrae", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-StaffofAmmunrae]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-TinyDinosaurSkeleton]], label = "Tiny Dinosaur", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-TinyDinosaurSkeleton]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-TyrandesFavoriteDoll]], label = "Tyrandes Favorite Doll", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-TyrandesFavoriteDoll]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ArchRare-ZinRokhDestroyer]], label = "ZinRokh Destroyer", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-ZinRokhDestroyer]], texcoord = nil}, - }, - - ["RAIDS"] = { - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockCaverns]], label = "Blackrock Caverns", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockCaverns]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockSpire]], label = "Blackrock Spire", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockSpire]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-DragonSoul]], label = "Dragon Soul", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-DragonSoul]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-EndTime]], label = "End Time", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-EndTime]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-Firelands1]], label = "Firelands", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-Firelands1]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-HallsofReflection]], label = "Halls of Reflection", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-HallsofReflection]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireCitadel]], label = "Hellfire Citadel", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireCitadel]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-Pandaria]], label = "Pandaria", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-Pandaria]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-RagefireChasm]], label = "Ragefire Chasm", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-RagefireChasm]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-SiegeofOrgrimmar]], label = "Siege of Orgrimmar", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-SiegeofOrgrimmar]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheNexus]], label = "The Nexus", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheNexus]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheOculus]], label = "The Oculus", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheOculus]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheStonecore]], label = "The Stonecore", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheStonecore]], texcoord = nil}, - {value = [[Interface\EncounterJournal\UI-EJ-LOREBG-ThunderKingRaid]], label = "Throne of Thunder", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-ThunderKingRaid]], texcoord = nil}, - }, - - ["LOGOS"] = { - {value = [[Interface\Timer\Alliance-Logo]], label = "For the Alliance", onclick = onSelectSecTexture, icon = [[Interface\Timer\Alliance-Logo]], texcoord = nil}, - {value = [[Interface\Timer\Horde-Logo]], label = "For the Horde", onclick = onSelectSecTexture, icon = [[Interface\Timer\Horde-Logo]], texcoord = nil}, - {value = [[Interface\Destiny\EndscreenImage]], label = "Pandaria Logo", onclick = onSelectSecTexture, icon = [[Interface\Destiny\EndscreenImage]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ARCH-RACE-ORC]], label = "Orc Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-ORC]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ARCH-RACE-DWARF]], label = "Dwarf Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-DWARF]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ARCH-RACE-NIGHTELF]], label = "Night Elf Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-NIGHTELF]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\Arch-Race-Pandaren]], label = "Padaren Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-Race-Pandaren]], texcoord = nil}, - {value = [[Interface\ARCHEOLOGY\ARCH-RACE-TROLL]], label = "Troll Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-TROLL]], texcoord = nil}, - {value = [[Interface\FlavorImages\BloodElfLogo-small]], label = "Blood Elf Crest", onclick = onSelectSecTexture, icon = [[Interface\FlavorImages\BloodElfLogo-small]], texcoord = nil}, - {value = [[Interface\Glues\COMMON\Glues-Logo]], label = "Wow Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\Glues-Logo]], texcoord = nil}, - {value = [[Interface\Glues\COMMON\GLUES-WOW-BCLOGO]], label = "Burning Cruzade Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\GLUES-WOW-BCLOGO]], texcoord = nil}, - {value = [[Interface\Glues\COMMON\GLUES-WOW-CCLOGO]], label = "Cataclysm Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\GLUES-WOW-CCLOGO]], texcoord = nil}, - {value = [[Interface\Glues\COMMON\Glues-WOW-WoltkLogo]], label = "WotLK Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\Glues-WOW-WoltkLogo]], texcoord = nil}, - }, - - ["CREDITS"] = { - {value = [[Interface\Glues\CREDITS\Arakkoa2]], label = "Arakkoa", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Arakkoa2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Arcane_Golem2]], label = "Arcane Golem", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Arcane_Golem2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Badlands3]], label = "Badlands", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Badlands3]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\BD6]], label = "Draenei", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\BD6]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Draenei_Character1]], label = "Draenei 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_Character1]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Draenei_Character2]], label = "Draenei 3", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_Character2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Draenei_Crest2]], label = "Draenei Crest", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_Crest2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Draenei_Female2]], label = "Draenei 4", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_Female2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Draenei2]], label = "Draenei 5", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Blood_Elf_One1]], label = "Kael'thas", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Blood_Elf_One1]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\BD2]], label = "Blood Elf", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\BD2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\BloodElf_Priestess_Master2]], label = "Blood elf 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\BloodElf_Priestess_Master2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Female_BloodElf2]], label = "Blood Elf 3", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Female_BloodElf2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\CinSnow01TGA3]], label = "Cin Snow", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\CinSnow01TGA3]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\DalaranDomeTGA3]], label = "Dalaran", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\DalaranDomeTGA3]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Darnasis5]], label = "Darnasus", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Darnasis5]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Draenei_CityInt5]], label = "Exodar", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Draenei_CityInt5]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Shattrath6]], label = "Shattrath", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Shattrath6]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Demon_Chamber2]], label = "Demon Chamber", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Demon_Chamber2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Demon_Chamber6]], label = "Demon Chamber 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Demon_Chamber6]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Dwarfhunter1]], label = "Dwarf Hunter", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Dwarfhunter1]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Fellwood5]], label = "Fellwood", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Fellwood5]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\HordeBanner1]], label = "Horde Banner", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\HordeBanner1]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Illidan_Concept1]], label = "Illidan", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Illidan_Concept1]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Illidan1]], label = "Illidan 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Illidan1]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Naaru_CrashSite2]], label = "Naaru Crash", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Naaru_CrashSite2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\NightElves1]], label = "Night Elves", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\NightElves1]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Ocean2]], label = "Mountain", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Ocean2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Tempest_Keep2]], label = "Tempest Keep", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Tempest_Keep2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Tempest_Keep6]], label = "Tempest Keep 2", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Tempest_Keep6]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Terrokkar6]], label = "Terrokkar", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Terrokkar6]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\ThousandNeedles2]], label = "Thousand Needles", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\ThousandNeedles2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\Troll2]], label = "Troll", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Troll2]], texcoord = nil}, - {value = [[Interface\Glues\CREDITS\LESSERELEMENTAL_FIRE_03B1]], label = "Fire Elemental", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\LESSERELEMENTAL_FIRE_03B1]], texcoord = nil}, - }, - - ["DEATHKNIGHT"] = { - {value = [[Interface\TALENTFRAME\bg-deathknight-blood]], label = "Blood", onclick = onSelectSecTexture, icon = [[Interface\ICONS\Spell_Deathknight_BloodPresence]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-deathknight-frost]], label = "Frost", onclick = onSelectSecTexture, icon = [[Interface\ICONS\Spell_Deathknight_FrostPresence]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-deathknight-unholy]], label = "Unholy", onclick = onSelectSecTexture, icon = [[Interface\ICONS\Spell_Deathknight_UnholyPresence]], texcoord = nil} - }, - - ["DRESSUP"] = { - {value = [[Interface\DRESSUPFRAME\DressUpBackground-BloodElf1]], label = "Blood Elf", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.5, 0.625, 0.75, 1}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-DeathKnight1]], label = "Death Knight", onclick = onSelectSecTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DEATHKNIGHT"]}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-Draenei1]], label = "Draenei", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.5, 0.625, 0.5, 0.75}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-Dwarf1]], label = "Dwarf", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.125, 0.25, 0, 0.25}}, - {value = [[Interface\DRESSUPFRAME\DRESSUPBACKGROUND-GNOME1]], label = "Gnome", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.25, 0.375, 0, 0.25}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-Goblin1]], label = "Goblin", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.625, 0.75, 0.75, 1}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-Human1]], label = "Human", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0, 0.125, 0.5, 0.75}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-NightElf1]], label = "Night Elf", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.375, 0.5, 0, 0.25}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-Orc1]], label = "Orc", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.375, 0.5, 0.25, 0.5}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-Pandaren1]], label = "Pandaren", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.75, 0.875, 0.5, 0.75}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-Tauren1]], label = "Tauren", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0, 0.125, 0.25, 0.5}}, - {value = [[Interface\DRESSUPFRAME\DRESSUPBACKGROUND-TROLL1]], label = "Troll", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.25, 0.375, 0.75, 1}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-Scourge1]], label = "Undead", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.125, 0.25, 0.75, 1}}, - {value = [[Interface\DRESSUPFRAME\DressUpBackground-Worgen1]], label = "Worgen", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.625, 0.75, 0, 0.25}}, - }, - - ["DRUID"] = { - {value = [[Interface\TALENTFRAME\bg-druid-bear]], label = "Guardian", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_racial_bearform]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-druid-restoration]], label = "Restoration", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_nature_healingtouch]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-druid-cat]], label = "Feral", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_shadow_vampiricaura]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-druid-balance]], label = "Balance", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_nature_starfall]], texcoord = nil} - }, - - ["HUNTER"] = { - {value = [[Interface\TALENTFRAME\bg-hunter-beastmaster]], label = "Beast Mastery", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_hunter_bestialdiscipline]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-hunter-marksman]], label = "Marksmanship", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_hunter_focusedaim]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-hunter-survival]], label = "Survival", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_hunter_camouflage]], texcoord = nil} - }, - - ["MAGE"] = { - {value = [[Interface\TALENTFRAME\bg-mage-arcane]], label = "Arcane", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_holy_magicalsentry]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-mage-fire]], label = "Fire", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_fire_firebolt02]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-mage-frost]], label = "Frost", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_frost_frostbolt02]], texcoord = nil} - }, - - ["MONK"] = { - {value = [[Interface\TALENTFRAME\bg-monk-brewmaster]], label = "Brewmaster", onclick = onSelectSecTexture, icon = [[Interface\ICONS\monk_stance_drunkenox]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-monk-mistweaver]], label = "Mistweaver", onclick = onSelectSecTexture, icon = [[Interface\ICONS\monk_stance_wiseserpent]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-monk-battledancer]], label = "Windwalker", onclick = onSelectSecTexture, icon = [[Interface\ICONS\monk_stance_whitetiger]], texcoord = nil} - }, - - ["PALADIN"] = { - {value = [[Interface\TALENTFRAME\bg-paladin-holy]], label = "Holy", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_holy_holybolt]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-paladin-protection]], label = "Protection", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_paladin_shieldofthetemplar]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-paladin-retribution]], label = "Retribution", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_holy_auraoflight]], texcoord = nil} - }, - - ["PRIEST"] = { - {value = [[Interface\TALENTFRAME\bg-priest-discipline]], label = "Discipline", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_holy_powerwordshield]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-priest-holy]], label = "Holy", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_holy_guardianspirit]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-priest-shadow]], label = "Shadow", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_shadow_shadowwordpain]], texcoord = nil} - }, - - ["ROGUE"] = { - {value = [[Interface\TALENTFRAME\bg-rogue-assassination]], label = "Assassination", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_rogue_eviscerate]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-rogue-combat]], label = "Combat", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_backstab]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-rogue-subtlety]], label = "Subtlety", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_stealth]], texcoord = nil} - }, - - ["SHAMAN"] = { - {value = [[Interface\TALENTFRAME\bg-shaman-elemental]], label = "Elemental", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_nature_lightning]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-shaman-enhancement]], label = "Enhancement", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_nature_lightningshield]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-shaman-restoration]], label = "Restoration", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_nature_magicimmunity]], texcoord = nil} - }, - - ["WARLOCK"] = { - {value = [[Interface\TALENTFRAME\bg-warlock-affliction]], label = "Affliction", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_shadow_deathcoil]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-warlock-demonology]], label = "Demonology", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_shadow_metamorphosis]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-warlock-destruction]], label = "Destruction", onclick = onSelectSecTexture, icon = [[Interface\ICONS\spell_shadow_rainoffire]], texcoord = nil} - }, - ["WARRIOR"] = { - {value = [[Interface\TALENTFRAME\bg-warrior-arms]], label = "Arms", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_warrior_savageblow]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-warrior-fury]], label = "Fury", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_warrior_innerrage]], texcoord = nil}, - {value = [[Interface\TALENTFRAME\bg-warrior-protection]], label = "Protection", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_warrior_defensivestance]], texcoord = nil} - }, - } - - local buildBackgroundMenu2 = function() - return subMenu [window.backgroundDropdown.value] or {label = "-- -- --", value = 0} - end - - local onSelectMainTexture = function (_, _, choose) - window.backgroundDropdown2:Select (choose) - end - - local backgroundTable = { - {value = "ARCHEOLOGY", label = "Archeology", onclick = onSelectMainTexture, icon = [[Interface\ARCHEOLOGY\Arch-Icon-Marker]]}, - {value = "CREDITS", label = "Burning Crusade", onclick = onSelectMainTexture, icon = [[Interface\ICONS\TEMP]]}, - {value = "LOGOS", label = "Logos", onclick = onSelectMainTexture, icon = [[Interface\WorldStateFrame\ColumnIcon-FlagCapture0]]}, - {value = "DRESSUP", label = "Race Background", onclick = onSelectMainTexture, icon = [[Interface\ICONS\INV_Chest_Cloth_17]]}, - {value = "RAIDS", label = "Dungeons & Raids", onclick = onSelectMainTexture, icon = [[Interface\COMMON\friendship-FistHuman]]}, - {value = "DEATHKNIGHT", label = "Death Knight", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DEATHKNIGHT"]}, - {value = "DRUID", label = "Druid", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DRUID"]}, - {value = "HUNTER", label = "Hunter", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["HUNTER"]}, - {value = "MAGE", label = "Mage", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["MAGE"]}, - {value = "MONK", label = "Monk", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["MONK"]}, - {value = "PALADIN", label = "Paladin", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["PALADIN"]}, - {value = "PRIEST", label = "Priest", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["PRIEST"]}, - {value = "ROGUE", label = "Rogue", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["ROGUE"]}, - {value = "SHAMAN", label = "Shaman", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["SHAMAN"]}, - {value = "WARLOCK", label = "Warlock", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["WARLOCK"]}, - {value = "WARRIOR", label = "Warrior", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["WARRIOR"]}, - } - local buildBackgroundMenu = function() return backgroundTable end - - local wallpaper_switch = g:NewSwitch (window, _, "$parentUseBackgroundSlider", "useBackgroundSlider", 60, 20, _, _, instance.wallpaper.enabled) - wallpaper_switch.tooltip = Loc ["STRING_WELCOME_59"] - local wallpaper_dropdown1 = g:NewDropDown (window, _, "$parentBackgroundDropdown", "backgroundDropdown", 150, 20, buildBackgroundMenu, nil) - local wallpaper_dropdown2 = g:NewDropDown (window, _, "$parentBackgroundDropdown2", "backgroundDropdown2", 150, 20, buildBackgroundMenu2, nil) - - wallpaper_switch:SetPoint ("left", wallpaper_label_switch, "right", 2) - wallpaper_dropdown1:SetPoint ("left", wallpaper_switch, "right", 2) - wallpaper_dropdown2:SetPoint ("left", wallpaper_dropdown1, "right", 2) - - function _detalhes:WelcomeWallpaperRefresh() - local spec = GetSpecialization() - if (spec) then - local id, name, description, icon, _background, role = GetSpecializationInfo (spec) - if (_background) then - local _, class = UnitClass ("player") - - local titlecase = function (first, rest) - return first:upper()..rest:lower() - end - class = class:gsub ("(%a)([%w_']*)", titlecase) - - local bg = "Interface\\TALENTFRAME\\" .. _background - - wallpaper_dropdown1:Select (class) - wallpaper_dropdown2:Select (1, true) - - instance.wallpaper.texture = bg - instance.wallpaper.texcoord = {0, 1, 0, 0.703125} - - end - end - end - - _detalhes:ScheduleTimer ("WelcomeWallpaperRefresh", 5) - - wallpaper_switch.OnSwitch = function (_, _, value) - instance.wallpaper.enabled = value - if (value) then - --> primeira vez que roda: - if (not instance.wallpaper.texture) then - local spec = GetSpecialization() - if (spec) then - local id, name, description, icon, _background, role = GetSpecializationInfo (spec) - if (_background) then - instance.wallpaper.texture = "Interface\\TALENTFRAME\\".._background - end - end - instance.wallpaper.texcoord = {0, 1, 0, 0.703125} - end - - instance.wallpaper.alpha = 0.35 - - instance:InstanceWallpaper (true) - else - instance:InstanceWallpaper (false) - end - end - - local created_test_bars = 0 - local skins_frame_alert = CreateFrame ("frame", nil, window) - skins_frame_alert:SetScript ("OnShow", function() - if (created_test_bars < 2) then - _detalhes:CreateTestBars() - created_test_bars = created_test_bars + 1 - end - end) - - pages [#pages+1] = {import_label, import_dropdown, skins_frame_alert, bg55, texto55, texto555, skins_image, changemind, texto_appearance, skin_dropdown, skin_label, wallpaper_label_switch, wallpaper_switch, wallpaper_dropdown1, wallpaper_dropdown2, window.rowIconsLabel, window.IconSelectDropdown} - - for _, widget in ipairs (pages[#pages]) do - widget:Hide() - end - --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> page 2 - + -- DPS effective or active local ampulheta = window:CreateTexture (nil, "overlay") @@ -962,11 +464,484 @@ local window_openned_at = time() chronometer:SetScript ("OnClick", function() continuous:SetChecked (false); _detalhes.time_type = 1 end) continuous:SetScript ("OnClick", function() chronometer:SetChecked (false); _detalhes.time_type = 2 end) - pages [#pages+1] = {thedude, sword_icon, ampulheta, texto2, chronometer, continuous, chronometer_text, continuous_text, window.changemind2Label} + -- + + local pleasewait = window:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + pleasewait:SetPoint ("bottomright", forward, "topright") + + local free_frame3 = CreateFrame ("frame", nil, window) + function _detalhes:FreeTutorialFrame3() + if (window_openned_at+10 > time()) then + pleasewait:Show() + forward:Disable() + pleasewait:SetText ("wait... " .. window_openned_at + 10 - time()) + else + pleasewait:Hide() + pleasewait:SetText ("") + forward:Enable() + _detalhes:CancelTimer (window.free_frame3_schedule) + window.free_frame3_schedule = nil + end + end + free_frame3:SetScript ("OnShow", function() + if (window_openned_at-10 > time()) then + forward:Disable() + if (window.free_frame3_schedule) then + _detalhes:CancelTimer (window.free_frame3_schedule) + window.free_frame3_schedule = nil + end + window.free_frame3_schedule = _detalhes:ScheduleRepeatingTimer ("FreeTutorialFrame3", 1) + end + end) + free_frame3:SetScript ("OnHide", function() + if (window.free_frame3_schedule) then + _detalhes:CancelTimer (window.free_frame3_schedule) + window.free_frame3_schedule = nil + pleasewait:SetText ("") + pleasewait:Hide() + end + end) + + pages [#pages+1] = {pleasewait, free_frame3, thedude, sword_icon, ampulheta, texto2, chronometer, continuous, chronometer_text, continuous_text, window.changemind2Label} + for _, widget in ipairs (pages[#pages]) do widget:Hide() end +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> Skins Page + + --SKINS + + local bg55 = window:CreateTexture (nil, "overlay") + bg55:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) + bg55:SetPoint ("bottomright", window, "bottomright", -10, 10) + bg55:SetHeight (125*3) + bg55:SetWidth (89*3) + bg55:SetAlpha (.05) + bg55:SetTexCoord (1, 0, 0, 1) + + local texto55 = window:CreateFontString (nil, "overlay", "GameFontNormal") + texto55:SetPoint ("topleft", window, "topleft", 20, -80) + texto55:SetText (Loc ["STRING_WELCOME_42"]) + + local texto555 = window:CreateFontString (nil, "overlay", "GameFontNormal") + texto555:SetText (Loc ["STRING_WELCOME_45"]) + texto555:SetTextColor (1, 1, 1, 1) + + local changemind = g:NewLabel (window, _, "$parentChangeMind55Label", "changemind55Label", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange") + window.changemind55Label:SetPoint ("center", window, "center") + window.changemind55Label:SetPoint ("bottom", window, "bottom", 0, 19) + window.changemind55Label.align = "|" + + local texto_appearance = window:CreateFontString (nil, "overlay", "GameFontNormal") + texto_appearance:SetPoint ("topleft", window, "topleft", 30, -110) + texto_appearance:SetText (Loc ["STRING_WELCOME_43"]) + texto_appearance:SetWidth (460) + texto_appearance:SetHeight (100) + texto_appearance:SetJustifyH ("left") + texto_appearance:SetJustifyV ("top") + texto_appearance:SetTextColor (1, 1, 1, 1) + + local skins_image = window:CreateTexture (nil, "overlay") + skins_image:SetTexture ([[Interface\Addons\Details\images\icons2]]) + skins_image:SetPoint ("topright", window, "topright", -50, -24) + skins_image:SetWidth (214*0.7) + skins_image:SetHeight (133*0.7) + skins_image:SetTexCoord (0, 0.41796875, 0, 0.259765625) --0, 0, 214 133 + + --import settings + local import_label = g:NewLabel (window, _, "$parentImportSettingsLabel", "ImportLabel", Loc ["STRING_WELCOME_46"] .. ":", "GameFontNormal") + import_label:SetPoint ("topleft", window, "topleft", 30, -170) + + local onSelectImportRct = function (_, _, cluster_name) + for i = 1, 2 do + + local addon1_profile = _G.Recount.db.profile + local instance1 = _detalhes:GetInstance (i) + + if (addon1_profile and instance1) then + + if (cluster_name == "title_bar") then + + local buttons = addon1_profile.MainWindow.Buttons + instance1.menu_icons[2] = buttons.FileButton + instance1.menu_icons[4] = buttons.ReportButton + instance1.menu_icons[5] = buttons.ResetButton + instance1.menu_icons[6] = false --close button + + elseif (cluster_name == "bars") then + + local row_info = instance1.row_info + row_info.space.between = addon1_profile.RowSpacing + row_info.height = addon1_profile.RowHeight + + + + elseif (cluster_name == "window") then + + local w, h = addon1_profile.MainWindow.Position.w, addon1_profile.MainWindow.Position.h + instance1.posicao.normal.w = w + instance1.posicao.normal.h = h + + instance1:RestoreMainWindowPosition() + + end + + end + + end + end + + local onSelectImportSkd = function (_, _, cluster_name) + + for i = 1, 2 do + + local addon1_profile = _G.Skada.db.profile.windows [i] + local instance1 = _detalhes:GetInstance (i) + + if (addon1_profile and instance1) then + + if (cluster_name == "title_bar") then + + local value = addon1_profile ["title"] + local v = instance1.attribute_text + v.enabled = true + v.text_face = value.font + v.anchor = {-17, 4} + v.text_size = value.fontsize + v.shadow = value.fontflags ~= '' + instance1.color[1], instance1.color[2], instance1.color[3], instance1.color[4] = value.color.r, value.color.g, value.color.b, value.color.a + instance1:StatusBarColor (value.color.r, value.color.g, value.color.b, value.color.a) + instance1.attribute_text = v + + local buttons = addon1_profile.buttons + instance1.menu_icons[2] = buttons.segment + instance1.menu_icons[4] = buttons.report + instance1.menu_icons[5] = buttons.reset + instance1.menu_icons[6] = false --close button + + instance1:ChangeSkin() + + elseif (cluster_name == "bars") then + + instance1:SetBarSettings (nil, nil, nil, nil, "DGround") + + local row_info = instance1.row_info + row_info.texture = addon1_profile.bartexture + + row_info.font_face = addon1_profile.barfont + row_info.font_size = addon1_profile.barfontsize + row_info.space.between = addon1_profile.barspacing + row_info.height = addon1_profile.barheight + row_info.textL_outline = addon1_profile.barfontflags ~= "" + row_info.textR_outline = addon1_profile.barfontflags ~= "" + row_info.texture_class_colors = addon1_profile.classcolorbars + + local bg_color = row_info.fixed_texture_background_color + local barbgcolor = addon1_profile.barbgcolor + bg_color[1], bg_color[2], bg_color[3], bg_color[4] = barbgcolor.r, barbgcolor.g, barbgcolor.b, barbgcolor.a + + local bar_color = row_info.fixed_texture_color + local barcolor = addon1_profile.barcolor + bar_color[1], bar_color[2], bar_color[3], bar_color[4] = barcolor.r, barcolor.g, barcolor.b, barcolor.a + + instance1.bars_grow_direction = addon1_profile.reversegrowth and 2 or 1 + + instance1:ChangeSkin() + + elseif (cluster_name == "window") then + local value = addon1_profile.background + + if (value.color.r ~= 0 or value.color.g ~= 0 or value.color.b ~= 0.5) then + instance1.bg_alpha = value.color.a/2 + instance1.bg_r = value.color.r + instance1.bg_g = value.color.g + instance1.bg_b = value.color.b + instance1.backdrop_texture = value.texture + end + + instance1.libwindow.x = addon1_profile.x + instance1.libwindow.y = addon1_profile.y + instance1.libwindow.point = addon1_profile.point + instance1.libwindow.scale = addon1_profile.scale + + local w, h = addon1_profile.barwidth, addon1_profile.background.height + instance1.posicao.normal.w = w + instance1.posicao.normal.h = h + + instance1:RestoreMainWindowPosition() + instance1:ChangeSkin() + + for _, win in ipairs (_G.Skada:GetWindows()) do + if (win:IsShown()) then + win.db.hidden = true + win:Hide() + end + end + + end + + end + + end + + end + + local ImportMenu = function() + local options = {} + if (_G.Skada) then + tinsert (options, {value = "title_bar", label = Loc ["STRING_WELCOME_70"] .. " (Skada)", onclick = onSelectImportSkd, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) + tinsert (options, {value = "bars", label = Loc ["STRING_WELCOME_71"] .. " (Skada)", onclick = onSelectImportSkd, icon = [[Interface\FriendsFrame\StatusIcon-Online]]}) + tinsert (options, {value = "window", label = Loc ["STRING_WELCOME_72"] .. " (Skada)", onclick = onSelectImportSkd, icon = [[Interface\FriendsFrame\StatusIcon-Online]], desc = "This option will hide Skada windows to avoid overlap on the same position. Use the command '/skada toggle' to bring it back again."}) + end + + return options + end + + local import_dropdown = g:NewDropDown (window, _, "$parentImportDropdown", "ImportDropdown", 140, 20, ImportMenu, false) + import_dropdown:SetPoint ("left", import_label, "right", 2, 0) + import_dropdown.tooltip = Loc ["STRING_WELCOME_57"] + + if (not _G.Skada) then + import_dropdown:Disable() + import_label:SetTextColor (1, 0.8, 0, 0.3) + end + + --skin + local onSelectSkin = function (_, _, skin_name) + local instance1 = _detalhes:GetInstance (1) + if (instance1) then + instance1:ChangeSkin (skin_name) + end + local instance2 = _detalhes:GetInstance (2) + if (instance2) then + instance2:ChangeSkin (skin_name) + end + end + + local buildSkinMenu = function() + local skinOptions = {} + for skin_name, skin_table in pairs (_detalhes.skins) do + skinOptions [#skinOptions+1] = {value = skin_name, label = skin_name, onclick = onSelectSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", desc = skin_table.desc} + end + return skinOptions + end + + local instance1 = _detalhes:GetInstance (1) + local skin_dropdown = g:NewDropDown (window, _, "$parentSkinDropdown", "skinDropdown", 140, 20, buildSkinMenu, instance1.skin) + skin_dropdown.tooltip = Loc ["STRING_WELCOME_58"] + + local skin_label = g:NewLabel (window, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"] .. ":", "GameFontNormal") + skin_dropdown:SetPoint ("left", skin_label, "right", 2) + skin_label:SetPoint ("topleft", window, "topleft", 30, -140) + + -- create second window button + local new_window = function (_, _, self) + if (#_detalhes.tabela_instancias == 1) then + local newwindow = _detalhes:CreateInstance (true) + newwindow.baseframe:SetPoint ("topleft", _detalhes.tabela_instancias[1].baseframe, "topright", 50, 0) + newwindow.baseframe:SetPoint ("bottomleft", _detalhes.tabela_instancias[1].baseframe, "bottomright", 50, 0) + newwindow:SaveMainWindowPosition() + newwindow:RestoreMainWindowPosition() + end + self.MyObject:Disable() + end + local create_window_button = g:CreateButton (window, new_window, 150, 16, "Create 2nd Window") + create_window_button:InstallCustomTexture() + create_window_button:SetIcon ([[Interface\FriendsFrame\UI-FriendsList-Large-Up]], nil, nil, nil, {5/32, 26/32, 6/32, 26/32}, nil, 4, 2) + create_window_button:SetPoint ("topright", window, "topright", -70, -127) + + if (#_detalhes.tabela_instancias == 2) then + create_window_button:Disable() + end + + -- window color + window.editing_window = nil + local windowcolor_callback = function (button, r, g, b, a) + local instance = window.editing_window + + if (instance.menu_alpha.enabled and a ~= instance.color[4]) then + _detalhes:Msg (Loc ["STRING_OPTIONS_MENU_ALPHAWARNING"]) + instance:InstanceColor (r, g, b, instance.menu_alpha.onleave, nil, true) + + if (_detalhes.options_group_edit) then + for _, this_instance in ipairs (instance:GetInstanceGroup()) do + if (this_instance ~= instance) then + this_instance:InstanceColor (r, g, b, instance.menu_alpha.onleave, nil, true) + end + end + end + + return + end + + instance:InstanceColor (r, g, b, a, nil, true) + if (_detalhes.options_group_edit) then + for _, this_instance in ipairs (instance:GetInstanceGroup()) do + if (this_instance ~= instance) then + this_instance:InstanceColor (r, g, b, a, nil, true) + end + end + end + + local instance2 = _detalhes:GetInstance (2) + if (instance2) then + instance2:InstanceColor (r, g, b, a, nil, true) + end + end + + local change_color = function() + window.editing_window = _detalhes:GetInstance (1) + local r, g, b, a = unpack (window.editing_window.color) + _detalhes.gump:ColorPick (window, r, g, b, a, windowcolor_callback) + end + + local window_color = g:CreateButton (window, change_color, 150, 16, "Change Color") + window_color:SetPoint ("topleft", create_window_button, "bottomleft", 0, -2) + window_color:InstallCustomTexture() + window_color:SetIcon ([[Interface\AddOns\Details\images\icons]], 14, 14, nil, {434/512, 466/512, 277/512, 307/512}, nil, 4, 2) + + -- show statusbar + g:NewSwitch (window, _, "$parentStatusbarSlider", "statusbarSlider", 60, 20, _, _, _detalhes:GetInstance(1).show_statusbar) + g:NewLabel (window, _, "$parentStatusbarLabel", "statusbarLabel", Loc ["STRING_OPTIONS_SHOW_STATUSBAR"] .. ":", "GameFontNormal") + + window.statusbarLabel:SetPoint ("topleft", window_color, "bottomleft", 0, -8) + window.statusbarSlider:SetPoint ("left", window.statusbarLabel, "right", 2, -1) + window.statusbarSlider:SetFixedParameter (_detalhes:GetInstance (1)) + + window.statusbarSlider.OnSwitch = function (self, instance, value) + instance = _detalhes:GetInstance (1) + if (value) then + instance:ShowStatusBar() + else + instance:HideStatusBar() + end + + local instance2 = _detalhes:GetInstance (2) + if (instance2) then + if (value) then + instance2:ShowStatusBar() + else + instance2:HideStatusBar() + end + end + + instance:BaseFrameSnap() + end + + -- bar texture + local texture_icon = [[Interface\TARGETINGFRAME\UI-PhasingIcon]] + local texture_icon = [[Interface\AddOns\Details\images\icons]] + local texture_icon_size = {14, 14} + local texture_texcoord = {469/512, 505/512, 249/512, 284/512} + + --texture + local onSelectTexture = function (_, instance, textureName) + instance:SetBarSettings (nil, textureName) + + if (_detalhes.options_group_edit) then + for _, this_instance in ipairs (instance:GetInstanceGroup()) do + if (this_instance ~= instance) then + this_instance:SetBarSettings (nil, textureName) + end + end + end + + local instance2 = _detalhes:GetInstance (2) + if (instance2) then + instance2:SetBarSettings (nil, textureName) + end + end + + local buildTextureMenu = function() + local textures = SharedMedia:HashTable ("statusbar") + local texTable = {} + for name, texturePath in pairs (textures) do + texTable[#texTable+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = onSelectTexture, icon = texture_icon, texcoord = texture_texcoord} + end + table.sort (texTable, function (t1, t2) return t1.label < t2.label end) + return texTable + end + + g:NewLabel (window, _, "$parentTextureLabel", "textureLabel", Loc ["STRING_TEXTURE"] .. ":", "GameFontNormal") + g:NewDropDown (window, _, "$parentTextureDropdown", "textureDropdown", 120, 18, buildTextureMenu, nil) + window.textureDropdown:SetFixedParameter (_detalhes:GetInstance(1)) + window.textureDropdown:SetPoint ("left", window.textureLabel, "right", 2) + window.textureLabel:SetPoint ("topleft", window.statusbarLabel, "bottomleft", 0, -8) + + --> icon type + local OnSelectIconFile = function (_, _, iconpath) + instance1:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, iconpath) + if (instance1.row_info.use_spec_icons) then + instance1:SetBarSpecIconSettings (false) + end + + local instance2 = _detalhes:GetInstance (2) + if (instance2) then + instance2:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, iconpath) + if (instance2.row_info.use_spec_icons) then + instance2:SetBarSpecIconSettings (false) + end + end + end + local OnSelectIconFileSpec = function (_, _, iconpath) + instance1:SetBarSpecIconSettings (true, iconpath, true) + local instance2 = _detalhes:GetInstance (2) + if (instance2) then + instance2:SetBarSpecIconSettings (true, iconpath, true) + end + end + + local iconsize = {16, 16} + local icontexture = [[Interface\WorldStateFrame\ICONS-CLASSES]] + local iconcoords = {0.25, 0.50, 0, 0.25} + local list = { + {value = [[]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE1"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize, iconcolor = {1, 1, 1, .3}}, + {value = [[Interface\AddOns\Details\images\classes_small]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE2"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, + {value = [[Interface\AddOns\Details\images\spec_icons_normal]], label = "Specialization", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize}, + {value = [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], label = "Specialization Alpha", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize}, + {value = [[Interface\AddOns\Details\images\classes_small_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE3"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, + {value = [[Interface\AddOns\Details\images\classes_small_alpha]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE4"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, + {value = [[Interface\AddOns\Details\images\classes_small_alpha_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE6"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, + {value = [[Interface\AddOns\Details\images\classes]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE5"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize}, + } + local BuiltIconList = function() + return list + end + + local default + if (instance1.row_info.use_spec_icons) then + default = instance1.row_info.spec_file + else + default = instance1.row_info.icon_file + end + + local d = g:NewDropDown (window, _, "$parentIconSelectDropdown", "IconSelectDropdown", 120, 18, BuiltIconList, default) + + g:NewLabel (window, _, "$parentIconsAnchor", "rowIconsLabel", Loc ["STRING_OPTIONS_TEXT_ROWICONS_ANCHOR"], "GameFontNormal") + + d:SetPoint ("left", window.rowIconsLabel, "right", 2) + + window.rowIconsLabel:SetPoint ("topleft", window.textureLabel, "bottomleft", 0, -8) + + local created_test_bars = 0 + local skins_frame_alert = CreateFrame ("frame", nil, window) + skins_frame_alert:SetScript ("OnShow", function() + if (created_test_bars < 2) then + _detalhes:CreateTestBars() + created_test_bars = created_test_bars + 1 + end + end) + + pages [#pages+1] = {import_label, import_dropdown, skins_frame_alert, bg55, texto55, texto555, skins_image, changemind, texto_appearance, skin_dropdown, skin_label, window.rowIconsLabel, window.IconSelectDropdown, create_window_button, window_color, window.statusbarLabel, window.statusbarSlider, window.textureLabel, window.textureDropdown} + + for _, widget in ipairs (pages[#pages]) do + widget:Hide() + end + + + -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> page 4 @@ -1546,7 +1521,7 @@ local window_openned_at = time() ------------------------------------------------------------------------------------------------------------------------------ - --[[ +--[[ forward:Click() forward:Click() forward:Click() diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.lua b/plugins/Details_RaidCheck/Details_RaidCheck.lua index f34039f8..d020d8f4 100644 --- a/plugins/Details_RaidCheck/Details_RaidCheck.lua +++ b/plugins/Details_RaidCheck/Details_RaidCheck.lua @@ -49,7 +49,16 @@ local food_list = { [180759] = true, -- [180762] = true, -- [180760] = true, -- +} +local focus_augmentation = 175457 +local hyper_augmentation = 175456 +local stout_augmentation = 175439 + +local runes_id = { + [175457] = true, -- focus + [175456] = true, --hyper + [175439] = true, --stout } --> localization @@ -59,7 +68,7 @@ local food_list = { tinsert (UISpecialFrames, "DetailsRaidCheck") DetailsRaidCheck:SetPluginDescription (Loc ["STRING_RAIDCHECK_PLUGIN_DESC"]) - local version = "v0.3" + local version = "v0.4.1" local debugmode = false @@ -70,8 +79,10 @@ local food_list = { --> tables DetailsRaidCheck.usedprepot_table = {} + DetailsRaidCheck.focusaug_table = {} DetailsRaidCheck.haveflask_table = {} DetailsRaidCheck.havefood_table = {} + DetailsRaidCheck.havefocusaug_table = {} DetailsRaidCheck.on_raid = false DetailsRaidCheck.tracking_buffs = false @@ -86,7 +97,7 @@ local food_list = { elseif (event == "COMBAT_PREPOTION_UPDATED") then - DetailsRaidCheck.usedprepot_table = select (1, ...) + DetailsRaidCheck.usedprepot_table, DetailsRaidCheck.focusaug_table = select (1, ...) elseif (event == "COMBAT_PLAYER_LEAVE") then @@ -185,7 +196,7 @@ local food_list = { local report_string1 = show_panel:CreateFontString (nil, "overlay", "GameFontNormal") report_string1:SetPoint ("bottomleft", show_panel, "bottomleft", 10, 10) - report_string1:SetText ("|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:225:307|t Report No Food/Flask |TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:328:409|t Report No Pre-Pot |TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:126:204|t Disable Plugin") + report_string1:SetText ("|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:225:307|t Report No Food/Flask |TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:328:409|t Report No Pre-Pot |TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:126:204|t Report No Rune") DetailsRaidCheck:SetFontSize (report_string1, 10) DetailsRaidCheck:SetFontColor (report_string1, "white") report_string1:SetAlpha (0.6) @@ -229,22 +240,23 @@ local food_list = { -- - local prepot_title = show_panel:CreateFontString (nil, "overlay", "GameFontHighlightSmall") - prepot_title:SetJustifyH ("center") - prepot_title:SetPoint ("topleft", show_panel, "topleft", 205, -20) - prepot_title:SetText ("Used Pre Pot") - prepot_title:SetTextColor (0.8, 1, 0.8) + local focus_aug = show_panel:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + focus_aug:SetJustifyH ("center") + focus_aug:SetPoint ("topleft", show_panel, "topleft", 205, -20) + --focus_aug:SetText ("Augmentation") + focus_aug:SetText ("No Rune") + focus_aug:SetTextColor (0.8, 0.8, 1) - local prepot_str = show_panel:CreateFontString (nil, "overlay", "GameFontHighlightSmall") - prepot_str:SetJustifyH ("left") - prepot_str:SetPoint ("topleft", prepot_title, "topleft", -11, -20) + local focus_aug2 = show_panel:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + focus_aug2:SetJustifyH ("left") + focus_aug2:SetPoint ("topleft", focus_aug, "topleft", -9, -20) - local prepot_image = show_panel:CreateTexture (nil, "artwork") - prepot_image:SetTexture ([[Interface\Garrison\GarrisonMissionUI2]]) - prepot_image:SetTexCoord (680/1024, 888/1024, 429/1024, 477/1024) - prepot_image:SetPoint ("topleft", prepot_title, "topleft", -11, 3) - prepot_image:SetSize (prepot_title:GetStringWidth()+22, 19) --208, 48 - prepot_image:SetVertexColor (.65, .65, .65) + local focus_aug_image2 = show_panel:CreateTexture (nil, "artwork") + focus_aug_image2:SetTexture ([[Interface\Garrison\GarrisonMissionUI2]]) + focus_aug_image2:SetTexCoord (680/1024, 888/1024, 429/1024, 477/1024) + focus_aug_image2:SetPoint ("topleft", focus_aug, "topleft", -11, 3) + focus_aug_image2:SetSize (focus_aug:GetStringWidth()+22, 19) --208, 48 + focus_aug_image2:SetVertexColor (.65, .65, .65) -- @@ -267,6 +279,29 @@ local food_list = { -- + local prepot_title = show_panel:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + prepot_title:SetJustifyH ("center") + prepot_title:SetPoint ("topleft", show_panel, "topleft", 415, -20) + prepot_title:SetText ("Used Pre Pot") + prepot_title:SetTextColor (0.8, 1, 0.8) + + local prepot_str = show_panel:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + prepot_str:SetJustifyH ("left") + prepot_str:SetPoint ("topleft", prepot_title, "topleft", -11, -20) + + local prepot_image = show_panel:CreateTexture (nil, "artwork") + prepot_image:SetTexture ([[Interface\Garrison\GarrisonMissionUI2]]) + prepot_image:SetTexCoord (680/1024, 888/1024, 429/1024, 477/1024) + prepot_image:SetPoint ("topleft", prepot_title, "topleft", -11, 3) + prepot_image:SetSize (prepot_title:GetStringWidth()+22, 19) --208, 48 + prepot_image:SetVertexColor (.65, .65, .65) + + prepot_title:Hide() + prepot_str:Hide() + prepot_image:Hide() + + -- + show_panel:Hide() DetailsRaidCheck.report_lines = "" @@ -345,7 +380,30 @@ local food_list = { elseif (button == "MiddleButton") then - _detalhes:DisablePlugin ("DETAILS_PLUGIN_RAIDCHECK") + --_detalhes:DisablePlugin ("DETAILS_PLUGIN_RAIDCHECK") + + --report focus aug + local s = "Details!: Not using Rune: " + + local amt = GetNumGroupMembers() + local _, _, difficulty = GetInstanceInfo() + if (difficulty == 16 and DetailsRaidCheck.db.mythic_1_4 and amt > 20) then + amt = 20 + end + + for i = 1, amt do + local name = UnitName ("raid" .. i) + if (not DetailsRaidCheck.havefocusaug_table [name]) then + s = s .. DetailsRaidCheck:GetOnlyName (name) .. " " + end + end + + if (DetailsRaidCheck.db.use_report_panel) then + DetailsRaidCheck.report_lines = s + DetailsRaidCheck:SendReportWindow (reportFunc) + else + DetailsRaidCheck:SendMsgToChannel (s, "RAID") + end end @@ -353,7 +411,7 @@ local food_list = { local update_panel = function (self) - local amount1, amount2, amount3, amount4 = 0, 0, 0, 0 + local amount1, amount2, amount3, amount4, amount5 = 0, 0, 0, 0, 0 local s, f, p, n = "", "", "", "" local amt = GetNumGroupMembers() @@ -450,7 +508,38 @@ local food_list = { prepot_str:SetText (p) prepot_str2:SetText (n) - local bigger = math.max (amount1, amount2, amount3, amount4) + --> not used focus augmentation + n = "" + + local amt = GetNumGroupMembers() + local _, _, difficulty = GetInstanceInfo() + if (difficulty == 16 and DetailsRaidCheck.db.mythic_1_4 and amt > 20) then + amt = 20 + end + + for i = 1, amt do + + local name = UnitName ("raid" .. i) + + if (not DetailsRaidCheck.havefocusaug_table [name]) then + local _, class = _UnitClass (name) + local class_color = "FFFFFFFF" + + if (class) then + local coords = CLASS_ICON_TCOORDS [class] + class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:-5:128:128:" .. coords[1]*128 .. ":" .. coords[2]*128 .. ":" .. coords[3]*128 .. ":" .. coords[4]*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr + end + + n = n .. class_color .. DetailsRaidCheck:GetOnlyName (name) .. "|r\n" + + amount5 = amount5 + 1 + end + + end + + focus_aug2:SetText (n) + + local bigger = math.max (amount1, amount2, amount3, amount4, amount5) show_panel:SetHeight (100 + (bigger * 10)) end @@ -514,6 +603,9 @@ local food_list = { for player_name, have in pairs (DetailsRaidCheck.havefood_table) do DetailsRaidCheck.havefood_table [player_name] = nil end + for player_name, have in pairs (DetailsRaidCheck.havefocusaug_table) do + DetailsRaidCheck.havefocusaug_table [player_name] = nil + end local amt_players = GetNumGroupMembers() local with_flask, with_food = 0, 0 @@ -532,6 +624,10 @@ local food_list = { DetailsRaidCheck.havefood_table [name] = true with_food = with_food + 1 end + + if (bname and runes_id [spellid]) then + DetailsRaidCheck.havefocusaug_table [name] = true + end end end diff --git a/startup.lua b/startup.lua index 00b56bd5..37bac9f3 100644 --- a/startup.lua +++ b/startup.lua @@ -460,6 +460,7 @@ function _G._detalhes:Start() if (self.is_first_run) then _detalhes:OpenWelcomeWindow() end + --_detalhes:OpenWelcomeWindow() --debug -- /run _detalhes:OpenWelcomeWindow()