Permalink
Browse files

more bugfixes

  • Loading branch information...
Tuller committed Sep 12, 2012
1 parent 6a4785d commit fd834c802dbf01adf00d464791bf2a8ba51a40ce
Showing with 21 additions and 15 deletions.
  1. +4 −4 Dominos.lua
  2. +1 −1 Dominos.toc
  3. +16 −10 overrideController.lua
View
@@ -281,12 +281,12 @@ end
--shamelessly pulled from Bartender4
function Dominos:HideBlizzard()
if MultiActionBar_UpdateGrid then
MultiActionBar_UpdateGrid = Multibar_EmptyFunc
end
-- if MultiActionBar_UpdateGrid then
-- MultiActionBar_UpdateGrid = Multibar_EmptyFunc
-- end
-- Hidden parent frame
local UIHider = CreateFrame("Frame"); UIHider:Hide()
local UIHider = CreateFrame('Frame', nil, UIParent, 'SecureFrameTemplate'); UIHider:Hide()
self.UIHider = UIHider
_G['MultiBarBottomLeft']:SetParent(UIHider)
View
@@ -2,7 +2,7 @@
## Title: Dominos
## Notes: A main actionbar replacement
## Author: Tuller
## Version: 5.0.22
## Version: 5.0.23
## SavedVariables: DominosDB, DominosVersion
## OptionalDeps: Ace3, LibKeyBound-1.0, Masque, FlyPaper
embeds.xml
View
@@ -28,6 +28,7 @@ function OverrideController:Load()
self:GetFrameRef('controller'):SetAttribute('state-isoverrideuishown', false)
]])
self:SetAttribute('_onstate-isoverrideuishown', [[
self:RunAttribute('updateOverrideUI')
]])
@@ -46,6 +47,7 @@ function OverrideController:Load()
local isOverrideUIVisible = self:GetAttribute('state-useoverrideui') and self:GetAttribute('state-isoverrideuishown')
self:SetAttribute('state-overrideui', isOverrideUIVisible)
self:RunAttribute('updateOverridePage')
]])
@@ -69,6 +71,7 @@ function OverrideController:Load()
--hack: make the MainMenuBarArtFrame secure so that we can read its state in combat
self:SetFrameRef('MainActionBarController', self:MakeSecure(_G['MainMenuBarArtFrame']))
self:SetFrameRef('OverrideActionBarController', _G['OverrideActionBar'])
self:SetAttribute('_onstate-overridepage', [[
local overridePage = newstate or 0
@@ -83,15 +86,14 @@ function OverrideController:Load()
end
self:SetAttribute('updateOverridePage', [[
local hasOverrideBar = self:GetAttribute('state-overridebar') == 1
local inVehicle = (self:GetAttribute('state-vehicleui') == 1) or (self:GetAttribute('state-vehicle') == 1)
local overridePage = self:GetFrameRef('MainActionBarController'):GetAttribute('actionpage') or 0
if overridePage <= 10 and (hasOverrideBar or inVehicle) then
overridePage = self:GetFrameRef('OverrideActionBarController'):GetAttribute('actionpage') or 0
local overridePage
if self:GetAttribute('state-isoverrideuishown') then
overridePage = self:GetFrameRef('OverrideActionBarController'):GetAttribute('actionpage')
else
overridePage = self:GetFrameRef('MainActionBarController'):GetAttribute('actionpage')
end
self:SetAttribute('state-overridepage', overridePage)
self:SetAttribute('state-overridepage', overridePage or 0)
]])
--[[
@@ -100,7 +102,7 @@ function OverrideController:Load()
self:Execute([[ myFrames = table.new() ]])
self:SetAttribute('state-isoverrideuishown', self.overrideUIWatcher:IsShown())
self:SetAttribute('state-isoverrideuishown', self.overrideUIWatcher:IsVisible())
RegisterStateDriver(self, 'petbattleui', '[petbattle]1;0')
@@ -118,8 +120,8 @@ function OverrideController:Add(frame)
]])
--load states
frame:SetAttribute('state-overrideui', self:GetAttribute('state-overrideui') == 'enabled')
frame:SetAttribute('state-petbattleui', self:GetAttribute('state-petbattleui') == 'enabled')
frame:SetAttribute('state-overrideui', self:GetAttribute('state-overrideui'))
frame:SetAttribute('state-petbattleui', tonumber(self:GetAttribute('state-petbattleui')) == 1)
frame:SetAttribute('state-overridepage', self:GetAttribute('state-overridepage') or 0)
end
@@ -146,6 +148,10 @@ function OverrideController:DumpStates()
end
end
print('------------------------------')
print('override ui shown', self:GetAttribute('state-isoverrideuishown') and true or false)
print('mainmenubar actionpage', _G['MainMenuBarArtFrame']:GetAttribute('actionpage'))
print('overridebar actionpage', _G['OverrideActionBar']:GetAttribute('actionpage'))
print('effective actionpage', self:GetAttribute('state-overridepage'))
end
function OverrideController:MakeSecure(frame)

0 comments on commit fd834c8

Please sign in to comment.