View Single Post
01-24-13, 07:08 AM   #1
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Script for OnClick only when in a group?

Hi I've got an annoying issue where when I press a button to switch grid profiles, the grid frames disappear but I noticed that if I use:

"/run GridFrameLayout:Show()" then it fixes the problem so what I want to do is build this into my button I've made.

However I only want it to apply if I am in a group as I do not want it to show my frame when I am on my own. What function would I need and how would it look like?

If anyone can help me with this that would be fantastic! Thank you!

--------------------------------------

EDIT: I fixed it!

I'm using the following code which seems to work perfectly:

Code:
if IsInGroup() then
    GridLayoutFrame:Show()
else
    GridLayoutFrame:Hide()
end

Last edited by Mayron : 01-24-13 at 08:36 AM.
  Reply With Quote