Reply
Thread Tools Display Modes
Unread 10-26-11, 12:40 PM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,391
ExtraActionButton1

Has anyone worked with this button on the PTR already?
http://www.abload.de/img/wowscrnshot_102611_203zzzh.jpg

To make him appear you can do:
Code:
/run _G["ExtraActionButton1"]:Show()
/run _G["ExtraActionButton1"]:SetParent(UIParent)
/run _G["ExtraActionButton1"]:SetSize(100,100)
/run _G["ExtraActionButton1"]:SetPoint("CENTER",0,0)
The button is bound to the ExtraActionBarFrame:
Code:
/run print(_G["ExtraActionButton1"]:GetParent():GetName())
Ok, Tekkub has the Code already:

https://github.com/tekkub/wow-ui-sou...onBarFrame.lua
https://github.com/tekkub/wow-ui-sou...onBarFrame.xml

Search for "extra". Some Spell for Ysera is currently set up.

The event is: "UPDATE_EXTRA_ACTIONBAR"

There are no updates on parent or setpoint on the button. So we could just reparent it to another BarFrame.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

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

Last edited by zork : 10-26-11 at 01:14 PM.
zork is offline   Reply With Quote
Unread 10-29-11, 12:20 PM   #2
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 87
That's more or less what my plan /w Dominos is, except I've attempted to re-parent the entire ExtraActionBar.
Tuller is offline   Reply With Quote
Unread 10-29-11, 12:57 PM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,391
Not sure if that will work. UIParent_ManageFramePositions() gets called somewhere in the code to reposition the frame.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline   Reply With Quote
Unread 11-01-11, 04:21 AM   #4
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,229
Hello

It is an action button. The action id is 121.
It is the same range as the possess bar.

I just need to know if there is a visibility macro for that.
[extrabar] show; hide;
like
[combat] show; hide;
__________________
RDX manager
Sigg
sigg is offline   Reply With Quote
Unread 11-30-11, 06:56 PM   #5
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,391
Where can we test this button? Raid only?
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline   Reply With Quote
Unread 11-30-11, 07:04 PM   #6
Monolit
A Black Drake
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 81
Originally Posted by zork View Post
Where can we test this button? Raid only?
running those LFR pugs sounds like fun fun fun debugging
Monolit is offline   Reply With Quote
Unread 11-30-11, 11:57 PM   #7
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 569
Originally Posted by zork View Post
Where can we test this button? Raid only?
afaik during the Ultraxion and Madness of Deathwing fight
__________________
Ketho is offline   Reply With Quote
Unread 12-01-11, 01:59 AM   #8
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,313
What I've been working on:

https://gist.github.com/fc52a4369833ec30e03f
lua Code:
  1. local addon = CreateFrame('Frame')
  2. addon:RegisterEvent('PLAYER_LOGIN')
  3. addon:SetScript('OnEvent', function(self, event) self[event](ExtraActionBarFrame, event) end)
  4.  
  5. function addon:PLAYER_LOGIN()
  6.     if(UIPARENT_MANAGED_FRAME_POSITIONS.ExtraActionBarFrame) then
  7.         UIPARENT_MANAGED_FRAME_POSITIONS.ExtraActionBarFrame = nil
  8.     end
  9.  
  10.     self:SetParent(UIParent)
  11.     self:SetMovable(true)
  12.     self:EnableMouse(true)
  13.     self:RegisterForDrag('LeftButton')
  14.  
  15.     self:ClearAllPoints()
  16.     if(ExtraBarPosition) then
  17.         local point, x, y = string.split('\031', ExtraBarPosition)
  18.         self:SetPoint(point, UIParent, point, x, y)
  19.     else
  20.         ExtraBarPosition = 'LEFT\03140\0310'
  21.         self:SetPoint('LEFT', 40, 0)
  22.     end
  23.  
  24.    
  25.     self:SetScript('OnDragStart', function(self)
  26.         if(IsAltKeyDown()) then
  27.             self:StartMoving()
  28.         end
  29.     end)
  30.  
  31.     self:SetScript('OnDragStop', function(self)
  32.         self:StopMovingOrSizing()
  33.  
  34.         local point, _, _, x, y = self:GetPoint()
  35.         ExtraBarPosition = string.format('%s\031%d\031%d', point, x, y)
  36.  
  37.         if(InCombatLockdown()) then
  38.             self:ClearAllPoints()
  39.             self:SetPoint(point, UIParent, point, x, y)
  40.         else
  41.             addon:RegisterEvent('PLAYER_REGEN_ENABLED')
  42.         end
  43.     end)
  44. end
  45.  
  46. function addon:PLAYER_REGEN_ENABLED(event)
  47.     addon:UnregisterEvent(event)
  48.  
  49.     local point, x, y = string.split('\031', ExtraBarPosition)
  50.     self:ClearAllPoints()
  51.     self:SetPoint(point, UIParent, point, x, y)
  52. end
p3lim is offline   Reply With Quote
Unread 12-01-11, 02:06 AM   #9
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
Is this also used for the Hourglass actionbar bar in the Murozond fight in End Time? I haven't run any instances in ages but want to confirm if one of my nUI plugins will fix a moving of the bar issue people may have in that instance.
__________________
Xrystal is offline   Reply With Quote
Unread 12-01-11, 02:10 AM   #10
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,313
Originally Posted by Xrystal View Post
Is this also used for the Hourglass actionbar bar in the Murozond fight in End Time? I haven't run any instances in ages but want to confirm if one of my nUI plugins will fix a moving of the bar issue people may have in that instance.

No, thats the fancy power bar fluff
https://github.com/tekkub/wow-ui-sou...tePowerBar.lua
https://github.com/tekkub/wow-ui-sou...tePowerBar.xml
p3lim is offline   Reply With Quote
Unread 12-01-11, 02:22 AM   #11
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
Ah, the PlayerPowerBarAlt frame ?

Good thats already in my mover plugin, but looks like this new extra bar needs to be added...
__________________
Xrystal is offline   Reply With Quote
Unread 12-01-11, 03:37 AM   #12
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,391
tukz moves the full ExtaActionBarFrame. That seems to be an option aswell.

Here is the implementation I'm going to try with rActionBarStyler. I'm secure hooking the SetTexture function of the button.style object because I do not want that.
lua Code:
  1. --get the addon namespace
  2.   local addon, ns = ...
  3.  
  4.   --get the config values
  5.   local cfg = ns.cfg
  6.   local barcfg = cfg.bars.extrabar
  7.  
  8.   if not barcfg.disable then
  9.  
  10.     local num = 1
  11.  
  12.     local bar = CreateFrame("Frame","rABS_ExtraActionBar",UIParent,"SecureHandlerStateTemplate")
  13.     bar:SetWidth(barcfg.buttonsize*num+barcfg.buttonspacing*(num-1))
  14.     bar:SetHeight(barcfg.buttonsize)
  15.     bar:SetPoint(barcfg.pos.a1,barcfg.pos.af,barcfg.pos.a2,barcfg.pos.x,barcfg.pos.y)
  16.     bar:SetHitRectInsets(-cfg.barinset, -cfg.barinset, -cfg.barinset, -cfg.barinset)
  17.     bar:SetScale(barcfg.barscale)
  18.  
  19.     cfg.applyDragFunctionality(bar,barcfg.userplaced,barcfg.locked)
  20.    
  21.     ExtraActionBarFrame:SetParent(bar)
  22.     ExtraActionBarFrame:EnableMouse(false)
  23.    
  24.     local txt = "Interface\Addons" --debug
  25.     print(string.sub(txt,1,9)) --debug
  26.  
  27.     local disableTexture = function(style, texture)
  28.       if string.sub(texture,1,9) == "Interface" then
  29.         style:SetTexture("")--disable button style texture
  30.       end
  31.     end
  32.  
  33.     for i=1, num do
  34.       local button = _G["ExtraActionButton"..i]
  35.       if not button then return end
  36.       if button.style then
  37.         print(button.style:GetTexture()) --debug
  38.         button.style:SetTexture("")
  39.         hooksecurefunc(button.style, "SetTexture", disableTexture)
  40.       end
  41.       button:SetSize(barcfg.buttonsize, barcfg.buttonsize)
  42.       button:ClearAllPoints()
  43.       if i == 1 then
  44.         button:SetPoint("BOTTOMLEFT", bar, 0,0)
  45.       else
  46.         local previous = _G["ExtraActionButton"..i-1]
  47.         button:SetPoint("LEFT", previous, "RIGHT", barcfg.buttonspacing, 0)
  48.       end
  49.     end
  50.  
  51.   end --disable
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

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

