Lua to hide default Arena Frames?
Hello all!
I'm using the addon GladiusEx, which is a replacement for Blizzard's default Arena Frames, but there is no option to hide the default arena frames. I've dug through a lot of forums and found numerous different suggestions, but have yet to find one that works. Is there a simple /console command or CVAR that I haven't come across yet? Or perhaps a Lua script to turn them off? Here is what I've tried so far: Lua Code:
Any help is appreciated, and thank you in advance! :) |
You can disable them in the Interface Options.. :)
|
If you check in game yourself, I believe you'll find that's not true, (at least anymore). You used to be able to, before Blizzard pruned a bunch of things from Interface Options in Legion. I know there is the addon Advanced Interface Options, which essentially brings those back, but I'm hoping to achieve this w/o the use/need of an addon.
|
You could try calling this function on each of the Arena Frames. This is called when you adjust the CVAR variable
Lua Code:
This is the function that calls it in Blizzards addon. Lua Code:
Which is called by the Event Manager function Lua Code:
Your code should work I believe but you will need to have an frame to monitor the event ADDON_LOADED so that once you Load Blizzards addon it will trigger the event and its information should be available to use and adjust. I thought the SetCVar would trigger the CVAR_UPDATE event but it is looking for a different CVAR value to what you are setting which could explain why it isn't doing anything noticable. Maybe changing SetCVar("showArenaEnemyFrames", 0) to SetCVar("SHOW_ARENA_ENEMY_FRAMES_TEXT", 0) and see how that works, then try the ADDON_LOADED steps I suggested. |
I added the line SetCVar("SHOW_ARENA_ENEMY_FRAMES_TEXT", 0), which when you enter the arena the frames still show, but once the gates open then the default frames disappear, which works just fine for me! :)
Thank you a ton! |
SetCVar has a third parameter that is used to trigger the CVAR_UPDATE event and is the value passed as the first arg. So you would want to use
Code:
SetCVar('showArenaEnemyFrames', 0, 'SHOW_ARENA_ENEMY_FRAMES_TEXT') I'm not sure why setting that CVar before Blizzard_ArenaUI is loaded isn't working though, unless some other code is unparenting ArenaEnemyFrame1-5 from ArenaEnemyFrames. |
Another thing to keep in mind when disabling things using CVars, is that you have to make sure the CVar is changed after the blizzard user settings are fully loaded for your character, or it will likely have no effect.
I usually add a check for VARIABLES_LOADED whenever I change CVars, as this is when the blizzard settings have been loaded. Quote:
|
All times are GMT -6. The time now is 12:04 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI