View Single Post
Old 02-22-13, 11:24 AM   #8
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 83
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
Tuller is offline   Reply With Quote