local _G = _G |
local xoffset, yoffset = 8,0 |
|
local function createBar(bid) |
local f = CreateFrame("Frame", "zzABar"..bid, UIParent, "SecureHandlerStateTemplate",bid) |
local function createBar(bid,id) |
local f = CreateFrame("Frame", "zzABar"..bid, UIParent, "SecureHandlerStateTemplate",id) |
f:SetWidth(1) |
f:SetHeight(1) |
f:SetPoint("CENTER") |
f:SetAttribute('actionpage', bid) |
-- if(bid == 1) then |
f:SetAttribute('_onstate-page', [[ |
print(newstate) |
if(self:GetID() == 1) then |
self:SetAttribute('actionpage', newstate) |
control:ChildUpdate('actionpage', newstate) |
else |
control:ChildUpdate('actionpage', self:GetID()) |
end |
|
]]) |
if(class == "WARRIOR") then |
RegisterStateDriver(f, "page", "[bonusbar:1] 7;[bonusbar:2] 8;[bonusbar:3] 9;1") |
elseif(class == "DRUID") then |
RegisterStateDriver(f, "page", "[stance:1] 9;[stance:3,stealth] 8;[stance:3] 7;[stance:5] 10;1") -- 1 bear/ 3 cat/ 5 moonkin |
elseif(class == "ROGUE") then |
RegisterStateDriver(f, "page", "[stance:1] 7;[stance:3] 8; 1") -- 1 stealth/ 3 shadow dance |
elseif(class == "PRIEST") then |
RegisterStateDriver(f, "page", "[stance:1] 7; 1") |
end |
-- end |
f:SetAttribute('_onstate-page', [[ |
self:SetAttribute('actionpage', newstate) |
control:ChildUpdate('actionpage', newstate) |
]]) |
if(class == "WARRIOR") then |
RegisterStateDriver(f, "page", "[bonusbar:1] 7;[bonusbar:2] 8;[bonusbar:3] 9;1") |
elseif(class == "DRUID") then |
RegisterStateDriver(f, "page", "[stance:1] 9;[stance:3,stealth] 8;[stance:3] 7;[stance:5] 10;1") -- 1 bear/ 3 cat/ 5 moonkin |
elseif(class == "ROGUE") then |
RegisterStateDriver(f, "page", "[stance:1] 7;[stance:3] 8; 1") -- 1 stealth/ 3 shadow dance |
end |
|
local lastbutton = f |
local yoff =-yoffset - 40 * (bid-1) |
for i = 1, 12 do |
local offset = bid*12-12+i |
local b = CreateFrame("CheckButton", "$PARENTActionButton"..offset, f, "ActionButtonTemplate ActionBarButtonCodeTemplate",i) |
local b = CreateFrame("CheckButton", "$PARENTActionButton"..i, f, "ActionButtonTemplate ActionBarButtonCodeTemplate",i) |
-- b:SetWidth(32) |
-- b:SetHeight(32) |
b:SetPoint("TOPLEFT", lastbutton, "TOPRIGHT", xoffset, yoff) |
yoff = 0 |
b:SetPoint("TOPLEFT", lastbutton, "TOPRIGHT", xoffset, yoffset) |
lastbutton = b |
b:SetAttribute('action--base',offset) |
if(bid == 1) then |
b:SetAttribute('_childupdate-actionpage', [[ |
self:SetAttribute('action--base', self:GetAttribute('action--base')) |
]]) |
else |
b:SetAttribute('_childupdate-actionpage', [[ |
local offset = message * 12 -12 + self:GetID() |
print(offset,GetBindingKey("MULTIBARBOTTOMLEFTACTIONBUTTON"..self:GetID())) |
]]) |
end |
b:SetAttribute('action--base',i) |
b:SetAttribute('showgrid', 1) |
b:SetAttribute('_childupdate-actionpage', [[ |
self:SetAttribute('action', self:GetAttribute('action--base')) |
]]) |
b:SetAttribute('action', i) |
end |
end |