in your browser.
KgPanels Script question
Return to board index
Ok, a while back I had seen an interesting use of kgPanels to hide/show Recount and Omen when a certain chat frame/tab was selected. I'm wondering if there is a similar command for Grid? This is what I'm talking about:
It's obvious what lines I'm trying to duplicate for Grid, but I can't seem to figure out what I need to do. I know Grid doesn't have a hide/show option, so I'm looking for a way to swap the layout sizes based on party size.
IE: I switch to ChatFrame6, and it displays the layout as a 10-man raid layout (based on my configurations), but when I click on any other ChatFrame#, it sets the layout to none. Now, I know how to achieve this in a macro, but I'm looking to see if I can get it done in a script via kgPanels like above with Recount Omen. Does anyone know the script commands to make Grid do that (and I have tried looking, but I couldn't seem to find relative threads about this in either Grid or kgPanels home site)?
Ok, maybe layout isn't what I'm looking for. that's the profile for what you gave me. I'm talking about setting the layout size (the menu where you choose how grid looks based on party/raid size). I'll try substituting in what I think would be the layout size for 'GridLayout' to see if it work, but thanks for insight on how it'll call the various modules.
Actually it should be what you're looking for.
Grid:GetModule"GridLayout":LoadLayout"By Group 10"
Edit: After returning home and actually trying:GridLayout.db.profile.layouts = "None"
GridLayout.db.profile.layouts = "By Group 10"
GridLayout:ReloadLayout()Tested and working.
Awesome, thanks. Didn't get a chance to actually test it. it's for a new UI design I'm working on, and I was too busy with ICC to really tinker with it :P Looking at how that would work, I'll need to call the "By Group 25" to make sure that it'll show 10/25 man raids and cut down on scripting lines.
Ok, on the code I have above in my OP, I had that code in the OnLoad portion of the scripts for kgPanels. I tried the same with Grid, both in and out of a party, but the state of the layout would not change. Do I need to put it in another section of the script coding, or is the following incorrect for what I am trying to do:
GridLayout.db.profile.layouts = "None"
GridLayout.db.profile.layouts = "By Group 25"
It should work properly.
The only way I can think it'd fail is if you're playing on a non-english client. The "None" and "By Group 25" should be the same they appear in the options window.
Edit: Just tested your code word for word (except for ChatFrame2 instead of 4) and it works.
Well, i'm using the enUS client, so what is above is how I have it in my script window. Should I try it in another script bracket (OnUpdate vs OnLoad), or will that have no effect? Granted, I am not trying this on my main, but on an alt I have specifically for changing my UIs, but I don't see how that should or would have any affect on it.
Actually, I just thought of something...would combining the Grid code with the Omen/Recount code above be of any consequence? That is how I have it in my kgPanels Script to save space, but I can separate them if needed to ensure that it would work.
EDIT: Just tested it after getting out of work, and yes, combining the code in the OP for Recount/Omen does interfere with the Grid code working, so I'll be making the modifications as necessary to make it work. Thanks HighFive for the code.
Ok, now there is something odd happening. The code work, but only after I do /grid config. Any time the UI is reloaded, either manually or via a loading screen, The code doesn't work until I do /grid config, in which case it will work until a UI reload. Any idea as to the possible cause, anyone?
Edit: Just did some odd testing. Apparently, kgPanels will only recognize one set of code. It won't do both the Grid code and the Omen/Recount code. I tested this when having the script in the same panel's OnLoad and in two separate panels' OnLoad (I have 3 panels). Gonna have to find a way to make them work together or adjust the UI to have the more important code work.
You are not logged in. Please
to post a reply or
if you don't already have an account.
Connect with Wowhead
Other Fanbyte Sites
Hearthstone Top Decks
Final Fantasy XI
© 2021 Fanbyte