Thread Tools Display Modes
07-03-11, 10:54 AM   #1
d16174l4n63l
A Fallenroot Satyr
 
d16174l4n63l's Avatar
Join Date: Mar 2008
Posts: 20
Raid Frames change style

What I am trying to do is setup a different raid from style to replace another one.

Say I am using Tukui.
I get into raid and Tukui sets the raid style.
However what I want to do is something like this.

If TukuiRaid is loaded, unregister their raid frames and use mine instead without disabling the addon, Is that possible?
__________________
Dream with the feathers of angels stuffed beneath your head.
The regulator's swinging pendulum.
  Reply With Quote
07-03-11, 02:48 PM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
The Wow API has the isAddonLoaded function: http://www.wowwiki.com/API_IsAddOnLoaded

But if you have your condition ask for that on loadup it will only work if the requested addon is already loaded. Which may be unlikely.
Thus you want want to register an event to your raidframes that ask in the game if an addon is loaded and disable the raidframes based on this.
__________________
| 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
07-03-11, 02:57 PM   #3
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Originally Posted by zork View Post
But if you have your condition ask for that on loadup it will only work if the requested addon is already loaded. Which may be unlikely.
You could add the addon (here, TukUI) to your addons .toc as dependency. This way, you make sure that the TukUI is loaded before yours.
__________________
  Reply With Quote
07-08-11, 12:10 PM   #4
d16174l4n63l
A Fallenroot Satyr
 
d16174l4n63l's Avatar
Join Date: Mar 2008
Posts: 20
Well I have been cracking at it.

So here's where I am at.

essentially what I think I need to do is deactivate the styles that come with Tukui, and then activate my own as I built some other functions into it.


unregister These:

oUF:RegisterStyle('TukuiDpsP05R10R15R25', Shared)
oUF:RegisterStyle('TukuiDpsR40', Shared)

Register my own

I think the only thing I can do at this juncture and I will try it, is strip the events from the frames.

Will let you know how it goes.
__________________
Dream with the feathers of angels stuffed beneath your head.
The regulator's swinging pendulum.
  Reply With Quote
07-08-11, 12:44 PM   #5
d16174l4n63l
A Fallenroot Satyr
 
d16174l4n63l's Avatar
Join Date: Mar 2008
Posts: 20
No go, frames still become active.

Best I can seem to get is to unload the addon itself but I want the functionality that if the addon is loaded certain things can happen.

The other thing I want to avoid is just straight editing the Tukui raid frames themselves if it can be helped.
__________________
Dream with the feathers of angels stuffed beneath your head.
The regulator's swinging pendulum.

Last edited by d16174l4n63l : 07-08-11 at 01:19 PM.
  Reply With Quote
07-09-11, 05:26 AM   #6
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
You could use

TukuiDpsP05R10R15R25:SetAttribute("showPary", false)

to disable these frames if you're in a party (there's also showSolo and showRaid). This way the file will be loaded, but the frames aren't active.
__________________
" ... 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
11-29-11, 10:02 PM   #7
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 56
Originally Posted by d16174l4n63l View Post
What I am trying to do is setup a different raid from style to replace another one.

Say I am using Tukui.
I get into raid and Tukui sets the raid style.
However what I want to do is something like this.

If TukuiRaid is loaded, unregister their raid frames and use mine instead without disabling the addon, Is that possible?
It's strange that you should choose TukUI as an example.

Because in TukUI, the raid frames are included as separate addons, which can be disabled from the addon selection menu. If both (DPS and Healing versions of the raid frames) are disabled, you would get TukUI without the raid frames.

As far as I know, there is no way to unregister already activated frames. Frames in WoW won't be deleted until the next reload of the UI, so you would have to manually hide and kill all the frames. Which is something that should only ever be done when it comes to hiding default WoW elements, not elements created by other addons.

Why don't you simply make your own edit of TukUI (or whatever UI you're using) and simply replace the raid frames with yours? As mentioned, the raid frames are stored in a separate folder as a separate addon, so you won't really be changing or editing any of the main TukUI code, just the raid frames.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Raid Frames change style

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