mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-06 02:28:58 +00:00
Clear AFK when a holiday scene is clicked
This commit is contained in:
@@ -2,7 +2,7 @@ pfUI:RegisterModule("easteregg", function ()
|
|||||||
local today = date("%m%d")
|
local today = date("%m%d")
|
||||||
|
|
||||||
-- A full screen scene for the time the player is AFK on a holiday. The
|
-- A full screen scene for the time the player is AFK on a holiday. The
|
||||||
-- night fades in, and a click or coming back hides it again.
|
-- night fades in, and a click or coming back clears AFK and hides it.
|
||||||
local function CreateScene(name, greeting, info)
|
local function CreateScene(name, greeting, info)
|
||||||
local scene = CreateFrame("Button", name, WorldFrame)
|
local scene = CreateFrame("Button", name, WorldFrame)
|
||||||
scene:SetFrameStrata("DIALOG")
|
scene:SetFrameStrata("DIALOG")
|
||||||
@@ -46,7 +46,9 @@ pfUI:RegisterModule("easteregg", function ()
|
|||||||
this:StopAnimating()
|
this:StopAnimating()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- /afk toggles, so send it only while AFK is still set
|
||||||
scene:SetScript("OnClick", function()
|
scene:SetScript("OnClick", function()
|
||||||
|
if IsChatAFK() then SendChatMessage("", "AFK") end
|
||||||
this:Hide()
|
this:Hide()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user