diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 256e0a15..a5eda646 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,5 +1,5 @@ -local dversion = 133 +local dversion = 134 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index e17f4a31..839e7c83 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -7343,6 +7343,7 @@ DF.CastFrameFunctions = { SparkTexture = [[Interface\CastingBar\UI-CastingBar-Spark]], SparkWidth = 16, SparkHeight = 16, + SparkOffset = 0, }, Initialize = function (self) @@ -7458,7 +7459,7 @@ DF.CastFrameFunctions = { end end - --> check if passed an event + --> check if passed an event (not begin used at the moment) if (event) then if (event == UNIT_SPELLCAST_STOP or event == UNIT_SPELLCAST_CHANNEL_STOP) then isFinished = true @@ -7468,13 +7469,12 @@ DF.CastFrameFunctions = { --> the cast is finished if (isFinished) then - self.finished = true - self:SetValue (self.maxValue) - self:UpdateCastColor() - self.Spark:Hide() - - --animations - self:Animation_FadeOut() + if (self.casting) then + self.UNIT_SPELLCAST_STOP (self, self.unit, self.unit, self.castID, self.spellID) + + elseif (self.channeling) then + self.UNIT_SPELLCAST_CHANNEL_STOP (self, self.unit, self.unit, self.castID, self.spellID) + end return true end @@ -7549,7 +7549,11 @@ DF.CastFrameFunctions = { --just to make sure it isn't casting if (not timerObject.castBar.casting and not timerObject.castBar.channeling) then - timerObject.castBar:Animation_FadeOut() + if (not timerObject.castBar.Settings.NoFadeEffects) then + timerObject.castBar:Animation_FadeOut() + else + timerObject.castBar:Hide() + end end end, @@ -7636,7 +7640,7 @@ DF.CastFrameFunctions = { DF_CalcCpuUsage ("CastBar-OnEvent") return end - + local eventFunc = self [event] if (eventFunc) then eventFunc (self, unit, ...) @@ -7682,12 +7686,12 @@ DF.CastFrameFunctions = { --update spark position local sparkPosition = self.value / self.maxValue * self:GetWidth() - self.Spark:SetPoint ("center", self, "left", sparkPosition, 0) + self.Spark:SetPoint ("center", self, "left", sparkPosition + self.Settings.SparkOffset, 0) --in order to allow the lazy tick run, it must return true, it tell that the cast didn't finished return true end, - + --> tick function for channeling casts OnTick_Channeling = function (self, deltaTime) self.value = self.value - deltaTime @@ -7700,7 +7704,7 @@ DF.CastFrameFunctions = { --update spark position local sparkPosition = self.value / self.maxValue * self:GetWidth() - self.Spark:SetPoint ("center", self, "left", sparkPosition, 0) + self.Spark:SetPoint ("center", self, "left", sparkPosition + self.Settings.SparkOffset, 0) return true end, @@ -7941,47 +7945,64 @@ DF.CastFrameFunctions = { UNIT_SPELLCAST_STOP = function (self, unit, ...) local unitID, castID, spellID = ... - if (self.castID == castID) then self.Spark:Hide() - self.percentText:Hide()self.percentText:Hide() - self:SetValue (self.maxValue or select (2, self:GetMinMaxValues()) or 1) + self.percentText:Hide() + + local value = self:GetValue() + local _, maxValue = self:GetMinMaxValues() + self:SetValue (self.maxValue or maxValue or 1) self.casting = nil self.finished = true if (not self:HasScheduledHide()) then --> check if settings has no fade option or if its parents are not visible - if (self.Settings.NoFadeEffects or not self:IsVisible()) then + if (not self:IsVisible()) then self:Hide() + + elseif (self.Settings.NoFadeEffects) then + self:ScheduleToHide (0.3) + else self:Animation_Flash() self:Animation_FadeOut() end end + + self:UpdateCastColor() end end, UNIT_SPELLCAST_CHANNEL_STOP = function (self, unit, ...) - local unitID, castGUID, spellID = ... + local unitID, castID, spellID = ... - if (self.channeling) then + if (self.channeling and castID == self.castID) then self.Spark:Hide() self.percentText:Hide() - self:SetValue (self.maxValue or select (2, self:GetMinMaxValues()) or 1) + + local value = self:GetValue() + local _, maxValue = self:GetMinMaxValues() + self:SetValue (self.maxValue or maxValue or 1) self.channeling = nil self.finished = true if (not self:HasScheduledHide()) then --> check if settings has no fade option or if its parents are not visible - if (self.Settings.NoFadeEffects or not self:IsVisible()) then + if (not self:IsVisible()) then self:Hide() + + elseif (self.Settings.NoFadeEffects) then + self:ScheduleToHide (0.3) + else self:Animation_Flash() self:Animation_FadeOut() end end + + self:UpdateCastColor() end end, @@ -8008,7 +8029,7 @@ DF.CastFrameFunctions = { UNIT_SPELLCAST_INTERRUPTED = function (self, unit, ...) local unitID, castID, spellID = ... - + if (self.casting and castID == self.castID and not self.fadeOut) then self.casting = nil self.channeling = nil @@ -8100,14 +8121,15 @@ function DF:CreateCastBar (parent, name, settingsOverride) castBar.Text:SetDrawLayer ("overlay", 1) castBar.BorderShield = castBar:CreateTexture (nil, "overlay") - castBar.BorderShield:SetDrawLayer ("overlay", 2) + castBar.BorderShield:SetDrawLayer ("overlay", 5) castBar.BorderShield:Hide() castBar.Icon = castBar:CreateTexture (nil, "overlay") - castBar.Icon:SetDrawLayer ("overlay", 1) + castBar.Icon:SetDrawLayer ("overlay", 4) castBar.Icon:Hide() castBar.Spark = castBar:CreateTexture (nil, "overlay") + castBar.Spark:SetDrawLayer ("overlay", 3) castBar.Spark:SetBlendMode ("ADD") --time left on the cast diff --git a/boot.lua b/boot.lua index c58fa63f..cd4b748c 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 = 6873 - _detalhes.alpha_build_counter = 6873 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 6883 + _detalhes.alpha_build_counter = 6883 --if this is higher than the regular counter, use it instead _detalhes.userversion = "v8.1.0." .. _detalhes.build_counter _detalhes.realversion = 135 --core version, this is used to check API version for scripts and plugins (see alias below) _detalhes.APIVersion = _detalhes.realversion --core version diff --git a/functions/link.lua b/functions/link.lua index b66877ba..ca26686d 100644 --- a/functions/link.lua +++ b/functions/link.lua @@ -4866,6 +4866,7 @@ end local detailsOnDeathMenu = CreateFrame ("frame", "DetailsOnDeathMenu", UIParent) detailsOnDeathMenu:SetHeight (30) detailsOnDeathMenu.Debug = false + detailsOnDeathMenu:RegisterEvent ("PLAYER_REGEN_ENABLED") detailsOnDeathMenu:RegisterEvent ("ENCOUNTER_END") DetailsFramework:ApplyStandardBackdrop (detailsOnDeathMenu) @@ -4895,6 +4896,8 @@ function detailsOnDeathMenu.OpenEncounterBreakdown() end Details:OpenPlugin ("Encounter Breakdown") + + GameCooltip2:Hide() end function detailsOnDeathMenu.OpenPlayerEndurance() @@ -4911,6 +4914,8 @@ function detailsOnDeathMenu.OpenPlayerEndurance() C_Timer.After (0, function() local a = Details_DeathGraphsModeEnduranceButton and Details_DeathGraphsModeEnduranceButton.MyObject:Click() end) + + GameCooltip2:Hide() end function detailsOnDeathMenu.OpenPlayerSpells() @@ -4954,7 +4959,8 @@ function detailsOnDeathMenu.OpenPlayerSpells() Details:OpenPlayerDetails (1) end end - + + GameCooltip2:Hide() end --encounter breakdown button @@ -4963,18 +4969,117 @@ detailsOnDeathMenu.breakdownButton:SetTemplate (_detalhes.gump:GetTemplate ("but detailsOnDeathMenu.breakdownButton:SetPoint ("topleft", detailsOnDeathMenu, "topleft", 5, -5) detailsOnDeathMenu.breakdownButton:Hide() +detailsOnDeathMenu.breakdownButton.CoolTip = { + Type = "tooltip", + BuildFunc = function() + GameCooltip2:Preset (2) + GameCooltip2:AddLine ("Show a panel with:") + GameCooltip2:AddLine ("- Player Damage Taken") + GameCooltip2:AddLine ("- Damage Taken by Spell") + GameCooltip2:AddLine ("- Enemy Damage Taken") + GameCooltip2:AddLine ("- Player Deaths") + GameCooltip2:AddLine ("- Interrupts and Dispells") + GameCooltip2:AddLine ("- Damage Done Chart") + GameCooltip2:AddLine ("- Damage Per Phase") + GameCooltip2:AddLine ("- Weakauras Tool") + + if (not _detalhes:GetPlugin ("DETAILS_PLUGIN_ENCOUNTER_DETAILS")) then + GameCooltip2:AddLine ("Encounter Breakdown plugin is disabled in the Addon Control Panel.", "", 1, "red") + end + + end, --> called when user mouse over the frame + OnEnterFunc = function (self) + detailsOnDeathMenu.button_mouse_over = true + end, + OnLeaveFunc = function (self) + detailsOnDeathMenu.button_mouse_over = false + end, + FixedValue = "none", + ShowSpeed = .5, + Options = function() + GameCooltip:SetOption ("MyAnchor", "top") + GameCooltip:SetOption ("RelativeAnchor", "bottom") + GameCooltip:SetOption ("WidthAnchorMod", 0) + GameCooltip:SetOption ("HeightAnchorMod", -13) + GameCooltip:SetOption ("TextSize", 10) + GameCooltip:SetOption ("FixedWidth", 220) + end +} +GameCooltip2:CoolTipInject (detailsOnDeathMenu.breakdownButton) + --player endurance button detailsOnDeathMenu.enduranceButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerEndurance, 120, 20, "Player Endurance", "enduranceButton") detailsOnDeathMenu.enduranceButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE")) detailsOnDeathMenu.enduranceButton:SetPoint ("topleft", detailsOnDeathMenu.breakdownButton, "topright", 2, 0) detailsOnDeathMenu.enduranceButton:Hide() +detailsOnDeathMenu.enduranceButton.CoolTip = { + Type = "tooltip", + BuildFunc = function() + GameCooltip2:Preset (2) + GameCooltip2:AddLine ("Open Player Endurance Breakdown") + GameCooltip2:AddLine ("") + GameCooltip2:AddLine ("Player endurance is calculated using the amount of player deaths.") + GameCooltip2:AddLine ("By default the plugin register the three first player deaths on each encounter to calculate who is under performing.") + + --GameCooltip2:AddLine (" ") + + if (not _detalhes:GetPlugin ("DETAILS_PLUGIN_DEATH_GRAPHICS")) then + GameCooltip2:AddLine ("Advanced Death Logs plugin is disabled or not installed, check the Addon Control Panel or download it from the Twitch APP.", "", 1, "red") + end + + end, --> called when user mouse over the frame + OnEnterFunc = function (self) + detailsOnDeathMenu.button_mouse_over = true + end, + OnLeaveFunc = function (self) + detailsOnDeathMenu.button_mouse_over = false + end, + FixedValue = "none", + ShowSpeed = .5, + Options = function() + GameCooltip:SetOption ("MyAnchor", "top") + GameCooltip:SetOption ("RelativeAnchor", "bottom") + GameCooltip:SetOption ("WidthAnchorMod", 0) + GameCooltip:SetOption ("HeightAnchorMod", -13) + GameCooltip:SetOption ("TextSize", 10) + GameCooltip:SetOption ("FixedWidth", 220) + end +} +GameCooltip2:CoolTipInject (detailsOnDeathMenu.enduranceButton) + --spells detailsOnDeathMenu.spellsButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerSpells, 48, 20, "Spells", "SpellsButton") detailsOnDeathMenu.spellsButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE")) detailsOnDeathMenu.spellsButton:SetPoint ("topleft", detailsOnDeathMenu.enduranceButton, "topright", 2, 0) detailsOnDeathMenu.spellsButton:Hide() +detailsOnDeathMenu.spellsButton.CoolTip = { + Type = "tooltip", + BuildFunc = function() + GameCooltip2:Preset (2) + GameCooltip2:AddLine ("Open your player Details! breakdown.") + + end, --> called when user mouse over the frame + OnEnterFunc = function (self) + detailsOnDeathMenu.button_mouse_over = true + end, + OnLeaveFunc = function (self) + detailsOnDeathMenu.button_mouse_over = false + end, + FixedValue = "none", + ShowSpeed = .5, + Options = function() + GameCooltip:SetOption ("MyAnchor", "top") + GameCooltip:SetOption ("RelativeAnchor", "bottom") + GameCooltip:SetOption ("WidthAnchorMod", 0) + GameCooltip:SetOption ("HeightAnchorMod", -13) + GameCooltip:SetOption ("TextSize", 10) + GameCooltip:SetOption ("FixedWidth", 220) + end +} +GameCooltip2:CoolTipInject (detailsOnDeathMenu.spellsButton) + function detailsOnDeathMenu.CanShowPanel() if (StaticPopup_Visible ("DEATH")) then if (not _detalhes.on_death_menu) then diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 239bef9f..4aeb0b45 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -4738,11 +4738,34 @@ function gump:CriaJanelaInfo() end if (#tabOBject.players > 0) then + --tutorial flash + local blink = _detalhes:GetTutorialCVar ("DETAILS_INFO_TUTORIAL2") or 0 + if (type (blink) == "number" and blink < 10) then + + if (not tabOBject.FlashAnimation) then + local flashAnimation = tabOBject:CreateTexture (nil, "overlay") + flashAnimation:SetPoint ("topleft", tabOBject.widget, "topleft", 1, -1) + flashAnimation:SetPoint ("bottomright", tabOBject.widget, "bottomright", -1, 1) + flashAnimation:SetColorTexture (1, 1, 1) + + local flashHub = DetailsFramework:CreateAnimationHub (flashAnimation, function() flashAnimation:Show() end, function() flashAnimation:Hide() end) + DetailsFramework:CreateAnimation (flashHub, "alpha", 1, 1, 0, 0.3) + DetailsFramework:CreateAnimation (flashHub, "alpha", 2, 1, 0.45, 0) + flashHub:SetLooping ("REPEAT") + + tabOBject.FlashAnimation = flashHub + end + + _detalhes:SetTutorialCVar ("DETAILS_INFO_TUTORIAL2", blink+1) + + tabOBject.FlashAnimation:Play() + end + return true end --return false - return true + return true --debug? end, compare_fill, --[3] fill function @@ -4777,16 +4800,7 @@ function gump:CriaJanelaInfo() alert:SetPoint ("bottom", tab, "top", 5, 28) alert:Show() end - - local blink = _detalhes:GetTutorialCVar ("DETAILS_INFO_TUTORIAL2") or 0 - if (type (blink) == "number" and blink < 10) then - _detalhes:SetTutorialCVar ("DETAILS_INFO_TUTORIAL2", blink+1) - if (not tab.glow.Flash) then - gump:CreateFlashAnimation (tab.glow) - end - tab.glow:Flash (4.5, 0.8, 6, false, 0, 0, "NONE") - end - + end tab:Show() @@ -4800,6 +4814,7 @@ function gump:CriaJanelaInfo() PixelUtil.SetSize (tab, buttonTemplate.width, buttonTemplate.height) PixelUtil.SetPoint (tab, "bottomright", info, "topright", -9 - (buttonWidth * (amt_positive-1)), -72) tab:SetAlpha (0.8) + else tab.frame:Hide() tab:Hide() diff --git a/plugins/Details_3DModelsPaths/Details_3DModelsPaths.toc b/plugins/Details_3DModelsPaths/Details_3DModelsPaths.toc index af3de1a8..7215aec3 100644 --- a/plugins/Details_3DModelsPaths/Details_3DModelsPaths.toc +++ b/plugins/Details_3DModelsPaths/Details_3DModelsPaths.toc @@ -1,5 +1,5 @@ ## Interface: 80100 -## Title: Details! 3D Model Viewer +## Title: Details!: 3D Model Viewer ## Notes: When the 3d models option is enabled, this tool is used to select which model will be used on the window's rows. ## DefaultState: Enabled ## LoadOnDemand: 1 diff --git a/plugins/Details_DataStorage/Details_DataStorage.toc b/plugins/Details_DataStorage/Details_DataStorage.toc index 140ed990..a10a661d 100644 --- a/plugins/Details_DataStorage/Details_DataStorage.toc +++ b/plugins/Details_DataStorage/Details_DataStorage.toc @@ -1,6 +1,6 @@ ## Interface: 80100 -## Title: Details Storage -## Notes: Stores information for Details! +## Title: Details!: Storage +## Notes: Stores information for Details! Damage Meter ## DefaultState: Enabled ## LoadOnDemand: 1 ## Dependencies: Details diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.toc b/plugins/Details_RaidCheck/Details_RaidCheck.toc index 7b11887e..bd82e14c 100644 --- a/plugins/Details_RaidCheck/Details_RaidCheck.toc +++ b/plugins/Details_RaidCheck/Details_RaidCheck.toc @@ -1,6 +1,6 @@ ## Interface: 80100 -## Title: Details Raid Check (plugin) -## Notes: Show a icon on Details title bar showing flask, food, pre-pots. +## Title: Details!: Raid Check (plugin) +## Notes: Show talents and item level for all members in your group, also shows food and flask state. ## RequiredDeps: Details #@no-lib-strip@ diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.toc b/plugins/Details_TinyThreat/Details_TinyThreat.toc index 18c5a7e9..4292dc5f 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.toc +++ b/plugins/Details_TinyThreat/Details_TinyThreat.toc @@ -1,6 +1,6 @@ ## Interface: 80100 -## Title: Details Tiny Threat (plugin) -## Notes: Plugin for Details +## Title: Details!: Tiny Threat (plugin) +## Notes: Threat meter plugin, show threat for group members in the window. Select it from the Plugin menu in the Orange Cogwheel. ## RequiredDeps: Details ## OptionalDeps: Ace3 diff --git a/plugins/Details_Vanguard/Details_Vanguard.toc b/plugins/Details_Vanguard/Details_Vanguard.toc index bc06d9fc..f4ae0dd9 100644 --- a/plugins/Details_Vanguard/Details_Vanguard.toc +++ b/plugins/Details_Vanguard/Details_Vanguard.toc @@ -1,6 +1,6 @@ ## Interface: 80100 -## Title: Details Vanguard (plugin) -## Notes: Plugin for Details +## Title: Details!: Vanguard (plugin) +## Notes: Show the health and debuffs for tanks in your group. ## SavedVariablesPerCharacter: _detalhes_databaseVanguard ## RequiredDeps: Details ## OptionalDeps: Ace3