View Single Post
04-14-13, 07:34 AM   #10
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,927
I'm trying to fix it but Scott understands how nUI and the secure action bars work better than myself. I don't think I have anyone that can quickly get to the vash quest stage so just redoing the dungeon over and over on my pally ... would have been better if it was the first boss but of course its not that easy rofl.

Edit: Okay, tried various ways the other addons have got this working but none of them seem to work with nUI so there must be something else I have to do for nUI to register the change.

Current code I have adjusted Scott is :

Lua Code:
  1. nUI_ActionBar:SetAttribute('updatePage', [[
  2.         local newPage = 0
  3.    
  4.         if HasTempShapeshiftActionBar() then
  5.             newPage = GetTempShapeshiftBarIndex() or 0
  6.         else
  7.             newPage = 0
  8.         end
  9.        
  10.         local oldPage = self:GetAttribute('actionpage') or 0
  11.         if newPage == 0 then
  12.             newstate = newPage
  13.         else
  14.             newstate = oldPage
  15.         end
  16.     ]])
  17.        
  18.  
  19.         nUI_ActionBar:SetAttribute(
  20.             "_onstate-page",
  21.             [[
  22.            
  23.                 self:RunAttribute( "updatePage" )
  24.  
  25.                 self:SetAttribute( "actionpage", tonumber( newstate ) );
  26.                
  27.                 for i, button in ipairs( ChildList ) do
  28.                     if not button:GetAttribute( "nUI_ActionButtonOverlay" ) then
  29.                         button:SetAttribute( "touch", nil )                
  30.                     end
  31.                 end                        
  32.             ]]
  33.         );


and

Lua Code:
  1. elseif ( event == "UPDATE_SHAPESHIFT_FORM" or event == "UPDATE_BONUS_ACTIONBAR" ) then
  2.         if ( HasTempShapeshiftActionBar() ) then
  3.             print("Event is : ", event, ", Has Temp Shapeshift bar so trying to switch page to the new bar, and actionpage is : ",nUI_ActionBar:GetAttribute("state-page"))
  4.            
  5.             if ( HasBonusActionBar() or HasOverrideActionBar() or HasVehicleActionBar() or HasTempShapeshiftActionBar() ) then
  6.                 if (HasVehicleActionBar()) then
  7.                     print("VehicleBarIndex =", GetVehicleBarIndex())
  8.                 elseif (HasOverrideActionBar()) then
  9.                     print("OverrideBarIndex = ", GetOverrideBarIndex())
  10.                 elseif (HasTempShapeshiftActionBar()) then
  11.                     print("TempShapeShiftBarIndex = ", GetTempShapeshiftBarIndex())
  12.                 elseif (HasBonusActionBar() and GetActionBarPage() == 1) then
  13.                     print("BonusBarIndex = ", GetBonusBarIndex())
  14.                 else
  15.                     print("ActionBarIndex = ", GetActionBarPage())
  16.                 end
  17.             else
  18.                 print("No special bar so using Action Bar Page: ", GetActionBarPage())
  19.             end
  20.  
  21.            
  22.             if not InCombatLockdown() then
  23.             else
  24.                 print("In Combat so unable to switch")
  25.             end        
  26.         end
  27.            
  28.     end

it consistently displays TempShapeshiftBar as 13 everytime it switches me but the bar doesn't ever change because the TempShapeShiftBar isn't set when you first load the addon so the page setup doesn't seem to change as it always shows the actionpage as 1
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 04-14-13 at 10:46 AM.