I've repositioned and altered the default actionbars, much to my liking. That is basicly all I did really, I did not create own bars, did not alter functionality or anything, just that.
Now I *am* trying to alter functionality: I hate the paging of actionbars upon altering stance/form (warrior stances, rogue stealth, priest shadowform, druid shapeshifts). Is there a way to block these without interfering with the normal functionality like when you MC a target, or when you get into a vehicle a la Flame Lev, or Prof P Abom duty?
First I tried my own implementation. Worked like a charm, however it meant that I had an extra bar on my screen that was empty 99% of the time (just reposition the BonusBar), kinda pointless really. So on to a better solution.
Then I've been trying different alternatives, inspired by caelUI and thus rothUI, but somehow I can't get it to work correctly: either it does not page, or it does not release the hotkeys back to the original bar, or it doesn't block the ones mentioned above...
So on to more advanced techniques, I've been trying to figure out events (UPDATE_SHAPESHIFT_FORM, UPDATE_STEALTH) to hook on to, or functions to block/dummy (ShapeshiftBar:Show()/Hide()/Update()) but to no avail.
Trying to figure out how Bartender4 controls that, I came across snkUI, they both create completely new bars, new buttons and then go on with adding the
actionbar:SetAttribute("_onstate-page", [[
self:SetAttribute("actionpage", tonumber(newstate));
ActionButtons = newtable( self:GetChildren() );
for i, button in ipairs( ActionButtons ) do
button:SetAttribute("touch", nil);
end
]]);
RegisterStateDriver(actionbar, "page", "[bar:2] 2; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6; [bonusbar:1] 7; [bonusbar:2] 8; [bonusbar:3] 9; [bonusbar:4] 10; [bonusbar:5] 11; 1");
-- shameless copy from snkUI for illustrative purposes
-- http://www.wowinterface.com/downloads/info16472-1.0.html
StateDrivers?
I can do that as well ofcourse, but can't you just alter those StateDrivers? (as bartender for instance also Unregisters StateDrivers I suppose I could Unregister the default ones and then Register my own?)
And then - which of the bonusbars to delete and which to keep? Which bar is a stance, which is a possess (bartender4 indicates bonus:5 as possess?) and is that possess both ways (MC by shadowpr. ánd Prof P Abom), which is a vehicle?
I dying for some tips/explanation regarding this, I don't need fully functional code, but some pointers would be very much appreciated. The documentation I can find about the StateDriver ends in the Restricted Environment... not something I want to play around with really.
What you can do is simply disable their paging, and add a state driver that only does the Possession paging
This is where I already hit the brick wall.
No matter what I try I either have to disable all paging (by blocking the bonusbar) or I cannot disable any paging (since it is controlled by the bonusbar). Conditionally enabling/disabling of the bonusbar is something that does not seem to work, or at least, I can't get it to work... if all paging is disabled it won't show the possession bar ???
This is the code responsible for calculating the active action.
Note that every default button will have a ID, and that by default no "actionpage" is set. The logic should hopefully be clear otherwise.
The ActionButtons have "useparent-actionpage" set, so there is no need to iterate over all buttons and set it manually. (Even if it wasnt, could set it yourself)
This will basically limit your paging to Possess/Vehicle, and the Arrow-up/down action bars (also accessible with Shift-(1-6) or shift-mousewheel)
If you don't want those to work either (many people trigger it by accident), shorten the string to "[bonusbar:5] 11; 1"
The state driver code only runs during an OnUpdate script which will be after the events are processed for any action bar change. The result is your action bar works correctly but the icons/tooltips are for the wrong bar. You need to trigger the button's OnAttributeChanged script so they will update properly. I hope I explained that right.
here I am again, started on a new playground :)
I've repositioned and altered the default actionbars, much to my liking. That is basicly all I did really, I did not create own bars, did not alter functionality or anything, just that.
Now I *am* trying to alter functionality: I hate the paging of actionbars upon altering stance/form (warrior stances, rogue stealth, priest shadowform, druid shapeshifts). Is there a way to block these without interfering with the normal functionality like when you MC a target, or when you get into a vehicle a la Flame Lev, or Prof P Abom duty?
First I tried my own implementation. Worked like a charm, however it meant that I had an extra bar on my screen that was empty 99% of the time (just reposition the BonusBar), kinda pointless really. So on to a better solution.
Then I've been trying different alternatives, inspired by caelUI and thus rothUI, but somehow I can't get it to work correctly: either it does not page, or it does not release the hotkeys back to the original bar, or it doesn't block the ones mentioned above...
So on to more advanced techniques, I've been trying to figure out events (UPDATE_SHAPESHIFT_FORM, UPDATE_STEALTH) to hook on to, or functions to block/dummy (ShapeshiftBar:Show()/Hide()/Update()) but to no avail.
Trying to figure out how Bartender4 controls that, I came across snkUI, they both create completely new bars, new buttons and then go on with adding the
StateDrivers?
I can do that as well ofcourse, but can't you just alter those StateDrivers? (as bartender for instance also Unregisters StateDrivers I suppose I could Unregister the default ones and then Register my own?)
And then - which of the bonusbars to delete and which to keep? Which bar is a stance, which is a possess (bartender4 indicates bonus:5 as possess?) and is that possess both ways (MC by shadowpr. ánd Prof P Abom), which is a vehicle?
I dying for some tips/explanation regarding this, I don't need fully functional code, but some pointers would be very much appreciated. The documentation I can find about the StateDriver ends in the Restricted Environment... not something I want to play around with really.
/salute
What you can do is simply disable their paging, and add a state driver that only does the Possession paging.
And yes. bonusbar:5 is the possess bar. 1-4 are used for stances (only druids use all 4).
This is where I already hit the brick wall.
No matter what I try I either have to disable all paging (by blocking the bonusbar) or I cannot disable any paging (since it is controlled by the bonusbar). Conditionally enabling/disabling of the bonusbar is something that does not seem to work, or at least, I can't get it to work... if all paging is disabled it won't show the possession bar ???
If there are any tips... ;D
Set "actionpage" statically to "1", and you will never get any changes. Set it to "11" and you get the possess bar.
http://github.com/Nevcairiel/wow-ui-source/blob/master/FrameXML/ActionButton.lua#L131-153
This is the code responsible for calculating the active action.
Note that every default button will have a ID, and that by default no "actionpage" is set. The logic should hopefully be clear otherwise.
Somthing like this should simply work
This will basically limit your paging to Possess/Vehicle, and the Arrow-up/down action bars (also accessible with Shift-(1-6) or shift-mousewheel)
If you don't want those to work either (many people trigger it by accident), shorten the string to "[bonusbar:5] 11; 1"