View Single Post
02-22-13, 12:24 PM   #8
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
It should probably be noted that we do have access to a few nifty functions in the secure environment to help us determine what actions to display:
Lua Code:
  1. local newPage = 0
  2.  
  3. if HasVehicleActionBar() then
  4.     newPage = GetVehicleBarIndex() or 0
  5. elseif HasOverrideActionBar() then
  6.     newPage = GetOverrideBarIndex() or 0
  7. elseif HasTempShapeshiftActionBar() then
  8.     newPage = GetTempShapeshiftBarIndex() or 0
  9. else
  10.     newPage = 0
  11. end
  12.  
  13. return newPage