From 688fb10a7b42115cd62e92b01155b8fa917fac67 Mon Sep 17 00:00:00 2001 From: tercio Date: Fri, 8 Aug 2014 17:24:44 -0300 Subject: [PATCH] - Added Shaman's Ancestral Guidance on cooldowns list. - Added a profile selection screen when Details! are running for the first time on a character. - Added Menu Text Size option over miscellaneous section on options panel. --- boot.lua | 9 ++-- core/windows.lua | 99 ++++++++++++++++++++++++++++++++++++++ framework/dropdown.lua | 12 ++++- functions/loaddata.lua | 3 +- functions/spells.lua | 2 +- gumps/janela_options.lua | 37 ++++++++++---- gumps/janela_principal.lua | 35 ++++++++------ startup.lua | 28 +---------- 8 files changed, 166 insertions(+), 59 deletions(-) diff --git a/boot.lua b/boot.lua index 8df54765..89bf0c7f 100644 --- a/boot.lua +++ b/boot.lua @@ -4,8 +4,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 20 --it's 28 for release - _detalhes.userversion = "v1.21.2" + _detalhes.build_counter = 20 --it's 30 for release + _detalhes.userversion = "v1.21.3" _detalhes.realversion = 25 _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -20,6 +20,9 @@ do --[[ |cFFFFFF00a1.21.0 (|cFFFFCC00Ago 7, 2014|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n +|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n +|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n |cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n |cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n |cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n @@ -32,7 +35,7 @@ do |cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n --]] - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00a1.21.2 (|cFFFFCC00Ago 7, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable.\n\n|cFFFFFF00-|r 'Hide' slash command now hides all opened windows; 'Show', open all closed windows and 'New' create a new window.\n\n|cFFFFFF00-|r Added Devotion Aura, Rallying Cry as cooldowns.\n\n|cFFFFFF00-|r Added options for lock, unlock, break snap, close, reopen and create new window.\n\n|cFFFFFF00-|r Added a options panel for HotCorners, access it through options button or slash hotcorner command.\n\n|cFFFFFF00-|r Added 'Logos' and 'Raid & Dungeons' sections for Wallpapers. \n\n|cFFFFFF00-|r Added a option to load a image from the computer to use as wallpaper.\n\n|cFFFFFF00-|r Fixed the percent issue with Healing Done and HPS while in combat.\n\n|cFFFFFF00-|r Fixed non-combat switch by role where changing role wasnt changing the shown attribute.\n\n|cFFFFFF00-|r Fixed 'While in Combat' hiding schema |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed several bugs on Interact Auto Transparency.\n\n|cFFFFFF00-|r Fixed the report window alert when opening the report window and it already is opened |cFF999999(thanks @Rasstapp-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the gap between last row created and the end of the window.\n\n|cFFFFFF00-|r Fixed all tooltips bugs on Wallpaper Section on Options Panel.\n\n|cFFFFFF00a1.17.0 (|cFFFFCC00Jun 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Support for Custom Displays has been rewrited, to access the new panel go to Sword Menu -> Custom -> Create New Display.\n\n|cFFFFFF00-|r Added a custom display for show potion usage.\n\n|cFFFFFF00-|r Fixed a bug where the player pet wasnt being tracked after logon in the game. This bug was affecting directly classes with pets playing out of a raid group.\n\n|cFFFFFF00-|r Fixed the report bug on healing, energy and misc attributes |cFF999999(thanks @skmzarn-mmochampion forum)|r." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00a1.21.3 (|cFFFFCC00Ago 8, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @ Revi-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable.\n\n|cFFFFFF00-|r 'Hide' slash command now hides all opened windows; 'Show', open all closed windows and 'New' create a new window.\n\n|cFFFFFF00-|r Added Devotion Aura, Rallying Cry as cooldowns.\n\n|cFFFFFF00-|r Added options for lock, unlock, break snap, close, reopen and create new window.\n\n|cFFFFFF00-|r Added a options panel for HotCorners, access it through options button or slash hotcorner command.\n\n|cFFFFFF00-|r Added 'Logos' and 'Raid & Dungeons' sections for Wallpapers. \n\n|cFFFFFF00-|r Added a option to load a image from the computer to use as wallpaper.\n\n|cFFFFFF00-|r Fixed the percent issue with Healing Done and HPS while in combat.\n\n|cFFFFFF00-|r Fixed non-combat switch by role where changing role wasnt changing the shown attribute.\n\n|cFFFFFF00-|r Fixed 'While in Combat' hiding schema |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed several bugs on Interact Auto Transparency.\n\n|cFFFFFF00-|r Fixed the report window alert when opening the report window and it already is opened |cFF999999(thanks @Rasstapp-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the gap between last row created and the end of the window.\n\n|cFFFFFF00-|r Fixed all tooltips bugs on Wallpaper Section on Options Panel.\n\n|cFFFFFF00a1.17.0 (|cFFFFCC00Jun 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Support for Custom Displays has been rewrited, to access the new panel go to Sword Menu -> Custom -> Create New Display.\n\n|cFFFFFF00-|r Added a custom display for show potion usage.\n\n|cFFFFFF00-|r Fixed a bug where the player pet wasnt being tracked after logon in the game. This bug was affecting directly classes with pets playing out of a raid group.\n\n|cFFFFFF00-|r Fixed the report bug on healing, energy and misc attributes |cFF999999(thanks @skmzarn-mmochampion forum)|r." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " --> startup diff --git a/core/windows.lua b/core/windows.lua index 10be6c48..b6a7784d 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -1359,6 +1359,105 @@ end + function _detalhes:OpenProfiler() + + --> isn't first run, so just quit + if (not _detalhes.character_first_run) then + return + elseif (_detalhes.is_first_run) then + return + else + --> check is this is the first run of the addon (after being installed) + local amount = 0 + for name, profile in pairs (_detalhes_global.__profiles) do + amount = amount + 1 + end + if (amount == 1) then + return + end + end + + local f = CreateFrame ("frame", nil, UIParent) --"DetailsSelectProfile" + f:SetSize (250, 300) + + f:SetPoint ("right", UIParent, "right", -5, 0) + + f:SetMovable (true) + f:SetScript ("OnMouseDown", function (self) + if (not self.moving) then + self:StartMoving() + self.moving = true + end + end) + f:SetScript ("OnMouseUp", function (self) + if (self.moving) then + self:StopMovingOrSizing() + self.moving = false + end + end) + + local background = f:CreateTexture (nil, "background") + background:SetAllPoints() + background:SetTexture ([[Interface\AddOns\Details\images\welcome]]) + + local logo = f:CreateTexture (nil, "artwork") + logo:SetTexture ([[Interface\AddOns\Details\images\logotipo]]) + logo:SetSize (256*0.8, 128*0.8) + logo:SetPoint ("center", f, "center", 0, 0) + logo:SetPoint ("top", f, "top", 20, 20) + + local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal") + string_profiler:SetPoint ("top", logo, "bottom", -20, 10) + string_profiler:SetText ("Profiler!") + + local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal") + string_profiler:SetPoint ("topleft", f, "topleft", 10, -130) + string_profiler:SetText (Loc ["STRING_OPTIONS_PROFILE_SELECTEXISTING"]) + string_profiler:SetWidth (230) + _detalhes:SetFontSize (string_profiler, 11) + _detalhes:SetFontColor (string_profiler, "white") + + --> get the new profile name + local current_profile = _detalhes:GetCurrentProfileName() + + local on_select_profile = function (_, _, profilename) + if (profilename ~= _detalhes:GetCurrentProfileName()) then + _detalhes:ApplyProfile (profilename) + if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then + _detalhes:OpenOptionsWindow (_G.DetailsOptionsWindow.instance) + end + end + end + + local texcoord = {5/32, 30/32, 4/32, 28/32} + + local fill_dropdown = function() + local t = { + {value = current_profile, label = Loc ["STRING_OPTIONS_PROFILE_USENEW"], onclick = on_select_profile, icon = [[Interface\FriendsFrame\UI-Toast-FriendRequestIcon]], texcoord = {4/32, 30/32, 4/32, 28/32}, iconcolor = "orange"} + } + for _, profilename in ipairs (_detalhes:GetProfileList()) do + if (profilename ~= current_profile) then + t[#t+1] = {value = profilename, label = profilename, onclick = on_select_profile, icon = [[Interface\FriendsFrame\UI-Toast-FriendOnlineIcon]], texcoord = texcoord, iconcolor = "yellow"} + end + end + return t + end + + local dropdown = _detalhes.gump:NewDropDown (f, f, "DetailsProfilerProfileSelectorDropdown", "dropdown", 220, 20, fill_dropdown, 1) + dropdown:SetPoint (15, -190) + + local confirm_func = function() + if (current_profile ~= _detalhes:GetCurrentProfileName()) then + _detalhes:EraseProfile (current_profile) + end + f:Hide() + end + local confirm = _detalhes.gump:NewButton (f, f, "DetailsProfilerProfileConfirmButton", "button", 150, 20, confirm_func, nil, nil, nil, "okey!") + confirm:SetPoint (50, -250) + confirm:InstallCustomTexture() + + end + --> minimap icon and hotcorner function _detalhes:RegisterMinimapAndHotCorner() local LDB = LibStub ("LibDataBroker-1.1", true) diff --git a/framework/dropdown.lua b/framework/dropdown.lua index 093599a3..37d3e24b 100644 --- a/framework/dropdown.lua +++ b/framework/dropdown.lua @@ -421,7 +421,11 @@ function DropDownMetaFunctions:Selected (_table) end if (_table.iconcolor) then - self.icon:SetVertexColor (unpack (_table.iconcolor)) + if (type (_table.iconcolor) == "string") then + self.icon:SetVertexColor (gump:ParseColors (_table.iconcolor)) + else + self.icon:SetVertexColor (unpack (_table.iconcolor)) + end else self.icon:SetVertexColor (1, 1, 1, 1) end @@ -593,7 +597,11 @@ function DetailsDropDownOnMouseDown (button) end if (_table.iconcolor) then - _this_row.icon:SetVertexColor (unpack (_table.iconcolor)) + if (type (_table.iconcolor) == "string") then + _this_row.icon:SetVertexColor (gump:ParseColors (_table.iconcolor)) + else + _this_row.icon:SetVertexColor (unpack (_table.iconcolor)) + end else _this_row.icon:SetVertexColor (1, 1, 1, 1) end diff --git a/functions/loaddata.lua b/functions/loaddata.lua index 5198ee30..adb66e64 100644 --- a/functions/loaddata.lua +++ b/functions/loaddata.lua @@ -292,8 +292,9 @@ function _detalhes:LoadConfig() end --> profile - --> fix for the 500 + --> character first run if (_detalhes_database.active_profile == "") then + _detalhes.character_first_run = true --> é a primeira vez que este character usa profiles, precisa copiar as keys existentes local current_profile_name = _detalhes:GetCurrentProfileName() _detalhes:GetProfile (current_profile_name, true) diff --git a/functions/spells.lua b/functions/spells.lua index dae0a90f..fa2ea4d9 100644 --- a/functions/spells.lua +++ b/functions/spells.lua @@ -1007,6 +1007,7 @@ do [108270] = {60, 5, 1}, -- Stone Bulwark Totem [108280] = {180, 12}, -- Healing Tide Totem [98008] = {180, 6}, -- Spirit Link Totem + [108281] = {120, 10}, -- Ancestral Guidance --["WARLOCK"] = {108416, 6229}, [108416] = {60, 20, 1}, -- Sacrificial Pact 1 = self @@ -1748,7 +1749,6 @@ do [2825] = true, -- Bloodlust [114049] = true, -- Ascendance [16166] = true, -- Elemental Mastery - [108281] = true, -- Ancestral Guidance [51533] = true, -- Feral Spirit [16188] = true, -- Ancestral Swiftness [2062] = true, -- Earth Elemental Totem diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index d4acf3a7..183cc760 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -1029,7 +1029,7 @@ function window:CreateFrame20() -- text size g:NewLabel (frame20, _, "$parentTooltipTextSizeLabel", "TooltipTextSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTSIZE"], "GameFontHighlightLeft") - local s = g:NewSlider (frame20, _, "$parentTooltipTextSizeSlider", "TooltipTextSizeSlider", SLIDER_WIDTH, 20, 8, 25, 1, tonumber (_detalhes.tooltip.fontsize)) + local s = g:NewSlider (frame20, _, "$parentTooltipTextSizeSlider", "TooltipTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber (_detalhes.tooltip.fontsize)) s:SetBackdrop (slider_backdrop) s:SetBackdropColor (unpack (slider_backdrop_color)) s:SetThumbSize (50) @@ -1966,6 +1966,21 @@ function window:CreateFrame18() --local confirm_button = g:NewButton (frame18, nil, "$parentDeleteInstanceButton", "deleteInstanceButton", 60, 20, delete_instance, nil, nil, nil, "delete") --confirm_button:InstallCustomTexture() + + --> menu text size + g:NewLabel (frame18, _, "$parentMenuTextSizeLabel", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_MENU_FONT_SIZE"], "GameFontHighlightLeft") + local s = g:NewSlider (frame18, _, "$parentMenuTextSizeSlider", "MenuTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, _detalhes.font_sizes.menus) + s:SetBackdrop (slider_backdrop) + s:SetBackdropColor (unpack (slider_backdrop_color)) + s:SetThumbSize (50) + + frame18.MenuTextSizeSlider:SetPoint ("left", frame18.MenuTextSizeLabel, "right", 2) + + frame18.MenuTextSizeSlider:SetHook ("OnValueChange", function (_, _, amount) + _detalhes.font_sizes.menus = amount + end) + + window:CreateLineBackground2 (frame18, "MenuTextSizeSlider", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_MENU_FONT_SIZE_DESC"]) --> Report g:NewLabel (frame18, _, "$parentReportHelpfulLinkLabel", "ReportHelpfulLinkLabel", Loc ["STRING_OPTIONS_REPORT_HEALLINKS"], "GameFontHighlightLeft") @@ -2015,11 +2030,13 @@ function window:CreateFrame18() {"instancesMiscLabel", 1, true}, {"deleteInstanceLabel", 2}, - {"totalBarAnchorLabel", 3, true}, - {"totalBarIconLabel", 4}, - {"totalBarPickColorLabel", 5}, - {"totalBarLabel", 6}, - {"totalBarOnlyInGroupLabel", 7}, + {"totalBarAnchorLabel", 4, true}, + {"totalBarIconLabel", 5}, + {"totalBarPickColorLabel", 6}, + {"totalBarLabel", 7}, + {"totalBarOnlyInGroupLabel", 8}, + + {"MenuTextSizeLabel", 3} } window:arrange_menu (frame18, right_side, window.right_start_at, -90) @@ -2938,7 +2955,7 @@ function window:CreateFrame14() --size g:NewLabel (frame14, _, "$parentAttributeTextSizeLabel", "attributeTextSizeLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTSIZE"], "GameFontHighlightLeft") - local s = g:NewSlider (frame14, _, "$parentAttributeTextSizeSlider", "attributeTextSizeSlider", SLIDER_WIDTH, 20, 8, 25, 1, tonumber ( instance.attribute_text.text_size)) + local s = g:NewSlider (frame14, _, "$parentAttributeTextSizeSlider", "attributeTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber ( instance.attribute_text.text_size)) s:SetBackdrop (slider_backdrop) s:SetBackdropColor (unpack (slider_backdrop_color)) s:SetThumbSize (50) @@ -4711,7 +4728,7 @@ function window:CreateFrame5() window:CreateLineBackground2 (frame5, "fixedTextColor", "fixedTextColorLabel", Loc ["STRING_OPTIONS_TEXT_FIXEDCOLOR_DESC"]) --> text size - local s = g:NewSlider (frame5, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.row_info.font_size)) + local s = g:NewSlider (frame5, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber (instance.row_info.font_size)) s:SetBackdrop (slider_backdrop) s:SetBackdropColor (unpack (slider_backdrop_color)) s:SetThumbSize (50) @@ -5715,7 +5732,7 @@ function window:CreateFrame8() --> instance button --text size - local s = g:NewSlider (frame8, _, "$parentInstanceTextSizeSlider", "instanceTextSizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.instancebutton_config.textsize)) + local s = g:NewSlider (frame8, _, "$parentInstanceTextSizeSlider", "instanceTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber (instance.instancebutton_config.textsize)) s:SetBackdrop (slider_backdrop) s:SetBackdropColor (unpack (slider_backdrop_color)) s:SetThumbSize (50) @@ -7657,6 +7674,8 @@ function window:update_all (editing_instance) _G.DetailsOptionsWindow18TotalBarOnlyInGroupSlider.MyObject:SetValue (editing_instance.total_bar.only_in_group) _G.DetailsOptionsWindow18TotalBarIconTexture.MyObject:SetTexture (editing_instance.total_bar.icon) + _G.DetailsOptionsWindow18MenuTextSizeSlider.MyObject:SetValue (_detalhes.font_sizes.menus) + --> window 19 _G.DetailsOptionsWindow19MinimapSlider.MyObject:SetValue (not _detalhes.minimap.hide) _G.DetailsOptionsWindow19MinimapActionDropdown.MyObject:Select (_detalhes.minimap.onclick_what_todo) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 219077d9..e6e4493a 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -1195,13 +1195,14 @@ local function resize_scripts (resizer, instancia, scrollbar, side, baseframe) self.texture:SetBlendMode ("ADD") self.mostrando = true - _G.GameCooltip:Reset() - _G.GameCooltip:SetType ("tooltip") - _G.GameCooltip:AddFromTable (resizeTooltip) - _G.GameCooltip:SetOption ("NoLastSelectedBar", true) - _G.GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) - _G.GameCooltip:SetOwner (resizer) - _G.GameCooltip:ShowCooltip() + GameCooltip:Reset() + GameCooltip:SetType ("tooltip") + GameCooltip:AddFromTable (resizeTooltip) + GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus) + GameCooltip:SetOption ("NoLastSelectedBar", true) + GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + GameCooltip:SetOwner (resizer) + GameCooltip:ShowCooltip() end end) @@ -1217,7 +1218,7 @@ local function resize_scripts (resizer, instancia, scrollbar, side, baseframe) self.texture:SetBlendMode ("BLEND") self.mostrando = false - _G.GameCooltip:ShowMe (false) + GameCooltip:ShowMe (false) end end) end @@ -1239,6 +1240,7 @@ local lockFunctionOnEnter = function (self) GameCooltip:SetType ("tooltip") GameCooltip:AddFromTable (lockButtonTooltip) GameCooltip:SetOption ("NoLastSelectedBar", true) + GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) GameCooltip:SetOwner (self) GameCooltip:ShowCooltip() @@ -1251,7 +1253,7 @@ local lockFunctionOnLeave = function (self) OnLeaveMainWindow (self.instancia, self) self.label:SetTextColor (.3, .3, .3, .6) self.mostrando = false - _G.GameCooltip:ShowMe (false) + GameCooltip:ShowMe (false) end end @@ -1321,6 +1323,7 @@ local unSnapButtonOnEnter = function (self) GameCooltip:Reset() GameCooltip:AddFromTable (unSnapButtonTooltip) + GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) GameCooltip:ShowCooltip (self, "tooltip") @@ -5686,11 +5689,11 @@ end local font = SharedMedia:Fetch ("font", "Friz Quadrata TT") - GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, 10, font) + GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font) GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red") GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar) - GameCooltip:AddLine (Loc ["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, 10, font) + GameCooltip:AddLine (Loc ["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font) GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "orange") GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar_overall) @@ -5754,14 +5757,14 @@ end GameCooltip:SetOption ("FixedWidthSub", 180) local font = SharedMedia:Fetch ("font", "Friz Quadrata TT") - GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 1, "white", nil, 10, font) + GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font) GameCooltip:AddIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], 1, 1, 14, 14, 0.2, 0.8, 0.2, 0.8) GameCooltip:AddMenu (1, close_button_onclick, self) - GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC"], nil, 2, "white", nil, 10, font) + GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC"], nil, 2, "white", nil, _detalhes.font_sizes.menus, font) GameCooltip:AddIcon ([[Interface\CHATFRAME\UI-ChatIcon-Minimize-Up]], 2, 1, 18, 18) - GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC2"], nil, 2, "white", nil, 10, font) + GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC2"], nil, 2, "white", nil, _detalhes.font_sizes.menus, font) GameCooltip:AddIcon ([[Interface\PaperDollInfoFrame\UI-GearManager-LeaveItem-Transparent]], 2, 1, 18, 18) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) @@ -6225,7 +6228,7 @@ function gump:CriaCabecalho (baseframe, instancia) GameCooltip:SetOption ("TextHeightMod", 0) GameCooltip:SetOption ("IgnoreButtonAutoHeight", false) - GameCooltip:AddLine ("Report Results", nil, 1, "white", nil, 10, SharedMedia:Fetch ("font", "Friz Quadrata TT")) + GameCooltip:AddLine ("Report Results", nil, 1, "white", nil, _detalhes.font_sizes.menus, SharedMedia:Fetch ("font", "Friz Quadrata TT")) GameCooltip:AddIcon ([[Interface\Addons\Details\Images\report_button]], 1, 1, 12, 19) GameCooltip:AddMenu (1, _detalhes.Reportar, instancia) @@ -6350,7 +6353,7 @@ function gump:CriaCabecalho (baseframe, instancia) end end - + CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus) end end diff --git a/startup.lua b/startup.lua index b83cde73..99b37045 100644 --- a/startup.lua +++ b/startup.lua @@ -425,33 +425,7 @@ function _G._detalhes:Start() _detalhes.schedule_chat_enter = _detalhes:ScheduleTimer ("EnterChatChannel", 30) end - local f = CreateFrame ("frame", "DetailsSelectProfile", UIParent) - f:SetSize (250, 300) - f:SetPoint ("center", UIParent) - f:SetMovable (true) - f:SetScript ("OnMouseDown", function (self) - if (not self.moving) then - self:StartMoving() - self.moving = true - end - end) - f:SetScript ("OnMouseUp", function (self) - if (self.moving) then - self:StopMovingOrSizing() - self.moving = false - end - end) + _detalhes:OpenProfiler() - local background = f:CreateTexture (nil, "background") - background:SetAllPoints() - background:SetTexture ([[Interface\AddOns\Details\images\welcome]]) - - local logo = f:CreateTexture (nil, "artwork") - logo:SetTexture ([[Interface\AddOns\Details\images\logotipo]]) - logo:SetSize (256*0.8, 128*0.8) - logo:SetPoint ("center", f, "center", 0, 0) - logo:SetPoint ("top", f, "top", 20, 20) - - f:Hide() end