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:
hooksecurefunc(BuffFrameMixin, "OnLoad", function()
self.isExpanded = false
end)
and also:
Lua Code:
hooksecurefunc(AuraFrameMixin, "IsExpanded", function()
self.isExpanded = false
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:
BuffFrame.CollapseAndExpandButton.SetChecked = false
Lua Code:
Interface/FrameXML/BuffFrame.lua:365: attempt to call method 'SetChecked' (a boolean value)
Count: 2
Call Stack:
[string "=[C]"]: in function `SetChecked'
[string "@Interface/FrameXML/BuffFrame.lua"]:365: in function `RefreshCollapseExpandButtonState'
[string "@Interface/FrameXML/BuffFrame.lua"]:381: in function `UpdateAuraButtons'
[string "@Interface/FrameXML/BuffFrame.lua"]:256: in function `Update'
[string "@Interface/FrameXML/BuffFrame.lua"]:354: in function `Update'
[string "@Interface/FrameXML/BuffFrame.lua"]:168: in function <Interface/FrameXML/BuffFrame.lua:166>
[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!