Thread Tools Display Modes
12-05-11, 04:33 AM   #21
Loshine
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 2
Originally Posted by zork View Post
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.
thank you for your help~

I'll rewrite it in my own lua
  Reply With Quote
12-05-11, 10:36 AM   #22
tukz
A Fallenroot Satyr
 
tukz's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 20
First of all, you don't need to parent to UIParent, it should be already parented here by default.

This is the reason why FramePositionManager taint if you move it from it's default position. Enabling ignoreFramePositionManager should solve the issue with tainting if parented to UIParent and if you move it from here.

There is another way to avoid tainting. Tuller seem to use this method aswell as seen on page 1 of this topic. On PTR, what I did when saw this button on a mmo-champion stream was to parent ExtraActionBarFrame to an "holder" frame. You use your own frame for StartMoving() and StopMovingOrSizing() instead of the Blizzard Frame. When you parent a frame somewhere else than it's default parent, it ignore FramePositionManager. This method is almost the same some users did in here with their regular action bars (MultiBarLeft, etc).

Btw, thx Roth for the texture hooking idea, I agree that it was very ugly.
  Reply With Quote
12-05-11, 11:38 AM   #23
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by tukz View Post
First of all, you don't need to parent to UIParent, it should be already parented here by default.
Its parented to MainMenuBar by default
  Reply With Quote
12-05-11, 12:06 PM   #24
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
p3lim is right. /run ExtraActionBarFrame:GetParent():GetName() reveils it.

This is what I'm using atm. The frame at the darkmoonfaerie is funny. But maybe the vehicle button 1 is actionbutton 121 aswell.

This is my current implementation. Still needs testing. Not sure if the event hooking is actually required (and the show/hide may even cause trouble in combat)

lua Code:
  1. --get the addon namespace
  2.     local addon, ns = ...
  3.     --get the config values
  4.     local cfg = ns.cfg
  5.     local barcfg = cfg.bars.extrabar
  6.     if barcfg and not barcfg.disable then
  7.      
  8.       --holder frame
  9.       local bar = CreateFrame("Frame","rABS_ExtraActionBar",UIParent,"SecureHandlerStateTemplate")
  10.       bar:SetSize(barcfg.buttonsize,barcfg.buttonsize)
  11.       bar:SetPoint(barcfg.pos.a1,barcfg.pos.af,barcfg.pos.a2,barcfg.pos.x,barcfg.pos.y)
  12.       bar:SetHitRectInsets(-cfg.barinset, -cfg.barinset, -cfg.barinset, -cfg.barinset)
  13.       bar:SetScale(barcfg.barscale)
  14.       cfg.applyDragFunctionality(bar,barcfg.userplaced,barcfg.locked)
  15.      
  16.       --the frame
  17.       local f = ExtraActionBarFrame
  18.       f:SetParent(bar)
  19.       f:ClearAllPoints()
  20.       f:SetPoint("CENTER", 0, 0)
  21.       f.ignoreFramePositionManager = true
  22.      
  23.       --the button
  24.       local b = ExtraActionButton1
  25.       b:SetSize(barcfg.buttonsize,barcfg.buttonsize)
  26.       bar.button = b
  27.      
  28.       --style texture
  29.       local s = b.style
  30.       s:SetTexture(nil)
  31.       local disableTexture = function(style, texture)
  32.         if not texture then return end
  33.         if string.sub(texture,1,9) == "Interface" then
  34.           style:SetTexture(nil) --bzzzzzzzz
  35.         end
  36.       end
  37.       hooksecurefunc(s, "SetTexture", disableTexture)
  38.      
  39.       --register the event, make sure the damn button shows up
  40.       bar:RegisterEvent("UPDATE_EXTRA_ACTIONBAR")
  41.       bar:RegisterEvent("PLAYER_REGEN_ENABLED")
  42.       bar:SetScript("OnEvent", function(self, event, ...)
  43.         if (HasExtraActionBar()) then
  44.           self:Show()
  45.           self.button:Show()
  46.         else
  47.           self:Hide()
  48.         end
  49.       end)
  50.      
  51.     end --disable
__________________
| 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 : 12-06-11 at 05:43 AM.
  Reply With Quote
12-25-11, 06:58 AM   #25
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
By the way, these special spells can be manually put on any bar if you like, because you can simply find their spellID and run it trough PickupSpell(spellID) then place the spell on the bar -tada!

Not much point except it being visible on the screen, unlike a hotkey would use the spell but not be visible on your bars (if you hide the extra bar).

Anyway, not really on topic, sorry!
  Reply With Quote

WoWInterface » 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