WoWInterface - View Single Post - Auto open calendar on login
View Single Post
04-28-21, 04:45 PM   #4
A Frostmaul Preserver
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 283
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