WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Grid - Change FrameSize with Layout (https://www.wowinterface.com/forums/showthread.php?t=41392)

FaulTier 09-09-11 08:45 AM

Grid - Change FrameSize with Layout
 
Hey everybody!

At the moment I'm trying to do the follwing:
I want Grid to change the height of the raidframes depending on of the chosen layout. To be more specific, I want the following:
If the actual layout is 'Group', i want the height of my group-member-frames to be 70.
If the actual layout is '10 men raid', the height should be e.g. 35.
25 Men Raid/Batleground -> height = 21

So the height shouldn't be connected with my actual groupmembers, but my chosen layout.

Is there a way to embed the frameheight in a layout @ GridLayoutLayout.lua?

Greetz, Fauli

Phanx 09-10-11 03:55 AM

No. You will need to set up multiple profiles, and either switch between the profiles manually, or use one of the numerous plugins that auto-switch your profile based on preset conditions.

FaulTier 09-10-11 04:36 AM

Geez, thought so.

Any addon you'd recommend to use?

Because I'm using an UI, which has two different layouts, based on layoutchanging ingame. That's my scheme:
Code:

Grid ----------------- Heal-Layout
      \                          \
        DD-Layout                  5-Men-Group
                \                10-Men-Raid
                  5-Men-Grouo      AnyRaidSizeAbove
                  AnyRaidSize

But maybe i will exchange Grid with oUF. Just need to find a way to make it grid a like. (FrameSize depending on Group Size should be possible with "if GetPartyMembers() <= 10 then .... elseif .... end", shouldn't it?)

Another Idea would be to edit the savedvariable of grid.
If Im right, Grid is saving it's profiles @/WTF/Account/SAvedVariables/ and the frame size is saved within the profiles.
So it should be possible to edit the part with the frame size adding that indicates the raidsize..
Let's see if i can do sowmthing about that :D

FaulTier 09-10-11 07:04 AM

Ok, editing the savedvariable doesn't wor - i forgot the it will be 'corrected' after ervery log in/off and /reload...

Rigorous 09-10-11 10:19 PM

Quote:

Originally Posted by Phanx (Post 244503)
No. You will need to set up multiple profiles, and either switch between the profiles manually, or use one of the numerous plugins that auto-switch your profile based on preset conditions.

And where would one find one of those numerous plugins? I've been looking....haven't found one here, at wowace or at Curse. At least nothing that I could identify as doing that specifically.

FaulTier 09-11-11 05:06 AM

Yip, same goes for me.
Can't find any PlugIn, which changes the Profile based on Raid-Size.

So, need to go with oUF_Grid.... Will be 'interesting' :/

Rigorous 09-11-11 02:17 PM

I've found several that change the frame size, but that does not address the issue of altering unit size based on raid size.

What exactly is the point of modifying the frame size based on raid size? The only reason I can think of (and I'm admittedly far from an expert...just a long-time add-on nerd) is in case you use it to parent a kgpanel to? I'm just curious what purpose it serves.

I did find GridDynamicZoneSwitch which would theoretically serve at least my purposes, but it has been abandoned according to its wowace page. Also found GridConfigurableLayouts but this looks to provide a far deeper level of functionality than I personally am looking for.

FaulTier 09-11-11 02:49 PM

I want to use the same space for 5-Men-Groups, 10-men-raids and 25-raids, therefore the framesize needs to be resized.

It's mostly for optical reasons...

Rigorous 09-11-11 07:00 PM

Ok well then maybe I'm confused.

<snip>

Edit: Now that I'm not posting from work and I actually look at the options, I see what you are talking about.

Phanx 09-13-11 06:12 PM

There is a list of Grid plugins in the Grid User's Guide, which is linked on the Grid download page here on WoWI. You're probably looking for something in the Layout Plugins category:

http://www.wowace.com/addons/grid/pa...-grid-plugins/

As for which plugin would best suit your needs, I have no idea, as I've never had any need for or interest in any such plugins. If you can't find one that does what you need, you could always just switch between the profiles manually or with a macro.

Rigorous 09-14-11 02:17 PM

Quote:

Originally Posted by Phanx (Post 244632)
As for which plugin would best suit your needs, I have no idea, as I've never had any need for or interest in any such plugins. If you can't find one that does what you need, you could always just switch between the profiles manually or with a macro.

As I said, I have looked at the plug-ins listing at wowace, as well as all of the resources in the "User Guide". As I also said, none of them change between profiles and only one, that I could determine, came even close to providing what I was trying to do (use the same volume of screen-estate regardless of raid size....10-man=large units, 40-man=small units). Most have to do with customizing the arrangement of units into varying categories. nibAutoGridLayout is the only thing that comes close.

I honestly don't know the restrictions of the code, but I was suprised to not find an LDB plug-in which would allow quick switching between profiles, which I would assume is possible if you are suggesting that profile switching can be done with a macro.

I indeed tried to find the code necessary to do just that: use a macro to switch profiles. Unfortunately, the info about it wasn't in the User Guide, nor did I find any functions in the API that provide for profile switching, nor does the in-game command line for Grid provide any asisstance for it (at least not that I could coax out of it). Where can I find, other than by digging through the code in the add-on itself, a comprehensive listing of command-line instructions?

Does anyone have a good macro for rotating through add-on (or Grid specifically) profiles? Or for selecting a profile based on conditions (i.e. raid size or zone)? Or know of an add-on/plug-in that will automatically (or even quickly manually) select a Grid profile?

FaulTier 09-15-11 02:59 AM

kgPanels.db:SetProfile("Shining")

this works called in an OnClickHandler and used in dependencies like

Code:

rmems = GetNumRaidMembers()
pmems = GetNumPartyMembers()

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")

Edit:
@Rigorous
yes, it work's for any AddOn, using Profiles. But the ProfileName and AddOn-name are case-sensitive, so "grid" wouldn't work but "Grid".

Rigorous 09-17-11 02:39 PM

So does SetProfile work for Grid also?

i.e.
Code:

rmems = GetNumRaidMembers()
pmems = GetNumPartyMembers()

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")

This is the first time in all these years of my many, many, MANY UI iterations that I've needed to change profiles like this, so I'm totally unfamiliar with it.

And THANK YOU! The help is appreciated!

Ekaterina 09-18-11 01:36 AM

Rigourous,
I know that you want to do this with Grid, but if it turns out to be too much of a pain - Vuhdo will do this with no extra coding needed from you.

I have it set to show two different profiles depending on what size raid I'm in and can verify that it works well.

FaulTier 09-18-11 03:40 AM

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.


All times are GMT -6. The time now is 08:34 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI