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! :D Thank you! -------------------------------------- EDIT: I fixed it! I'm using the following code which seems to work perfectly: Code:
if IsInGroup() then |
Quote:
|
Sorry for the delayed reply. I am pressing a button I made using KgPanels:
OnClick: Code:
if InCombatLockdown() then return end All I want to do is to be able to click my button and the Grid profiles change but show up instantly because without that code, if I am in an instance then there is either a very large delay or I need to reload the UI. I cannot use this button while out of combat which is good otherwise I would expect some sort of error. Also I have noticed that sometimes if I press the button then the profiles change and the Grid frames are showing even if I am on my own and the solo layout is set to none so they should not be there but they are. So this code I came up with corrects these two issues but now I cannot use the solo layout to configure the frames. I was thinking I could add something that checks the grid solo layout and shows if the layout is set to something besides none else it does what the code already says. I am very bad with lua so not sure if that is possible or not. Thank you for reading! |
Do you have the same issue with the frame not appearing when you switch profile through the Grid options window?
|
Quote:
Fortunately though the lua errors have stopped since I disabled that one Grid plugin so its not as bad but still can be annoying as I have to reload the UI to fix the issue. My code worked to fix this but its just a pain to not be able to change solo to 25 player for example so that I can config the frames out of instances. |
All times are GMT -6. The time now is 06:46 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI