Go Back   WowAce Forums > General > Lua Code Discussion
Lua Code Discussion You scared? Terrified. Mortified. Petrified. Stupefied... by [coding].

Reply
 
Thread Tools
Old 02-02-2012   #1
sapu94
Full Member
 
Join Date: Feb 2010
Posts: 107
Default Hiding a Frame without Physically Hiding it

So, in some situations, my addon places a frame behind the auction frame in order to allow stuff to run "in the background." While this may sound like an unnecessary "hack" and something that shouldn't be done in the first place, I can assure you that there's good reasons for why I do it that way.

Anyways, here's my question. Some users have addons that make their auction frame transparent, which makes my frame look ugly hiding behind the auction frame. I'm wondering what the best way around this would be. Is there a way to make a frame and all it's children opaque without having to iterate through everything? I've also considered moving my frame off the screen instead of having it hide behind the auction house, but I'm not sure that'd be a good idea.

Thanks

PS: Oh hey this is my 100th post, I feel special
__________________
Lead developer of the TradeSkillMaster gold making addon.

"A good programmer is someone who always looks both ways before crossing a one-way street." ~Doug Linder
sapu94 is offline   Reply With Quote
Old 02-02-2012   #2
Farmbuyer
Amazing Member
 
Farmbuyer's Avatar
 
Join Date: Feb 2005
Posts: 1,107
Default Re: Hiding a Frame without Physically Hiding it

Does the frame in question have visible elements, or does it just need to respond to events?

It sounds like the latter, in which case you don't need to do any sizing or placement or anything, merely :Show and :Hide. Nothing will appear on the screen anywhere because it has zero dimensions.
__________________
In wizardry, one must often be willing to consider serendipitous events as unqualified successes. -Vaarsuvius
Farmbuyer is offline   Reply With Quote
Old 02-02-2012   #3
sapu94
Full Member
 
Join Date: Feb 2010
Posts: 107
Default Re: Hiding a Frame without Physically Hiding it

The frame I'm trying to "hide" has many levels of children which are things ranging from scroll frames to buttons to text to popup frames to progress bars to anything else you'd find in an auction house addon. Basically, I want to hide everything without triggering any OnHide events.

EDIT: I guess I could set the scale of the top level frame to zero. Anybody see any issues with doing this?

EDIT2: Guess you can't set a frame's scale to 0, and when I tried 0.0001, it still had a height of 1 which looks kind of weird. I guess I could hide that height of 1 frame behind the AH frame and hope nobody notices...

EDIT3: Ok I feel silly now. It turns out :SetAlpha does automatically propagate down to children...so nevermind this thread
__________________
Lead developer of the TradeSkillMaster gold making addon.

"A good programmer is someone who always looks both ways before crossing a one-way street." ~Doug Linder

Last edited by sapu94; 02-02-2012 at 03:23 AM.
sapu94 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

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

Forum Jump


All times are GMT. The time now is 02:01 AM.