View Single Post
09-18-11, 03:40 AM   #15
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
Thumbs down

I think, I found a way, which is really simple, to change der FrameSize (profile) only if I have a specific layout.

So, here my solution:
I'm using reflux and kgPanels to change InGame between 2 diffferent layouts of various Interface elements and options.
One profile is called "ShiningUI", the other is called "ShiningHeal".

So, whenever i tried to change the GridLayout depending on the RaidMembers, it also changed GridProfiles while "ShiningUI" was active, although I just wanted it to happen with "ShiningHeal".
So I made a check, if the current profile-set is "ShiningHeal":
Code:
Sprofile = Skada.db:GetCurrentProfile()
rmems = GetNumRaidMembers()
pmems = GetNumPartyMembers()

if Sprofile == "ShiningHeal" then
 if (pmems > 0 and rmems <= 5) then -- group/5-men-raid
 Grid.db:SetProfile("profile1")
 elseif (rmems > 5 and rmems <= 10) then -- 10-men-raid
 Grid.db:SetProfile("profile2")
 elseif (rmems > 10 and rmems <= 25) then -- 25-men-raid
 Grid.db:SetProfile("profile3")
 elseif rmems > 25 then -- Alterac/Isle of Conquest
 Grid.db:SetProfile("profile4")
 end
else
end
Events to register:
PLAYER_ENTERING_WORLD
RAID_ROSTER_UPDATE
PARTY_MEMBERS_CHANGED

Now, there are different ways to implement this little code:
- Add it in kgPanels
- write a little small AddOn
- paste it in an existing AddOn

I think i'll choose kgPanels - otherwise Curseupdater and so on are complaining about edited files and stuff.'

In the end, no big deal.
__________________

Last edited by FaulTier : 09-18-11 at 06:00 AM.
  Reply With Quote