WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   ExtraActionButton1 (https://www.wowinterface.com/forums/showthread.php?t=41690)

zork 10-26-11 12:40 PM

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.

Tuller 10-29-11 12:20 PM

That's more or less what my plan /w Dominos is, except I've attempted to re-parent the entire ExtraActionBar.

zork 10-29-11 12:57 PM

Not sure if that will work. UIParent_ManageFramePositions() gets called somewhere in the code to reposition the frame.

sigg 11-01-11 04:21 AM

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;

zork 11-30-11 06:56 PM

Where can we test this button? Raid only?

Monolit 11-30-11 07:04 PM

Quote:

Originally Posted by zork (Post 248236)
Where can we test this button? Raid only?

running those LFR pugs sounds like fun fun fun debugging :banana:

Ketho 11-30-11 11:57 PM

Quote:

Originally Posted by zork (Post 248236)
Where can we test this button? Raid only?

afaik during the Ultraxion and Madness of Deathwing fight

p3lim 12-01-11 01:59 AM

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

Xrystal 12-01-11 02:06 AM

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.

p3lim 12-01-11 02:10 AM

Quote:

Originally Posted by Xrystal (Post 248265)
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

Xrystal 12-01-11 02:22 AM

Ah, the PlayerPowerBarAlt frame ?

Good thats already in my mover plugin, but looks like this new extra bar needs to be added...

zork 12-01-11 03:37 AM

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

Vlad 12-01-11 08:37 AM

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.)

Tuller 12-01-11 01:27 PM

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

p3lim 12-02-11 01:51 PM

Final version which has been tested in Dragon Soul and works:
https://github.com/p3lim/pBindings/b...r/extrabar.lua

Zista 12-03-11 02:08 AM

For those trying to reparent the entire bar, use
Code:

ExtraActionBarFrame.ignoreFramePositionManager = true
instead of
Code:

UIPARENT_MANAGED_FRAME_POSITIONS.ExtraActionBarFrame
to aviod taint.

Tuller 12-04-11 09:52 PM

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.

Loshine 12-04-11 10:26 PM

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

zork 12-05-11 01:24 AM

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.

Haleth 12-05-11 02:52 AM

To test it, try the tank minigame at the Darkmoon Faire. It appears there, for me.


All times are GMT -6. The time now is 03:00 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI