From de4f6b2a62899f07c48b2bb6dd61ac7cb7978fe2 Mon Sep 17 00:00:00 2001 From: Tercio Date: Mon, 26 Jun 2017 14:30:17 -0300 Subject: [PATCH] - added localization to the Forge and History panels. - added two new options for forge and history on the main menu (orange cogwheel). - added tutorial frames for forge and history panels. --- boot.lua | 9 +++--- core/windows.lua | 57 +++++++++++++++++++++++++++++--------- functions/link.lua | 28 +++++++++++++++++++ gumps/janela_principal.lua | 17 ++++++++++-- 4 files changed, 92 insertions(+), 19 deletions(-) diff --git a/boot.lua b/boot.lua index 6efcbda5..78188971 100644 --- a/boot.lua +++ b/boot.lua @@ -3,7 +3,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 4155 + _detalhes.build_counter = 4201 _detalhes.userversion = "v7.2.5." .. _detalhes.build_counter _detalhes.realversion = 121 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -21,13 +21,14 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v7.2.5.4153.121 (|cFFFFCC00June 24th, 2017|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v7.2.5.4201.121 (|cFFFFCC00June 26th, 2017|r|cFFFFFF00)|r:\n\n |cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n +|cFFFFFF00-|r Added Forge and Ranking options on the main menu (orange cogwheel).\n\n --]] --- +--|cFFFFFF00v7.2.5.4201.121 (|cFFFFCC00June 26th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n|cFFFFFF00-|r Added Forge and Ranking options on the main menu (orange cogwheel).\n\n - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.2.5.4155.121 (|cFFFFCC00June 24th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n|cFFFFFF00v7.2.5.3968.120 (|cFFFFCC00June 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Death Recap implemented! replaces the default from Blizzard and can be configured at Options > Raid Tools.\n\n|cFFFFFF00-|r New Guild Damage and Heal rank on '/details ranking' panel.\n\n|cFFFFFF00-|r Added a Guild Sync button on the Details! Ranking Panel.\n\n|cFFFFFF00-|r Added Custom display 'Damage on Shields', useful for encounter like Maiden of Vigilance where there's big shields to be removed and you want to know who is doing more damage to it.\n\n|cFFFFFF00-|r Added Heal Absorbed display under Heal bracket.\n\nHeal Absorb are the heal denied by abilities such like DK's Necrotic Strike or raid boss Sisters of the Moon 'Embrace of the Eclipse' ability.\nThe tooltip of this display shows which players got heal denied, which abilities absorbed the heal, which abilities tried to heal but got the heal denied.\n\n|cFFFFFF00-|r Added Alternate Power display under Energy bracket, it shows the total of alternate power gain from each player, useful for encounters such as Demonic Inquisition.\n\n|cFFFFFF00-|r 'First Hit' message after pulling a boss, now also shows who the boss is targeting (almost always is who pulled).\n\n|cFFFFFF00-|r Raid Dps {rdps} and Hps {rhps} can now be used on the Broker Data Feed..\n\n|cFFFFFF00-|r Fixed an issue with Chromie from the scenario 'The Deaths of Chromie' where she wasn't being shown on the meter.\n\n|cFFFFFF00-|r Fixed Paladin 'Light of the Martyr' damage to self.\n\n|cFFFFFF00-|r Ticket #198 'Script Error' Fixed.\n\n|cFFFFFF00v7.2.0.3703.119 (|cFFFFCC00May 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an error while killing low level mobs with warrior class.\n\n|cFFFFFF00v7.2.0.3693.118 (|cFFFFCC00May 25th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fury Warrior shouldn't be assigned as Protection any more.\n\n|cFFFFFF00-|r Some parser fixes.\n\n|cFFFFFF00v7.2.0.3673.118 (|cFFFFCC00May 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #187: Fixed an issue when comparing hunter pets on the player detail window.\n\n|cFFFFFF00-|r Ticket #189 #186: Fixed a taint issue for some classes when using friendly nameplates on.\n\n|cFFFFFF00v7.2.0.3512.116 (|cFFFFCC00April 27th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Havoc Demon Hunter: your fury energy is being shown under Mana Restored (don't ask me why, the combat log is telling us it's mana).\n\n|cFFFFFF00-|r Pets now are shown on damage tooltips.\n\n|cFFFFFF00-|r Pets are now also shown on the comparison panel.\n\n|cFFFFFF00v7.2.0.3474.116 (|cFFFFCC00April 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin: Raid Check > added some food buffs which wasn't being tracked.\n\n|cFFFFFF00v7.2.0.3467.116 (|cFFFFCC00April 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the custom display window where apply and cancel buttons where over the edit window.\n\n|cFFFFFF00-|r Fix for an issue on editing a bookmark.\n\n|cFFFFFF00v7.1.5.3459.116 (|cFFFFCC00Mar 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue on dynamic overall data where it wasn't showing DPS.\n\n|cFFFFFF00-|r Fixed an issue with Apply, Save and Cancel buttons when editing a custom display.\n\n|cFFFFFF00-|r Removed the Damage and Healing presets for custom displays, now is only possible create custom displays by scripting them.\n\n|cFFFFFF00v7.1.5.3431.116 (|cFFFFCC00Mar 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with bar orientation right to left where fixed bar color isn't working.\n\n|cFFFFFF00-|r The nickname field now use FrizQuadrataTT font and shall be compatible with Cyrillic.\n\n|cFFFFFF00v7.1.5.3418.116 (|cFFFFCC00Mar 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #167 fix: Light of the Martyr self-damage now does reduce the healing done (following WCL method).\n\n|cFFFFFF00-|r Ticket #169 fix: Damage Prevented is now working for new segments.\n\n|cFFFFFF00-|r Fixed an issue where sometimes BeastMaster's Hati pet wasn't detected correctly.\n\n|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'Dynamic Overall Damage' for mythic dungeons.\n\n|cFFFFFF00-|r Fix for Ticket #168: 'Auto Hide While [Not] Inside Instance is broken'.\n\n|cFFFFFF00-|r The bar truncate frame 'DetailsLeftTextAntiTruncate' is now created on Details! load instead on demand.\n\n|cFFFFFF00v7.1.5.3315.116 (|cFFFFCC00Jan 23th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #162: 'no Monochrome font' available, added an experimental slash command: /run _detalhes:UseOutline ('MONOCHROME').\n\n|cFFFFFF00-|r Ticket #158: 'no elapsed time shown on report to chat', added the elapsed time when reporting a segment.\n\n|cFFFFFF00-|r Ticket #164: 'error when browsing segments', an attempt to fix the problem has been made.\n\n|cFFFFFF00v7.1.5.3305.116 (|cFFFFCC00Jan 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Another fix for mythic dungeons overall data reset (thanks Tharai @ Curseforge).\n\n|cFFFFFF00-|r Fix for spec detection on PvP Arenas (thanks Pas06 @ Curseforge).\n\n|cFFFFFF00v7.1.0.3276.115 (|cFFFFCC00Jan 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the overall data not reseting when starting a new mythic+ dungeon.\n\n|cFFFFFF00v7.1.0.3266.115 (|cFFFFCC00Dec 29th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data not updating correctly at the end of the combat.\n\n|cFFFFFF00-|r Added a tutorial line on the window when the user access overall data.\n\n|cFFFFFF00v7.1.0.3236.115 (|cFFFFCC00Dec 19th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Integration with BigWigs should be working okay now.\n\n|cFFFFFF00v7.1.0.3231.115 (|cFFFFCC00Dec 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Disabled the link with BigWigs to avoid the 'RegisterMessage' error on every login.\n\n|cFFFFFF00v7.1.0.3229.115 (|cFFFFCC00Dec 09th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r When a window is locked, resize grips shouldn't be enabled messing with bar mouse over.\n\n|cFFFFFF00v7.0.3.3222.115 (|cFFFFCC00November 28th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Unstable Affliction to common spells with the same name.\n\n|cFFFFFF00-|r Fixed few issues with built-in plugins.\n\n|cFFFFFF00v7.0.3.3202.115 (|cFFFFCC00November 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Weakauras creator from the Encounter Details plugin and '/details forge' shall work correctly now with Trials of Valor.\n\n|cFFFFFF00-|r Raid history should now be recording your Trials of Valor kills.\n\n|cFFFFFF00-|r Added Trials of Valor raid info, good luck and have fun!.\n\n|cFFFFFF00v7.0.3.3201.115 (|cFFFFCC00November 04th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Paladin holy icon.\n\n|cFFFFFF00-|r Fix for Rogue outlaw icon.\n\n|cFFFFFF00-|r Fixed misc displays with bar sorted by ascending order.\n\n|cFFFFFF00-|r Fix for '/details show' command while the window is on auto hide.\n\n|cFFFFFF00v7.0.3.3114.115 (|cFFFFCC00October 26th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): tooltip tutorial is now clamped to screen and its close button should be visible.\n\n|cFFFFFF00-|r Raid Check (plugin): now also works on dungeons.\n\n|cFFFFFF00-|r Added Potion of the Prolongued Power to the tracker.\n\n|cFFFFFF00v7.1.0.3097.115 (|cFFFFCC00October 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r renamed 'report history' to 'latest reports'.\n\n|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.2.5.4201.121 (|cFFFFCC00June 26th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n|cFFFFFF00-|r Added Forge and Ranking options on the main menu (orange cogwheel).\n\n|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n|cFFFFFF00v7.2.5.3968.120 (|cFFFFCC00June 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Death Recap implemented! replaces the default from Blizzard and can be configured at Options > Raid Tools.\n\n|cFFFFFF00-|r New Guild Damage and Heal rank on '/details ranking' panel.\n\n|cFFFFFF00-|r Added a Guild Sync button on the Details! Ranking Panel.\n\n|cFFFFFF00-|r Added Custom display 'Damage on Shields', useful for encounter like Maiden of Vigilance where there's big shields to be removed and you want to know who is doing more damage to it.\n\n|cFFFFFF00-|r Added Heal Absorbed display under Heal bracket.\n\nHeal Absorb are the heal denied by abilities such like DK's Necrotic Strike or raid boss Sisters of the Moon 'Embrace of the Eclipse' ability.\nThe tooltip of this display shows which players got heal denied, which abilities absorbed the heal, which abilities tried to heal but got the heal denied.\n\n|cFFFFFF00-|r Added Alternate Power display under Energy bracket, it shows the total of alternate power gain from each player, useful for encounters such as Demonic Inquisition.\n\n|cFFFFFF00-|r 'First Hit' message after pulling a boss, now also shows who the boss is targeting (almost always is who pulled).\n\n|cFFFFFF00-|r Raid Dps {rdps} and Hps {rhps} can now be used on the Broker Data Feed..\n\n|cFFFFFF00-|r Fixed an issue with Chromie from the scenario 'The Deaths of Chromie' where she wasn't being shown on the meter.\n\n|cFFFFFF00-|r Fixed Paladin 'Light of the Martyr' damage to self.\n\n|cFFFFFF00-|r Ticket #198 'Script Error' Fixed.\n\n|cFFFFFF00v7.2.0.3703.119 (|cFFFFCC00May 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an error while killing low level mobs with warrior class.\n\n|cFFFFFF00v7.2.0.3693.118 (|cFFFFCC00May 25th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fury Warrior shouldn't be assigned as Protection any more.\n\n|cFFFFFF00-|r Some parser fixes.\n\n|cFFFFFF00v7.2.0.3673.118 (|cFFFFCC00May 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #187: Fixed an issue when comparing hunter pets on the player detail window.\n\n|cFFFFFF00-|r Ticket #189 #186: Fixed a taint issue for some classes when using friendly nameplates on.\n\n|cFFFFFF00v7.2.0.3512.116 (|cFFFFCC00April 27th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Havoc Demon Hunter: your fury energy is being shown under Mana Restored (don't ask me why, the combat log is telling us it's mana).\n\n|cFFFFFF00-|r Pets now are shown on damage tooltips.\n\n|cFFFFFF00-|r Pets are now also shown on the comparison panel.\n\n|cFFFFFF00v7.2.0.3474.116 (|cFFFFCC00April 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin: Raid Check > added some food buffs which wasn't being tracked.\n\n|cFFFFFF00v7.2.0.3467.116 (|cFFFFCC00April 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the custom display window where apply and cancel buttons where over the edit window.\n\n|cFFFFFF00-|r Fix for an issue on editing a bookmark.\n\n|cFFFFFF00v7.1.5.3459.116 (|cFFFFCC00Mar 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue on dynamic overall data where it wasn't showing DPS.\n\n|cFFFFFF00-|r Fixed an issue with Apply, Save and Cancel buttons when editing a custom display.\n\n|cFFFFFF00-|r Removed the Damage and Healing presets for custom displays, now is only possible create custom displays by scripting them.\n\n|cFFFFFF00v7.1.5.3431.116 (|cFFFFCC00Mar 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with bar orientation right to left where fixed bar color isn't working.\n\n|cFFFFFF00-|r The nickname field now use FrizQuadrataTT font and shall be compatible with Cyrillic.\n\n|cFFFFFF00v7.1.5.3418.116 (|cFFFFCC00Mar 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #167 fix: Light of the Martyr self-damage now does reduce the healing done (following WCL method).\n\n|cFFFFFF00-|r Ticket #169 fix: Damage Prevented is now working for new segments.\n\n|cFFFFFF00-|r Fixed an issue where sometimes BeastMaster's Hati pet wasn't detected correctly.\n\n|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'Dynamic Overall Damage' for mythic dungeons.\n\n|cFFFFFF00-|r Fix for Ticket #168: 'Auto Hide While [Not] Inside Instance is broken'.\n\n|cFFFFFF00-|r The bar truncate frame 'DetailsLeftTextAntiTruncate' is now created on Details! load instead on demand.\n\n|cFFFFFF00v7.1.5.3315.116 (|cFFFFCC00Jan 23th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #162: 'no Monochrome font' available, added an experimental slash command: /run _detalhes:UseOutline ('MONOCHROME').\n\n|cFFFFFF00-|r Ticket #158: 'no elapsed time shown on report to chat', added the elapsed time when reporting a segment.\n\n|cFFFFFF00-|r Ticket #164: 'error when browsing segments', an attempt to fix the problem has been made.\n\n|cFFFFFF00v7.1.5.3305.116 (|cFFFFCC00Jan 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Another fix for mythic dungeons overall data reset (thanks Tharai @ Curseforge).\n\n|cFFFFFF00-|r Fix for spec detection on PvP Arenas (thanks Pas06 @ Curseforge).\n\n|cFFFFFF00v7.1.0.3276.115 (|cFFFFCC00Jan 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the overall data not reseting when starting a new mythic+ dungeon.\n\n|cFFFFFF00v7.1.0.3266.115 (|cFFFFCC00Dec 29th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data not updating correctly at the end of the combat.\n\n|cFFFFFF00-|r Added a tutorial line on the window when the user access overall data.\n\n|cFFFFFF00v7.1.0.3236.115 (|cFFFFCC00Dec 19th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Integration with BigWigs should be working okay now.\n\n|cFFFFFF00v7.1.0.3231.115 (|cFFFFCC00Dec 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Disabled the link with BigWigs to avoid the 'RegisterMessage' error on every login.\n\n|cFFFFFF00v7.1.0.3229.115 (|cFFFFCC00Dec 09th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r When a window is locked, resize grips shouldn't be enabled messing with bar mouse over.\n\n|cFFFFFF00v7.0.3.3222.115 (|cFFFFCC00November 28th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Unstable Affliction to common spells with the same name.\n\n|cFFFFFF00-|r Fixed few issues with built-in plugins.\n\n|cFFFFFF00v7.0.3.3202.115 (|cFFFFCC00November 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Weakauras creator from the Encounter Details plugin and '/details forge' shall work correctly now with Trials of Valor.\n\n|cFFFFFF00-|r Raid history should now be recording your Trials of Valor kills.\n\n|cFFFFFF00-|r Added Trials of Valor raid info, good luck and have fun!.\n\n|cFFFFFF00v7.0.3.3201.115 (|cFFFFCC00November 04th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Paladin holy icon.\n\n|cFFFFFF00-|r Fix for Rogue outlaw icon.\n\n|cFFFFFF00-|r Fixed misc displays with bar sorted by ascending order.\n\n|cFFFFFF00-|r Fix for '/details show' command while the window is on auto hide.\n\n|cFFFFFF00v7.0.3.3114.115 (|cFFFFCC00October 26th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): tooltip tutorial is now clamped to screen and its close button should be visible.\n\n|cFFFFFF00-|r Raid Check (plugin): now also works on dungeons.\n\n|cFFFFFF00-|r Added Potion of the Prolongued Power to the tracker.\n\n|cFFFFFF00v7.1.0.3097.115 (|cFFFFCC00October 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r renamed 'report history' to 'latest reports'.\n\n|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/core/windows.lua b/core/windows.lua index 011e6fce..cd90f6d8 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -1096,7 +1096,7 @@ local db = _detalhes.storage:OpenRaidStorage() if (not db) then - return _detalhes:Msg ("Fail to open 'Details Storage', maybe the addon is disabled?") + return _detalhes:Msg (Loc ["STRING_GUILDDAMAGERANK_DATABASEERROR"]) end local f = CreateFrame ("frame", "DetailsRaidHistoryWindow", UIParent, "ButtonFrameTemplate") @@ -1111,6 +1111,37 @@ f.Mode = 1 + if (not _detalhes:GetTutorialCVar ("HISTORYPANEL_TUTORIAL")) then + local tutorialFrame = CreateFrame ("frame", "$parentTutorialFrame", f) + tutorialFrame:SetPoint ("center", f, "center") + tutorialFrame:SetFrameStrata ("DIALOG") + tutorialFrame:SetSize (400, 300) + tutorialFrame:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, + insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize=1}) + tutorialFrame:SetBackdropColor (0, 0, 0, 1) + + tutorialFrame.Title = _detalhes.gump:CreateLabel (tutorialFrame, Loc ["STRING_MODE_OPENGUILDDAMAGERANK"], 12, "orange") + tutorialFrame.Title:SetPoint ("top", tutorialFrame, "top", 0, -5) + + tutorialFrame.Desc = _detalhes.gump:CreateLabel (tutorialFrame, Loc ["STRING_GUILDDAMAGERANK_TUTORIAL_DESC"], 12) + tutorialFrame.Desc.width = 370 + tutorialFrame.Desc:SetPoint ("topleft", tutorialFrame, "topleft", 10, -45) + + --[[ + tutorialFrame.Example:SetPoint ("topleft", tutorialFrame, "topleft", 10, -110) + tutorialFrame.Example = _detalhes.gump:CreateLabel (tutorialFrame, Loc ["STRING_FORGE_TUTORIAL_VIDEO"], 12) + + local editBox = _detalhes.gump:CreateTextEntry (tutorialFrame, function()end, 375, 20, nil, nil, nil, entry_template, label_template) + editBox:SetPoint ("topleft", tutorialFrame.Example, "bottomleft", 0, -10) + editBox:SetText () + editBox:SetTemplate (_detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")) + --]] + + local closeButton = _detalhes.gump:CreateButton (tutorialFrame, function() _detalhes:SetTutorialCVar ("HISTORYPANEL_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, Loc ["STRING_OPTIONS_CHART_CLOSE"]) + closeButton:SetPoint ("bottom", tutorialFrame, "bottom", 0, 10) + closeButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")) + end + --wallpaper local background = f:CreateTexture (nil, "border") background:SetAlpha (0.3) @@ -1145,14 +1176,14 @@ _G.DetailsRaidHistoryWindow:Refresh() end - local HistoryCheckBox, HistoryLabel = _detalhes.gump:CreateSwitch (f, select_history, true, 18, 18, "", "", "HistoryCheckBox", nil, nil, nil, nil, "Show History", options_switch_template) --, options_text_template + local HistoryCheckBox, HistoryLabel = _detalhes.gump:CreateSwitch (f, select_history, true, 18, 18, "", "", "HistoryCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWHISTORY"], options_switch_template) --, options_text_template HistoryLabel:ClearAllPoints() HistoryCheckBox:ClearAllPoints() HistoryCheckBox:SetPoint ("topleft", f, "topleft", 100, -34) HistoryLabel:SetPoint ("left", HistoryCheckBox, "right", 2, 0) HistoryCheckBox:SetAsCheckBox() - local GuildRankCheckBox, GuildRankLabel = _detalhes.gump:CreateSwitch (f, select_guildrank, false, 18, 18, "", "", "GuildRankCheckBox", nil, nil, nil, nil, "Show Guild Rank", options_switch_template) --, options_text_template + local GuildRankCheckBox, GuildRankLabel = _detalhes.gump:CreateSwitch (f, select_guildrank, false, 18, 18, "", "", "GuildRankCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWRANK"], options_switch_template) --, options_text_template GuildRankLabel:ClearAllPoints() GuildRankCheckBox:ClearAllPoints() GuildRankCheckBox:SetPoint ("topleft", f, "topleft", 240, -34) @@ -1213,7 +1244,7 @@ end - local GuildSyncButton = _detalhes.gump:CreateButton (f, guild_sync, 130, 20, "Sync With Guild", nil, nil, nil, "GuildSyncButton", nil, nil, options_button_template, options_text_template) + local GuildSyncButton = _detalhes.gump:CreateButton (f, guild_sync, 130, 20, Loc ["STRING_GUILDDAMAGERANK_SYNCBUTTONTEXT"], nil, nil, nil, "GuildSyncButton", nil, nil, options_button_template, options_text_template) GuildSyncButton:SetPoint ("topright", f, "topright", -20, -34) GuildSyncButton:SetIcon ([[Interface\GLUES\CharacterSelect\RestoreButton]], 12, 12, "overlay", {0.2, .8, 0.2, .8}, nil, 4) @@ -1275,7 +1306,7 @@ return raid_list end local raid_dropdown = gump:CreateDropDown (f, build_raid_list, 1, dropdown_size, 20, "select_raid") - local raid_string = gump:CreateLabel (f, "Raid:", _, _, "GameFontNormal", "select_raid_label") + local raid_string = gump:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_RAID"] .. ":", _, _, "GameFontNormal", "select_raid_label") --> select boss: local on_boss_select = function (_, _, boss) @@ -1285,7 +1316,7 @@ return boss_list end local boss_dropdown = gump:CreateDropDown (f, build_boss_list, 1, dropdown_size, 20, "select_boss") - local boss_string = gump:CreateLabel (f, "Boss:", _, _, "GameFontNormal", "select_boss_label") + local boss_string = gump:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_BOSS"] .. ":", _, _, "GameFontNormal", "select_boss_label") --> select difficulty: local on_diff_select = function (_, _, diff) @@ -1296,7 +1327,7 @@ return diff_list end local diff_dropdown = gump:CreateDropDown (f, build_diff_list, 1, dropdown_size, 20, "select_diff") - local diff_string = gump:CreateLabel (f, "Difficulty:", _, _, "GameFontNormal", "select_diff_label") + local diff_string = gump:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_DIFF"] .. ":", _, _, "GameFontNormal", "select_diff_label") --> select role: local on_role_select = function (_, _, role) @@ -1309,7 +1340,7 @@ } end local role_dropdown = gump:CreateDropDown (f, build_role_list, 1, dropdown_size, 20, "select_role") - local role_string = gump:CreateLabel (f, "Role:", _, _, "GameFontNormal", "select_role_label") + local role_string = gump:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_ROLE"] .. ":", _, _, "GameFontNormal", "select_role_label") --> select guild: local on_guild_select = function (_, _, guild) @@ -1319,7 +1350,7 @@ return guild_list end local guild_dropdown = gump:CreateDropDown (f, build_guild_list, 1, dropdown_size, 20, "select_guild") - local guild_string = gump:CreateLabel (f, "Guild:", _, _, "GameFontNormal", "select_guild_label") + local guild_string = gump:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_GUILD"] .. ":", _, _, "GameFontNormal", "select_guild_label") --> select playerbase: local on_player_select = function (_, _, player) @@ -1327,12 +1358,12 @@ end local build_player_list = function() return { - {value = 1, label = "Raid", icon = icon, onclick = on_player_select}, - {value = 2, label = "Individual", icon = icon, onclick = on_player_select}, + {value = 1, label = Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE_RAID"], icon = icon, onclick = on_player_select}, + {value = 2, label = Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE_INDIVIDUAL"], icon = icon, onclick = on_player_select}, } end local player_dropdown = gump:CreateDropDown (f, build_player_list, 1, dropdown_size, 20, "select_player") - local player_string = gump:CreateLabel (f, "Player Base:", _, _, "GameFontNormal", "select_player_label") + local player_string = gump:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE"] .. ":", _, _, "GameFontNormal", "select_player_label") --> select player: local on_player2_select = function (_, _, player) @@ -1362,7 +1393,7 @@ return t end local player2_dropdown = gump:CreateDropDown (f, build_player2_list, 1, dropdown_size, 20, "select_player2") - local player2_string = gump:CreateLabel (f, "Player:", _, _, "GameFontNormal", "select_player2_label") + local player2_string = gump:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE_PLAYER"] .. ":", _, _, "GameFontNormal", "select_player2_label") function f:UpdateDropdowns (DoNotSelectRaid) diff --git a/functions/link.lua b/functions/link.lua index bfdf7cf5..46caafbb 100644 --- a/functions/link.lua +++ b/functions/link.lua @@ -2609,6 +2609,34 @@ nopluginLabel:SetText (L["STRING_FORGE_ENABLEPLUGINS"]) end + if (not _detalhes:GetTutorialCVar ("FORGE_TUTORIAL")) then + local tutorialFrame = CreateFrame ("frame", "$parentTutorialFrame", f) + tutorialFrame:SetPoint ("center", f, "center") + tutorialFrame:SetFrameStrata ("DIALOG") + tutorialFrame:SetSize (400, 300) + tutorialFrame:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, + insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize=1}) + tutorialFrame:SetBackdropColor (0, 0, 0, 1) + + tutorialFrame.Title = _detalhes.gump:CreateLabel (tutorialFrame, L["STRING_FORGE_TUTORIAL_TITLE"], 12, "orange") + tutorialFrame.Desc = _detalhes.gump:CreateLabel (tutorialFrame, L["STRING_FORGE_TUTORIAL_DESC"], 12) + tutorialFrame.Desc.width = 370 + tutorialFrame.Example = _detalhes.gump:CreateLabel (tutorialFrame, L["STRING_FORGE_TUTORIAL_VIDEO"], 12) + + tutorialFrame.Title:SetPoint ("top", tutorialFrame, "top", 0, -5) + tutorialFrame.Desc:SetPoint ("topleft", tutorialFrame, "topleft", 10, -45) + tutorialFrame.Example:SetPoint ("topleft", tutorialFrame, "topleft", 10, -110) + + local editBox = _detalhes.gump:CreateTextEntry (tutorialFrame, function()end, 375, 20, nil, nil, nil, entry_template, label_template) + editBox:SetPoint ("topleft", tutorialFrame.Example, "bottomleft", 0, -10) + editBox:SetText ([[https://www.youtube.com/watch?v=om0k1Yj2pEw]]) + editBox:SetTemplate (_detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")) + + local closeButton = _detalhes.gump:CreateButton (tutorialFrame, function() _detalhes:SetTutorialCVar ("FORGE_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, L["STRING_OPTIONS_CHART_CLOSE"]) + closeButton:SetPoint ("bottom", tutorialFrame, "bottom", 0, 10) + closeButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")) + end + --modules local all_modules = {} local spell_already_added = {} diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index cc6694e3..10ef69ce 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -5761,15 +5761,28 @@ local build_mode_list = function (self, elapsed) CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true) - --> options + --> space GameCooltip:AddLine ("$div") + --> forge and history buttons + CoolTip:AddLine (Loc ["STRING_MODE_OPENFORGE"]) + CoolTip:AddMenu (1, _detalhes.OpenForge) + CoolTip:AddIcon ([[Interface\MINIMAP\Vehicle-HammerGold-3]], 1, 1, 16, 16, 0, 1, 0, 1) + + CoolTip:AddLine (Loc ["STRING_MODE_OPENGUILDDAMAGERANK"]) + CoolTip:AddMenu (1, _detalhes.OpenRaidHistoryWindow) + CoolTip:AddIcon ([[Interface\PvPRankBadges\PvPRank08]], 1, 1, 16, 16, 0, 1, 0, 1) + + --> space + GameCooltip:AddLine ("$div") + + --> options CoolTip:AddLine (Loc ["STRING_OPTIONS_WINDOW"]) CoolTip:AddMenu (1, _detalhes.OpenOptionsWindow) CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 0.5, 0.625, 0, 1) + --> finishes the menu _detalhes:SetMenuOwner (self, instancia) - CoolTip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor) CoolTip:SetBackdrop (2, menus_backdrop, nil, menus_bordercolor) CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)