Thread Tools Display Modes
07-28-10, 04:07 AM   #1
Kagenoshin
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 12
Calendar Frame

Hi,

is there a way to open the calendar frame, without using /calendar or the minimapbutton?
i didn't found an api to open the calendar
Because i want to open the calendar using a button, which i can hide an show even if I'm in combat, which of corse doesn't work, if I'm using a securebutton with the makro: /calendar.

Greets Kage
  Reply With Quote
07-28-10, 04:10 AM   #2
v6o
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 399
Calendar_Toggle() or Calendar_Show()



AddOns/Blizzard_Calendar/Blizzard_Calendar.lua
Code:
-- CalendarFrame

function Calendar_Toggle()
    if ( CalendarFrame:IsShown() ) then
        Calendar_Hide();
    else
        Calendar_Show();
    end
end

function Calendar_Hide()
    HideUIPanel(CalendarFrame);
end

function Calendar_Show()
    ShowUIPanel(CalendarFrame);
end
__________________
I stopped playing back World of Warcraft in 2010 and I have no plans on returning.
This is a dead account and if you want to continue any of my addons or make a fork then feel free to do so.
This is your permission slip.

If you need to contact me, do so on Twitter @v6ooo

Best regards, v6.
  Reply With Quote
07-28-10, 04:44 AM   #3
Kagenoshin
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 12
lol
thx a lot
  Reply With Quote
07-28-10, 05:07 AM   #4
Kagenoshin
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 12
ah now I see what was wrong
The Calendar wasn't loaded, right after loggin. Thats why my first attempt didn't work and I had to use the makro /calendar.

my function is now (and this works fine ) :
Code:
if ( not IsAddOnLoaded("Blizzard_Calendar") ) then
         UIParentLoadAddOn("Blizzard_Calendar");
end
if ( Calendar_Toggle ) then
 	Calendar_Toggle();
end

thx a lot!
  Reply With Quote
08-08-10, 06:37 AM   #5
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
Post

Originally Posted by Kagenoshin View Post
ah now I see what was wrong
The Calendar wasn't loaded, right after loggin. Thats why my first attempt didn't work and I had to use the makro /calendar.

my function is now (and this works fine ) :
Code:
if ( not IsAddOnLoaded("Blizzard_Calendar") ) then
         UIParentLoadAddOn("Blizzard_Calendar");
end
if ( Calendar_Toggle ) then
 	Calendar_Toggle();
end

thx a lot!
you could make it simple by just adding this in a code

Code:
Minimap:SetScript('OnMouseUp', function(self, button)
    if (button == 'MiddleButton') then
        ToggleCalendar()
    else
        Minimap_OnClick(self)
    end
end)
GameTimeFrame and set that to hide it. from showing your mm.

so all you do is right click on the minimap.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Calendar Frame


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off