Thread Tools Display Modes
05-25-16, 12:09 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Default Actionbars and ActionButtons

I started updating my actionbars.
https://github.com/zorker/rothui/tre...7.0/rActionBar

Found sth really odd with the global cooldown swipe (that 1.5second cooldown). If you move an action button around on screen the global cooldown swipe will stay on its position until you /reload. That is not the case for abilities that actually have a cooldown. Those work fine and move with the button.

Is the global cooldown frame different from the normal one? Seems like it is parented differently.

*EDIT* Bug is fixed on last Beta build!

~~~~~~~~~~~~~~

Just to note it down somewhere.

If you want to test the ExtraActionButton1 go outside of Deathwings instance in Tanaris and enter RaidFinder for the second part. Ultraxxion has that button. Combat is not needed. Button will appear before the fight.

If you want to test the override bar you can do the zombie flower game in Silverspine forest (where Dalaran once was).
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-27-16 at 10:12 AM.
 
05-25-16, 12:29 AM   #2
Predicate
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 18
Yes, cooldown spirals are rendering incorrectly if their parent frames are moved after the cooldown has played once (but while they are still hidden). After a bit of troubleshooting on IRC we came up with a simple test case which I submitted to Blizzard as a bug report. For now, a useful workaround is to call a function which gets or sets the position/size of the frame. Something as simple as :GetLeft() will trigger the cooldown to render in its correct position again.
 
05-25-16, 12:47 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Well that was quick. Thanks.

*edit*

Released the first version of rActionBar for Legion:
http://www.wowinterface.com/download...ActionBar.html
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-26-16 at 01:39 AM.
 
05-25-16, 02:07 PM   #4
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
Wonder if the cooldown thing is the same reason this bug happens
http://www.wowinterface.com/forums/s...ad.php?t=53469
 
05-27-16, 07:25 AM   #5
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
ActionButton1 Template Routing

Code:
ActionButton1 <CheckButton name="ActionButton1" inherits="ActionBarButtonTemplate" parent="MainMenuBarArtFrame" id="1">
|-ActionBarButtonTemplate <CheckButton name="ActionBarButtonTemplate" inherits="ActionBarButtonCodeTemplate, ActionButtonTemplate" virtual="true">
  |-ActionButtonTemplate <CheckButton name="ActionButtonTemplate" virtual="true">
  |-ActionBarButtonCodeTemplate <CheckButton name="ActionBarButtonCodeTemplate" inherits="SecureActionButtonTemplate" virtual="true">
    |-SecureActionButtonTemplate <Button name="SecureActionButtonTemplate" inherits="SecureFrameTemplate" virtual="true">
      |-SecureFrameTemplate <Frame name="SecureFrameTemplate" protected="true" virtual="true"/>
ActionButtonTemplate.xml

Code:
<CheckButton name="ActionButtonTemplate" virtual="true">
  <Texture name="$parentIcon" parentKey="icon"/>
  <Texture name="$parentFlash" parentKey="Flash" file="Interface\Buttons\UI-QuickslotRed" hidden="true"/>
  <Texture name="$parentFlyoutBorder" inherits="ActionBarFlyoutButton-IconFrame" parentKey="FlyoutBorder" hidden="true">
  <Texture name="$parentFlyoutBorderShadow" inherits="ActionBarFlyoutButton-IconShadow" parentKey="FlyoutBorderShadow" hidden="true">
  <Texture name="$parentFlyoutArrow" inherits="ActionBarFlyoutButton-ArrowUp" parentKey="FlyoutArrow" hidden="true"/>
  <FontString name="$parentHotKey" inherits="NumberFontNormalSmallGray" parentKey="HotKey" justifyH="RIGHT">
  <FontString name="$parentCount" inherits="NumberFontNormal" parentKey="Count" justifyH="RIGHT">
  <FontString name="$parentName" parentKey="Name" inherits="GameFontHighlightSmallOutline">
  <Texture name="$parentBorder" file="Interface\Buttons\UI-ActionButton-Border" parentKey="Border" hidden="true" alphaMode="ADD">
  <Texture parentKey="NewActionTexture" atlas="bags-newitem" useAtlasSize="false" alphaMode="ADD" hidden="true">
  <Cooldown name="$parentCooldown" inherits="CooldownFrameTemplate" parentKey="cooldown">
  <NormalTexture name="$parentNormalTexture" parentKey="NormalTexture" file="Interface\Buttons\UI-Quickslot2">
  <PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
  <HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
  <CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight"/>
</CheckButton>
Accessing ActionButton1 objects

Lua Code:
  1. local button = ActionButton1
  2. local buttonName = button:GetName()
  3.  
  4. local icon = _G[buttonName.."Icon"]
  5. local flash = _G[buttonName.."Flash"]
  6. local flyoutBorder = _G[buttonName.."FlyoutBorder"]
  7. local flyoutBorderShadow = _G[buttonName.."FlyoutBorderShadow"]
  8. local flyoutArrow = _G[buttonName.."FlyoutArrow"]
  9. local hotKey = _G[buttonName.."HotKey"]
  10. local count = _G[buttonName.."Count"]
  11. local name = _G[buttonName.."Name"]
  12. local border = _G[buttonName.."Border"]
  13. local NewActionTexture = button.NewActionTexture
  14. local cooldown = _G[buttonName.."Cooldown"]
  15.  
  16. local normalTexture = button:GetNormalTexture()
  17. local pushedTexture = button:GetPushedTexture()
  18. local highlightTexture = button:GetHighlightTexture()
  19. local checkedTexture = button:GetCheckedTexture()

WoW API CheckButton: http://wowprogramming.com/docs/widgets/CheckButton

Other bars

Code:
--OverrideActionBarButtonTemplate
<CheckButton name="OverrideActionBarButtonTemplate" inherits="ActionBarButtonTemplate" virtual="true">
</CheckButton>

--PetActionButtonTemplate
<CheckButton name="PetActionButtonTemplate" inherits="SecureFrameTemplate, ActionButtonTemplate" frameStrata="MEDIUM" virtual="true">
  <Texture name="$parentAutoCastable" file="Interface\Buttons\UI-AutoCastableOverlay" hidden="true">
  <Frame name="$parentShine" inherits="AutoCastShineTemplate">
  <NormalTexture name="$parentNormalTexture2" file="Interface\Buttons\UI-Quickslot2">
</CheckButton>

--PossessButtonTemplate
<CheckButton name="PossessButtonTemplate" inherits="SecureFrameTemplate, ActionButtonTemplate" virtual="true">
</CheckButton>

--StanceButtonTemplate
<CheckButton name="StanceButtonTemplate" inherits="SecureFrameTemplate, ActionButtonTemplate" virtual="true">
  <NormalTexture name="$parentNormalTexture2" file="Interface\Buttons\UI-Quickslot2">
</CheckButton>

--ExtraActionButtonTemplate
<CheckButton name="ExtraActionButtonTemplate" inherits="ActionBarButtonCodeTemplate" virtual="true">  
  <Texture name="$parentIcon" parentKey="icon"/>  
  <Texture name="$parentFlash" file="Interface\Buttons\UI-QuickslotRed" hidden="true"/>  
  <FontString name="$parentHotKey" parentKey="HotKey" inherits="NumberFontNormalGray">  
  <FontString name="$parentCount" parentKey="Count" inherits="NumberFontNormal" justifyH="RIGHT">  
  <Texture name="$parentFlash" parentKey="Flash" file="Interface\Buttons\UI-QuickslotRed" hidden="true"/>
  <Texture file="Interface\UnitPowerBarAlt\SpellPush-Frame" parentKey="style">
  <Cooldown name="$parentCooldown" inherits="CooldownFrameTemplate" parentKey="cooldown">
  <NormalTexture name="$parentNormalTexture" parentKey="NormalTexture" file="Interface\Buttons\UI-Quickslot2">
  <HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
  <CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight"/>
</CheckButton>
All actionbars (minus ExtraActionBar) use ActionButtonTemplate for default button styles.

Notable differences:

PetActionBar has 3 new objects
  • AutoCastable
  • Shine
  • NormalTexture2 (overrides NormalTexture from the ActionButtonTemplate, but retrievable by using button:GetNormalTexture().)

StanceBar has one new object
  • NormalTexture2 (overrides NormalTexture from the ActionButtonTemplate, but retrievable by using button:GetNormalTexture().)

ExtraActionBar
ExtraActionButton1 has its own template and thus needs a different style function.
ExtraActionButton1.style is the wierd art around the ExtraActionButton1.
ExtraActionButton1 has two Textures with $parentname = "Flash". Not sure if that is a bug.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-27-16 at 08:06 AM.
 
05-27-16, 10:40 AM   #6
Folji
A Flamescale Wyrmkin
 
Folji's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 136
That's a really lovely overview, Zork! Been rooting a lot around your action bar code to figure out how to easily handle and alter the action bars, haha.

Here's a curious question though. The button textures, at least the normal button texture, it's shown me an awful tendency to be about twice the size of the button itself when replaced with a custom texture. Is that intended? Is it just a bad idea to pass the texture path directly through :SetNormalTexture() ?
 
05-27-16, 10:45 AM   #7
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
Originally Posted by Folji View Post
That's a really lovely overview, Zork! Been rooting a lot around your action bar code to figure out how to easily handle and alter the action bars, haha.

Here's a curious question though. The button textures, at least the normal button texture, it's shown me an awful tendency to be about twice the size of the button itself when replaced with a custom texture. Is that intended? Is it just a bad idea to pass the texture path directly through :SetNormalTexture() ?
I guess Blizzard uses a 66x66 normalTexture size for a 36x36 button.

You need to adjust the texture size with

Lua Code:
  1. self:GetNormalTexture():SetSize(x,y)    -- resize texture
  2. self:SetNormalTexture()    -- change texture
__________________

Last edited by syncrow : 05-27-16 at 10:48 AM.
 
05-27-16, 10:47 AM   #8
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Yes that is intended. That is because of the default quickslot texture. It is double the size of the actual button. Normally you do this if your border is bigger than your actual button and you want to put it 1:1 over the button without any pixel conversion.

You can easily fix it by doing normalTexture:SetAllPoints().
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
05-30-16, 02:43 AM   #9
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I need some help on macro conditions.

The biggest issues is this mess:
https://github.com/tomrus88/Blizzard...roller.lua#L99

That is Blizzard code to change the mainactionbar to the overridebar under certain conditions.

Here is the problem. I need to reflect that function only using the macro conditions here:
http://wow.gamepedia.com/Macro_conditionals

Those are the conditons that make sense:
Code:
actionbar:1/.../6 or bar:1/.../6 — Given action bar page is selected.
bonusbar:1/... — a (specific) bonus action bar is currently overriding the player's main action bar.
canexitvehicle — Player is in a vehicle and can exit it at will.
overridebar — Player's main action bar is currently replaced by the override action bar.
possessbar — Player's main action bar is currently replaced by the possess action bar.
shapeshift — Player's main action bar is currently replaced by a temporary shapeshift action bar.
vehicleui — Player has vehicle UI.
I need two conditions.
One that shows the OverrideActionBar when actions are loaded into it.
And a second one that shows the actions in the MainActionbar if the OverrideActionBar is not used.

Currently my conditions are like this:

OverrideActionBar

Blizzard conditions:
Lua Code:
  1. -- If we have a skinned vehicle bar or skinned override bar, display the OverrideActionBar
  2.     if ((HasVehicleActionBar() and UnitVehicleSkin("player") and UnitVehicleSkin("player") ~= "")
  3.     or (HasOverrideActionBar() and GetOverrideBarSkin() and GetOverrideBarSkin() ~= 0)) then
My macro condition:
Code:
"[overridebar][vehicleui][possessbar,@vehicle,exists] show; hide"
MainActionBar

Blizzard conditions:
Lua Code:
  1. -- If we have a non-skinned override bar of some sort, use the MainMenuBarArtFrame
  2.     elseif ( HasBonusActionBar() or HasOverrideActionBar() or HasVehicleActionBar() or HasTempShapeshiftActionBar() or C_PetBattles.IsInBattle() ) then
My macro condition:
Code:
"[petbattle][overridebar][vehicleui][possessbar,@vehicle,exists] hide; show"
Shapeshift and bonusbar are not yet included because they affect the mainactionbar only anyway. This works fine for many situations. But there seems to be a quest that returns true for [possessbar,@vehicle,exists] while not showing ablities in the overrideactionbar.

I have no macro condition that reflects the first Blizzard condition where they check for UnitVehicleSkin or OverrideBarSkin. That would problably solve my issue.

*edit*

One way out may be this right here:
https://github.com/tomrus88/Blizzard...onment.lua#L86

Most importantly: HasOverrideUI. That does not exist right? http://us.battle.net/wow/en/forum/topic/7350045197

Any ideas?

Sources:

Code:
/run local s=SecureCmdOptionParse print(s("[bonusbar]bb;nobb"),s("[canexitvehicle]cev;nocev"),s("[overridebar]ob;noob"),s("[possessbar]pb;nopb"),s("[shapeshift]tss;notss"),s("[vehicleui]vui;novui"),s("[@vehicle,exists]ve;nove"))
http://wowprogramming.com/docs/api/SecureCmdOptionParse
http://wow.gamepedia.com/Macro_conditionals
http://www.wowinterface.com/forums/s...ad.php?t=45083
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-30-16 at 03:34 AM.
 
05-30-16, 06:16 AM   #10
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
You can take a look at the conditions I use for my actionbars, they should all work, although I haven't tested possessed myself.
 
05-30-16, 06:26 AM   #11
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
@p3lim
We are using the same conditions:
https://github.com/p3lim-wow/pAction...verride.lua#L5
https://github.com/zorker/rothui/blo...onfig.lua#L210

Currently the issue is no big deal because only one quest may be affected. Just wanted to gather all the information available. Just in case.

Btw...where the hell can one find information about valid macro conditionals other than wowpedia?

Thank you internet archive: http://web.archive.org/web/201208080...pic/6079671818

Kaivax - 7/20/2012
A [petbattle] macro conditional will be in an upcoming beta build.

Thanks for the feedback!

----

Kaivax - 7/23/2012
In a future beta build, we're adding the following macro conditionals:
"possessbar", "overridebar", "extrabar".
In the end. The most important variable for my case is CURRENT_ACTION_BAR_STATE. It will be either set to main or override bar state. But I'm not sure if I can access that variable in a secure state driver.

Some more old sources from MoP
http://www.wowinterface.com/forums/s...ad.php?t=44097
http://www.wowinterface.com/forums/s...ht=overridebar
http://www.wowinterface.com/forums/s...ht=overridebar
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-30-16 at 07:16 AM.
 
05-30-16, 07:17 AM   #12
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by zork View Post
Btw...where the hell can one find information about valid macro conditionals other than wowpedia?
Nowhere, but wowpedia/wowwiki/wowprogramming and some other similar sites T_T And that's sad.

A friend of mine, he's a JS developer IRL, recently tried to write addons for fun, but he was baffled by the fact that there's no official documentation at all.
__________________

Last edited by lightspark : 05-30-16 at 07:46 AM.
 
05-30-16, 07:41 AM   #13
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Originally Posted by lightspark View Post
he was baffled by the fact that there's no official documentation at all.
Sadly, that is the prevailing attitude for most, if not all MMO developers. Trion, maker of Rift, did for some time have an official API documented. However, when ZorbaTHut (he of QuestHelper) left the employ of Trion, all API documentation stagnated.

Rift does have newer APIs than when Zorba was lead API developer, but none of the additions, removals, and changes are documented officially.

Of course, as we know, Blizzard has never released official documentation for WoW's API, as as far as I know, no other developer documents their APIs either.

MMO developers love their AddOn communities, but don't seem to be inclined to participate.
 
05-30-16, 09:21 AM   #14
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I checked DuffedUI and to my suprise liquidbase is still using the page-swapping technique that I was using aswell in Cataclysm.

rActionBarStyler Cataclysm
https://github.com/zorker/rothui/blo...s/bar1.lua#L34

DuffedUI
https://github.com/liquidbase/Duffed...nbars/Bar1.lua

Hmmm. I got rid of the page swap because I could not get it working properly in MoP.
Benefit is that you can merge the possessbar, vehicle and overridebar into the actionbar1.

Basically what can be done is what Tuller wrote here:
http://www.wowinterface.com/forums/s...29&postcount=8

Thanks to the additions to the RestrictedEnvironment we can determine the current page in secure environment:
https://github.com/tomrus88/Blizzard...onment.lua#L86

Means we can emulate what the actionbar controller is doing aswell:
https://github.com/tomrus88/Blizzard...oller.lua#L117

With the exception that we do not load possessbar/overridebar but instead change the page of the first actionbar.

http://wowprogramming.com/docs/secure_template
http://wowwiki.wikia.com/wiki/Secure...rStateTemplate
http://www.wowace.com/addons/libacti...1-0/pages/api/
http://git.tukui.org/Elv/elvui/commi...41c06c21.patch

Bigger problem is finding good documentation on how to work with secure environments.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-30-16 at 11:05 AM.
 
05-30-16, 03:26 PM   #15
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I tested it. It is in fact still really simple to do. This is all you need:
https://github.com/zorker/rothui/blo...rTest/bar1.lua

Currently debating if I want to add it. It helps merging a lot of bars. One does not even need to create a vehicle exit button. One can just reparent the OverrideActionBar.LeaveButton and change its visibility based on the canexitvehicle macro condition.

Ok I did change it. Was super easy to implement:

https://github.com/zorker/rothui/com...85cc2000a2091d

The main part is this macro condition:
Code:
"[vehicleui] 1; [possessbar] 2; [overridebar] 3; [shapeshift] 4; [bar:2] 5; [bar:3] 6; [bar:4] 7; [bar:5] 8; [bar:6] 9; [bonusbar:1] 10; [bonusbar:2] 11; [bonusbar:3] 12; [bonusbar:4] 13; 14"
Basically just a number that counts up for each macro condition. I only need it to fire the __onstate-page trigger. In the function we have access to all the functions that the actionbarcontroller has access to aswell.
Lua Code:
  1. frame:SetAttribute("_onstate-page", [[
  2.       if HasVehicleActionBar() then
  3.         newstate = GetVehicleBarIndex()
  4.       elseif HasOverrideActionBar() then
  5.         newstate = GetOverrideBarIndex()
  6.       elseif HasTempShapeshiftActionBar() then
  7.         newstate = GetTempShapeshiftBarIndex()
  8.       elseif GetBonusBarOffset() > 0 then
  9.         newstate = GetBonusBarOffset()+6
  10.       else
  11.         newstate = GetActionBarPage()
  12.       end
  13.       for i, button in next, buttons do
  14.         button:SetAttribute("actionpage", newstate);
  15.       end
  16.     ]])

Result: https://github.com/zorker/rothui/blo.../init.lua#L100
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-30-16 at 05:46 PM.
 
05-30-16, 09:23 PM   #16
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by myrroddin View Post
However, when ZorbaTHut (he of QuestHelper) left the employ of Trion, all API documentation stagnated.
He still works for Trion, just doing other things.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
 
05-30-16, 10:40 PM   #17
Nodus Cursorius
A Defias Bandit
 
Nodus Cursorius's Avatar
Join Date: May 2016
Posts: 3
Originally Posted by zork View Post
Btw...where the hell can one find information about valid macro conditionals other than wowpedia?
Diff between current Wowpedia (left) macro conditionals and Legion 21737 beta (right) macro conditionals: https://www.diffchecker.com/j2dkxh8h

Usages of the new conditional is something I may dig into another day, if someone doesn't figure it out by then. Enjoy, Zork. Always respect your work and tenacity for documentation clarity.

Last edited by Nodus Cursorius : 05-30-16 at 10:46 PM. Reason: Link fixed to compensate for Wowpedia's atrocious formatting
 
05-30-16, 10:50 PM   #18
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
"pvptalent" is presumably to check if a given pvp talent is selected in the same way that the "talent" macro condition is used.

[pvptalent:<row#>/<col#>]
 
05-31-16, 11:16 AM   #19
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I just uploaded the latest version. Here is what I ended up using:

Page condition:
Code:
"[vehicleui]vui; [possessbar]pb; [overridebar]ob; [shapeshift]ss; [bonusbar:1]bb1; [bonusbar:2]bb2; [bonusbar:3]bb3; [bonusbar:4]bb4; [bonusbar:5]bb5; [bar:2]b2; [bar:3]b3; [bar:4]b4; [bar:5]b5; [bar:6]b6; [form]frm; [bar:1]b1; xx"
https://github.com/zorker/rothui/blo...config.lua#L80

Page Statedriver:
Lua Code:
  1. for i, button in next, buttonList do
  2.   frame:SetFrameRef(cfg.buttonName..i, button);
  3. end
  4. frame:Execute(([[
  5.   buttons = table.new()
  6.   for i=1, %d do
  7.     table.insert(buttons, self:GetFrameRef("%s"..i))
  8.   end
  9. ]]):format(cfg.numButtons, cfg.buttonName))
  10. frame:SetAttribute("_onstate-page", [[
  11.   if HasVehicleActionBar() then
  12.     newstate = GetVehicleBarIndex()
  13.   elseif HasOverrideActionBar() then
  14.     newstate = GetOverrideBarIndex()
  15.   elseif HasTempShapeshiftActionBar() then
  16.     newstate = GetTempShapeshiftBarIndex()
  17.   elseif GetBonusBarOffset() > 0 then
  18.     newstate = GetBonusBarOffset()+6
  19.   else
  20.     newstate = GetActionBarPage()
  21.   end
  22.   for i, button in next, buttons do
  23.     button:SetAttribute("actionpage", newstate);
  24.   end
  25. ]])
  26. RegisterStateDriver(frame, "page", cfg.framePage)
https://github.com/zorker/rothui/blo.../init.lua#L104
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
06-02-16, 03:44 PM   #20
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Man...just had the error for the first time that someone posted me (1 out of 100 or the like...)

Page swap macro conditions trigger before the actionbar controller functions return the correct bar id.
Since there is no condition change thereafter the bar stays on the wrong page.

Currently trying to reproduce it. No chance. Always works atm. Error in the matrix. >_<
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 06-02-16 at 03:55 PM.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Default Actionbars and ActionButtons

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off