Thread Tools Display Modes
01-07-19, 04:48 AM   #1
candrid
Premium Member
 
candrid's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 61
Hiding Frames (party in this case)

Here is what I have so far:

lua Code:
  1. SLASH_PANE1 = "/pane"; -- creates the slash command to toggle the pane on and off.
  2. SlashCmdList.PANE = function(arg)
  3.   BottomPane:SetShown(not BottomPane:IsVisible())
  4.   PlayerFrame:SetShown(not PlayerFrame:IsVisible())
  5.   MinimapCluster:SetShown(not MinimapCluster:IsVisible())
  6. end

What I am trying to figure out is how to toggle, if you will the party frame when the /pane command is used.
I also tried working with hiding the UIParent, but then the pane would not show.

Any thoughts? Am I going the wrong way with this?

- Thanks!
  Reply With Quote
01-07-19, 09:04 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Use IsShown() rather than IsVisible()
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
01-07-19, 02:34 PM   #3
candrid
Premium Member
 
candrid's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 61
Originally Posted by Fizzlemizz View Post
Use IsShown() rather than IsVisible()
Would that include things like the party frame and actionbars?
  Reply With Quote
01-07-19, 03:08 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Toggling the show state of secure frames like unit frames and action bars can be problematic because if you do it in combat you will get errors.

Normally you would register the condition(s) you want them shown/hidden using RegisterStateDriver() and let the game look after them, like:

Code:
RegisterStateDriver(PlayerFrame, "visibility", "[petbattle] hide; default")
To hide when entering a pet battle and show again when leaving.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
01-07-19, 05:42 PM   #5
candrid
Premium Member
 
candrid's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 61
Hey, thanks!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Hiding Frames (party in this case)

Thread Tools
Display Modes

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