View Single Post
04-28-21, 04:45 PM   #4
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 321
Originally Posted by SDPhantom View Post
That'll open the calendar every time you load in a new area too.
Good point! :-) Make it this then:

Lua Code:
  1. local f = CreateFrame("Frame")
  2. f:SetScript("OnEvent", function(_, _, isLogin, isReload)
  3.   if isLogin or isReload then ToggleCalendar() end
  4. end)
  5. f:RegisterEvent("PLAYER_ENTERING_WORLD")

Originally Posted by SDPhantom View Post
I'd suggest using PLAYER_LOGIN instead.
Also good, if you don't care about the reload.
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote