Thread Tools Display Modes
06-20-11, 01:16 PM   #1
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Switching between profiles

I'm looking into using an ouf layout for my addon compilation, but one thing I'd really need would be the ability to switch between different layouts without a reload. Can this be done?

I can think of 2 ways right now: First, just make a "switch" function, that calls a lot of SetPoint and SetSize stuff, to change into the different layouts. Would probably be a lot work, since some elements don't really switch easy (aurawatch comes to my mind).

Is there a function to put a layout to "standby"? I could imagine loading 2 layouts, and then disabling one (like Hide() and UnregisterAllEvents()), and then somehow change along these lines. Is this a possibility?

Thanks for any hints how to do this. The layouts I'm thinking of arent' THAT fundamentally different, so the first way seems like I could do it if I could just see how to deal with aurawatch.
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote
06-20-11, 02:32 PM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Single frames you can call :Disable() on. Then :Enable() later no.

Group frames are slightly more tricky however. What you could do is just disable the headers show{Solo,Player,Party,Raid} attributes, it should be enough. Might want to cache their current values so you can re-enable them at a later event. It should work fine for most (if not all) layouts.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
06-20-11, 04:35 PM   #3
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Oh that sounds nice. So if the frames (talking raid here) are not shown, they don't receive events and process stuff? I'm kinda wondering about performance when loading more than 1 layout.
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote
06-21-11, 03:41 PM   #4
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Their event handler is called, but they don't do any updating. The first thing it checks is if the frame is visible.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
06-21-11, 04:23 PM   #5
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Ok, that sounds reasonable. I'll give it a go as soon as I can Thanks for your help.
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote
06-23-11, 02:00 PM   #6
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
I've got another problem before I could try that. I don't understand the visibility conditions when using SpawnHeader. I mean, those predefined seem simple enough (raid, party, solo), but how do those custom things work? Looks a bit like makro syntax, but what does @raid16 mean (and what 'exists' in this context)? What's available there (could I check for a global variable there?)?

(e) As a follow-up, what's the relation with the showX attributes of the header? What happens if I choose "party" in the visibility condition, but set "showParty" to false?
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."

Last edited by Pyrates : 06-24-11 at 06:44 AM.
  Reply With Quote
06-24-11, 05:27 PM   #7
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
showParty false will not hide the default Blizzard party frame. If I remember that correctly from my battleground testing with oUF_Simple2. Not sure if the party frames get even spawned if you have that value on false.
Get a simple layout and try the attributes in battlegrounds. I tested some conditions maybe it for different raid settings. Maybe it helps: http://code.google.com/p/rothui/sour...2/core.lua#223
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
06-25-11, 05:09 AM   #8
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Thanks Erik I found your attribute list at http://www.wowinterface.com/forums/s...t=35152&page=2 now, that helps quite a bit. I still don't see what [@raid16,exists] does at the visibility argument, and it's not easy to test because getting a raid of the right sizes is hard to do (say, if I need 16 people...). But I should just ask tukz about it, I see it in his raid layout.
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Switching between profiles


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