well, I don't know whether I have understood that rightly but it isn't erroring out which is a good sign. unfortunately it hasn't made a difference.
Still using the nUI_PossessBar.lus file as it is the possessbar that is being affected it seems.
at the top I have added the following:
RegisterStateDriver( frame, "page", "[nui_vehicle] 12; [nui_override] 14; [bonusbar:5] 11; 1" );
visibility is still the same:
RegisterStateDriver( frame, "visibility", "[bonusbar:5] show; hide" );
I then have the following OnEvent code - the blocks headed with my name or with my name alongside is what has been added:
Lua Code:
anchor:SetScript( "OnEvent",
function( who, event )
-- nUI_ProfileStart( ProfileCounter, "OnEvent", event );
if event == "PLAYER_ENTERING_WORLD"
or event == "UPDATE_POSSESS_BAR" -- xrystal
or event == "UPDATE_OVERRIDE_ACTIONBAR" -- xrystal
or event == "UPDATE_BONUS_ACTIONBAR"
then
frame.applyScale();
-- xrystal
if event == "UPDATE_POSSESS_BAR" or event == "UPDATE_OVERRIDE_ACTIONBAR" then
print("Here - ",event)
print("HasVehicleActionBar = ", HasVehicleActionBar())
print("HasOverrideActionBar= ", HasOverrideActionBar())
print("UnitHasVehicleUI=",UnitHasVehicleUI())
if not InCombatLockdown() then
if ((HasVehicleActionBar() and UnitVehicleSkin("player") and UnitVehicleSkin("player") ~= "") or UnitHasVehicleUI()) then
print("Here - vehicle")
nUI_ActionBar:SetAttribute( "page", "nui_vehicle" );
end
if ((HasOverrideActionBar() and GetOverrideBarSkin() and GetOverrideBarSkin() ~= "") ) then
print("Here - override")
nUI_ActionBar:SetAttribute( "page", "nui_override" );
end
else
end
end
end
-- update the bar
for i=1, #frame.Buttons do
frame.updateState( i );
end
-- nUI_ProfileStop();
end
);
and of course registered the extra events.
Now whether I have done this stuff wrong I have no idea what else to do at least at the moment.