Skip to content

Commit

Permalink
BossBanner: add Show and Test buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Zidras committed Dec 4, 2024
1 parent 53a9fc8 commit 8718444
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DBM-Core/DBM-BossBannerToast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ local function TopBannerManager_BannerFinished()
-- TopBannerMgr.currentBanner.frame:PlayBanner(TopBannerMgr.currentBanner.data) -- Needs investigation, crashes the client!
DBM:Schedule(0, TopBannerMgr.currentBanner.frame.PlayBanner, TopBannerMgr.currentBanner.frame, TopBannerMgr.currentBanner.data)
else
if next(TopBannerMgr.currentBanner.frame.pendingLoot) then -- has pending loot, send next
if TopBannerMgr.currentBanner and next(TopBannerMgr.currentBanner.frame.pendingLoot) then -- has pending loot, send next. Checking for currentBanner to prevent nil Lua error on right-click
TopBannerMgr.currentBanner.data.mode = "LOOT" -- change mode to LOOT, since KILL would show kill banner again
DBM:Schedule(0, TopBannerMgr.currentBanner.frame.PlayBanner, TopBannerMgr.currentBanner.frame, TopBannerMgr.currentBanner.data)
else
Expand Down
2 changes: 1 addition & 1 deletion DBM-Core/DBM-Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ local function currentFullDate()
end

DBM = {
Revision = parseCurseDate("20241203201400"),
Revision = parseCurseDate("20241204152045"),
DisplayVersion = "10.1.13 alpha", -- the string that is shown as version
ReleaseRevision = releaseDate(2024, 07, 20) -- the date of the latest stable version that is available, optionally pass hours, minutes, and seconds for multiple releases in one day
}
Expand Down
17 changes: 17 additions & 0 deletions DBM-GUI/modules/options/filters/GlobalDisables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,20 @@ fontSizeSlider:HookScript("OnValueChanged", function(self)
DBM.Options.BBFontSize = self:GetValue()
BossBanner:UpdateStyle()
end)

-- BossBanner Test Buttons
local testButton = spamBBArea:CreateButton(ANIMATION, 120, 16)
testButton:SetPoint("TOPRIGHT", spamBBArea.frame, "TOPRIGHT", -2, -4)
testButton:SetNormalFontObject(GameFontNormalSmall)
testButton:SetHighlightFontObject(GameFontNormalSmall)
testButton:SetScript("OnClick", function()
BossBanner:Test()
end)

local showButton = spamBBArea:CreateButton(SHOW_TOAST_WINDOW_TEXT, 100, 16)
showButton:SetPoint("BOTTOMRIGHT", testButton, "BOTTOMLEFT", -2, 0)
showButton:SetNormalFontObject(GameFontNormalSmall)
showButton:SetHighlightFontObject(GameFontNormalSmall)
showButton:SetScript("OnClick", function()
BossBanner:Show()
end)

0 comments on commit 8718444

Please sign in to comment.