Permalink
Browse files

First pass at implementing pet battle support

ThunderCougarFalconBar'd the menu bar, missing the advanced layout
options for it at the moment.
  • Loading branch information...
Tuller committed Aug 4, 2012
1 parent 10648dc commit e9f41948c3965f92dc816aea234ed0b826e3145b
Showing with 235 additions and 125 deletions.
  1. +18 −1 frame.lua
  2. +217 −124 menuBar.lua
View
@@ -3,6 +3,23 @@
A dominos frame, a generic container object
--]]
+local AddonName, Addon = ...
+
+local FrameParent = CreateFrame('Frame', AddonName .. 'Frame', UIParent, 'SecureHandlerStateTemplate'); FrameParent:SetAllPoints(UIParent);
+
+FrameParent:SetAttribute('_onstate-display', [[
+ local newstate = newstate or 'show'
+ if newstate == 'show' then
+ self:Show()
+ else
+ self:Hide()
+ end
+]])
+Dominos.FrameParent = FrameParent
+
+RegisterStateDriver(FrameParent, 'display', '[petbattle]hide;show')
+
+
local Frame = Dominos:CreateClass('Frame')
Dominos.Frame = Frame
@@ -23,7 +40,7 @@ function Frame:New(id, tooltipText)
end
function Frame:Create(id)
- local f = self:Bind(CreateFrame('Frame', nil, UIParent))
+ local f = self:Bind(CreateFrame('Frame', string.format('DominosFrame%s', id), FrameParent))
f:SetClampedToScreen(true)
f:SetMovable(true)
f.id = id
Oops, something went wrong.

0 comments on commit e9f4194

Please sign in to comment.