Last edited by zork : 12-01-11 at 04:30 AM.
zork is offline   Reply With Quote
Unread 12-01-11, 08:37 AM   #13
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 765
Ok, so my question is, action slot 121 is the extra slot, but we can't use PlaceAction to actually put anything there, it seems the server on it's side will put an action for you then trigger the UPDATE_EXTRA_ACTIONBAR event to animate show(or hide) the frame and let you click that button.

You can also force it to show using:
Code:
/run local f=ExtraActionBarFrame f:Show() f.outro:Stop() f.intro:Play()
Then to hide with just calling the normal event:
Code:
/run ExtraActionBar_OnEvent(ExtraActionBarFrame,"UPDATE_EXTRA_ACTIONBAR")
But on fights like Yssera you can try put her spell there:
Code:
/run PickupSpell(106466) PlaceAction(121)
Or just the normal autoattack spell:
Code:
/run PickupSpell(6603) PlaceAction(121)
But none of these work at all, because the action on that slow is unavailable to our API, except GetActionInfo and such.

(Note it is hidden but will be shown if you pickup a spell, it autohides when it has no spell on itself. It's instantly tainted if you try to edit the attributes trough commands like setting the isExtra value or such, makes the button totally unusable.)
Vlad is offline   Reply With Quote
Unread 12-01-11, 01:27 PM   #14
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 87
Stupid theory:
* Create an action button, with ID 121/reuse & reparent ExtraActionButton1
* Give it a showstate of the following: [group,nobonusbar:5,novehicle]show;hide
Tuller is offline   Reply With Quote
Unread 12-02-11, 01:51 PM   #15
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,313
Final version which has been tested in Dragon Soul and works:
https://github.com/p3lim/pBindings/b...r/extrabar.lua
p3lim is offline   Reply With Quote
Unread 12-03-11, 02:08 AM   #16
Zista
A Murloc Raider
 
Zista's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 5
For those trying to reparent the entire bar, use
Code:
ExtraActionBarFrame.ignoreFramePositionManager = true
instead of
Code:
UIPARENT_MANAGED_FRAME_POSITIONS.ExtraActionBarFrame
to aviod taint.
__________________
Zista is offline   Reply With Quote
Unread 12-04-11, 09:52 PM   #17
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 87
Here's the final stupid thing I decided to try in order to get the extra action buttons to work, which is seemingly working (based on one report):
https://github.com/tullamods/Dominos...aActionBar.lua

Basically, I created a secure frame, attached it to the ExtraActionBarFrame so that I could detect when it was shown/hidden by Blizzard code. Then, I attached the ExtraActionButton to my own secure frame, which is shown/hidden by the detector frame.
Tuller is offline   Reply With Quote
Unread 12-04-11, 10:26 PM   #18
Loshine
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 2
The code what i have been used:
Code:
local ebf = ExtraActionBarFrame

ebf:SetParent(UIParent)
ebf:ClearAllPoints()
ebf:SetPoint("CENTER", UIParent, 0, -250)
ebf.SetPoint = function() end
It is only used to move the ExtraActionBarFrame
Loshine is offline   Reply With Quote
Unread 12-05-11, 01:24 AM   #19
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,391
Like Zista posted above

lua Code:
  1. local ebf = ExtraActionBarFrame
  2. ebf:SetParent(UIParent)
  3. ebf:ClearAllPoints()
  4. ebf:SetPoint("CENTER", UIParent, 0, -250)
  5. --ebf.SetPoint = function() end --this is bad
  6. ebf.ignoreFramePositionManager = true

This should prevent the taint you will be getting in combat.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline   Reply With Quote
Unread 12-05-11, 02:52 AM   #20
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,172
To test it, try the tank minigame at the Darkmoon Faire. It appears there, for me.
Haleth is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » General Authoring Discussion » ExtraActionButton1

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