Permalink
Browse files

core: Hide frames during pet battles.

  • Loading branch information...
1 parent fd7df92 commit 4efb78c75c7ed2afa2aaee572bc8e7bc1c69a695 @haste haste committed Oct 7, 2012
Showing with 11 additions and 2 deletions.
  1. +9 −0 oUF.xml
  2. +2 −2 ouf.lua
View
@@ -46,6 +46,15 @@
</Attributes>
</Button>
+ <!-- Pet Battle Hider Frame -->
+ <Frame name="oUF_PetBattleFrameHider" inherits="SecureHandlerStateTemplate" parent="UIParent" setAllPoints="true">
+ <Scripts>
+ <OnLoad>
+ RegisterStateDriver(self, "visibility", "[petbattle] hide; show")
+ </OnLoad>
+ </Scripts>
+ </Frame>
+
<!--
Sub-object as a child of the parent unit frame:
<Button name="oUF_HeaderTargetTemplate" inherits="SecureUnitButtonTemplate" hidden="true" virtual="true">
View
@@ -500,7 +500,7 @@ do
local isPetHeader = template:match'PetHeader'
local name = overrideName or generateName(nil, ...)
- local header = CreateFrame('Frame', name, UIParent, template)
+ local header = CreateFrame('Frame', name, oUF_PetBattleFrameHider, template)
header:SetAttribute("template", "oUF_ClickCastUnitTemplate")
for i=1, select("#", ...), 2 do
@@ -545,7 +545,7 @@ function oUF:Spawn(unit, overrideName)
unit = unit:lower()
local name = overrideName or generateName(unit)
- local object = CreateFrame("Button", name, UIParent, "SecureUnitButtonTemplate")
+ local object = CreateFrame("Button", name, oUF_PetBattleFrameHider, "SecureUnitButtonTemplate")
Private.UpdateUnits(object, unit)
self:DisableBlizzard(unit)

0 comments on commit 4efb78c

Please sign in to comment.