Thread Tools Display Modes
08-11-18, 10:05 PM   #1
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Wowpedia has a good example on that.

https://wow.gamepedia.com/Creating_a_slash_command

Depending on which frame it is you're looking to toggle on and off, it should be as simple as adding if not frame:IsShown() then frame:Show() else frame:Hide() end in your handler function (replacing "frame" with the frame in question, of course.)

Not sure if :IsVisible() or :IsShown() would be preferable, you might have to experiment. Or someone probably knows. But since you'd be calling :Show() and :Hide() on that very same frame, :IsShown() should work fine.

Last edited by Ammako : 08-11-18 at 10:09 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Slash Command Opening 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