Quantcast Grid - Change FrameSize with Layout - WoWInterface
Thread Tools Display Modes
09-09-11, 08:45 AM   #1
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
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
__________________
  Reply With Quote
09-10-11, 03:55 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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.
  Reply With Quote
09-10-11, 04:36 AM   #3
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
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
__________________

Last edited by FaulTier : 09-10-11 at 06:52 AM.
  Reply With Quote
09-10-11, 07:04 AM   #4
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
Ok, editing the savedvariable doesn't wor - i forgot the it will be 'corrected' after ervery log in/off and /reload...
__________________
  Reply With Quote
09-10-11, 10:19 PM   #5
Rigorous
Noggenfogger Anonymous
 
Rigorous's Avatar
Join Date: Jul 2006
Posts: 420
Originally Posted by Phanx View Post
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.
__________________
"I guess I kinda lost control, because in the middle of the play I ran up and lit the evil puppet villain on fire. No, I didn't. Just kidding. I just said that to help illustrate one of the human emotions, which is freaking out. Another emotion is greed, as when you kill someone for money, or something like that. Another emotion is generosity, as when you pay someone double what he paid for his stupid puppet." - Jack Handy

Last edited by Rigorous : 09-11-11 at 12:56 AM. Reason: clarity
  Reply With Quote
09-11-11, 05:06 AM   #6
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
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' :/
__________________
  Reply With Quote
09-11-11, 02:17 PM   #7
Rigorous
Noggenfogger Anonymous
 
Rigorous's Avatar
Join Date: Jul 2006
Posts: 420
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.

Last edited by Rigorous : 09-11-11 at 02:37 PM. Reason: identified two potentially useful plug-ins
  Reply With Quote
09-11-11, 02:49 PM   #8
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
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...
__________________
  Reply With Quote
09-11-11, 07:00 PM   #9
Rigorous
Noggenfogger Anonymous
 
Rigorous's Avatar
Join Date: Jul 2006
Posts: 420
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.

Last edited by Rigorous : 09-11-11 at 08:25 PM.
  Reply With Quote
09-13-11, 06:12 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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.
  Reply With Quote
09-14-11, 02:17 PM   #11
Rigorous
Noggenfogger Anonymous
 
Rigorous's Avatar
Join Date: Jul 2006
Posts: 420
Originally Posted by Phanx View Post
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?
  Reply With Quote
09-15-11, 02:59 AM   #12
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
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".
__________________

Last edited by FaulTier : 09-18-11 at 06:03 AM.
  Reply With Quote
09-17-11, 02:39 PM   #13
Rigorous
Noggenfogger Anonymous
 
Rigorous's Avatar
Join Date: Jul 2006
Posts: 420
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!

Last edited by Rigorous : 09-17-11 at 02:44 PM. Reason: Thanks!
  Reply With Quote
09-18-11, 01:36 AM   #14
Ekaterina
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 57
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.
  Reply With Quote
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

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Grid - Change FrameSize with Layout

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