Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-16-22, 01:00 PM   #1
DireKnack
A Murloc Raider
Join Date: Mar 2010
Posts: 4
Collapse BuffFrame

Hello,
I'm trying to make the BuffFrame default state be collapsed instead of having to collapse it manually every time I login or the UI is reloaded.

I'm very new to LUA but have been trying to figure it out with the following link:
https://github.com/tomrus88/Blizzard.../BuffFrame.lua

I've been trying with:
Lua Code:
  1. hooksecurefunc(BuffFrameMixin, "OnLoad", function()
  2.         self.isExpanded = false
  3.     end)

and also:
Lua Code:
  1. hooksecurefunc(AuraFrameMixin, "IsExpanded", function()
  2.         self.isExpanded = false
  3.     end)

I was also thinking that it could be as easy as updating a variable and tried not hooking? The following seems to collapse the BuffFrame but gives an error and breaks the buffs.
Lua Code:
  1. BuffFrame.CollapseAndExpandButton.SetChecked = false
Lua Code:
  1. Interface/FrameXML/BuffFrame.lua:365: attempt to call method 'SetChecked' (a boolean value)
  2. Count: 2
  3.  
  4. Call Stack:
  5. [string "=[C]"]: in function `SetChecked'
  6. [string "@Interface/FrameXML/BuffFrame.lua"]:365: in function `RefreshCollapseExpandButtonState'
  7. [string "@Interface/FrameXML/BuffFrame.lua"]:381: in function `UpdateAuraButtons'
  8. [string "@Interface/FrameXML/BuffFrame.lua"]:256: in function `Update'
  9. [string "@Interface/FrameXML/BuffFrame.lua"]:354: in function `Update'
  10. [string "@Interface/FrameXML/BuffFrame.lua"]:168: in function <Interface/FrameXML/BuffFrame.lua:166>
  11. [string "=[C]"]: ?


If I'm way off base I'm happy to do more research and am hoping to be pointed in the right direction thank you in advance for any guidance!
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Collapse BuffFrame


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