Download
(15Kb)
Download
Updated: 07-24-18 03:22 AM
Pictures
File Info
Compatibility:
Battle for Azeroth (8.0.1)
Updated:07-24-18 03:22 AM
Created:09-16-12 01:38 PM
Downloads:4,295
Favorites:45
MD5:

MerchantFilterButtons

Version: v4.0.0
by: suicidalkatt [More]

Replaces the "two click" merchant filter drop down menu with "one click" buttons.

Simply install, no configuration needed.




Check out my similar addon GuildRosterButtons!

-v4
  • TOC Updated
  • Updated API calls and texture placements.

-v3
  • TOC Updated
  • Animation API changes were fixed.
  • Views will now persist between logins / reloadUI.
  • Saved variables are now per character.

-v2.1
  • Fixed issue with buttons not being colored while selected.

-v2.1
  • ToC Bump

-v2.0
  • Settings per character are now saved between sessions.

-v1.9
  • ToC Bump.

-v1.8
  • Addressed glyph frame taint issue in previous version. Ty ravagernl for your insight :)

-v1.7
  • Code clean up. Icon placement and texcoord update.
  • Lol, buttons are flashy!

-v1.6
  • ToC Update

-v1.5
  • ToC Update

-v1.4
  • ToC Update

-v1.3
  • Added compensation for low level monks with no faction to still have a 'pandaren' icon for the 'all' button.

-v1.2
  • Fixed the 'class' button from using the proper localized class name.

-v1.1
  • Fixed issue with "SetPushed" not being able to be used outside of the BuildButtons() function.
Optional Files (0)


Post A Reply Comment Options
Unread 08-07-16, 06:46 PM  
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 331
File comments: 1467
Uploads: 50
Update has been released and fixed all issues.
Report comment to moderator  
Reply With Quote
Unread 07-26-16, 04:18 AM  
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 548
Uploads: 13
ok i fitx it
line 42
Code:
			coord = CLASS_ICON_TCOORDS[select(2,UnitClass("player"))],
line 101
Code:
		local fade1 = button.Flash.flasher:CreateAnimation("Alpha")
		fade1:SetDuration(0.5)
		fade1:SetFromAlpha(1)
		fade1:SetToAlpha(0)
		fade1:SetOrder(1)
		local fade2 = button.Flash.flasher:CreateAnimation("Alpha")
		fade2:SetDuration(0.5)
		fade2:SetFromAlpha(0)
		fade2:SetToAlpha(-1)
		fade2:SetOrder(2)
Last edited by EKE : 07-26-16 at 04:44 AM.
Report comment to moderator  
Reply With Quote
Unread 07-25-16, 09:40 PM  
Barleduq
Premium Member
 
Barleduq's Avatar
Premium Member

Forum posts: 135
File comments: 742
Uploads: 0
Originally Posted by EKE
Code:
\MerchantFilterButtons.lua:45: attempt to index global 'CLASS_BUTTONS' (a nil value)
Seconded. It was throwing errors and there were no buttons or dropdowns at all on the vendor frames. Dropdowns came back when I removed the addon. I hadn't gotten around to this one to start reporting, as it's a convenience addon for me, not a base functionality one. Mind you, if it's not going to be updated, I'm going to start looking for something like it, again.

Thank you!
-Barleduq
Report comment to moderator  
Reply With Quote
Unread 07-25-16, 11:42 AM  
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 548
Uploads: 13
Code:
\MerchantFilterButtons.lua:45: attempt to index global 'CLASS_BUTTONS' (a nil value)
Report comment to moderator  
Reply With Quote
Unread 10-28-14, 03:02 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
Thanks for the update. Finally colored buttons again. :-)
__________________
| 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 : 10-28-14 at 03:02 AM.
Report comment to moderator  
Reply With Quote
Unread 10-26-14, 10:42 PM  
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 331
File comments: 1467
Uploads: 50
Originally Posted by Miralen
Just a fantastic addon, the simplicity of the idea behind this addon is what makes it just great. It is a perfect example of what should be built into the game instead of the horrid drop down menu. It's one of those addons that I place in the category entitled "Betterment of Life" which rates in the top 5 of that category for me along with your Guild Filter Buttons addon.

So, in short, many thanks for the work you put into this and your GFB addon.
Thanks I really appreciate your love for it
Report comment to moderator  
Reply With Quote
Unread 10-26-14, 09:46 PM  
Miralen
A Rage Talon Dragon Guard
 
Miralen's Avatar

Forum posts: 341
File comments: 80
Uploads: 0
Just a fantastic addon, the simplicity of the idea behind this addon is what makes it just great. It is a perfect example of what should be built into the game instead of the horrid drop down menu. It's one of those addons that I place in the category entitled "Betterment of Life" which rates in the top 5 of that category for me along with your Guild Filter Buttons addon.

So, in short, many thanks for the work you put into this and your GFB addon.
__________________
Never hold discussions with the monkey when the organ grinder is in the room.

- Winston Churchill
Report comment to moderator  
Reply With Quote
Unread 08-10-13, 09:09 AM  
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 331
File comments: 1467
Uploads: 50
Originally Posted by ravagernl
Thanks for updating
Thank you :3
Report comment to moderator  
Reply With Quote
Unread 08-10-13, 07:23 AM  
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 1176
File comments: 26
Uploads: 6
Thanks for updating
Report comment to moderator  
Reply With Quote
Unread 08-09-13, 04:46 PM  
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 331
File comments: 1467
Uploads: 50
Originally Posted by ravagernl
This AddOn is tainting the talent/glyph frame. Here is the error captured by BugSack:


Glyph changing/talent changing no longer works after this error(the alknown error comes up). MicroButtonPulse may add a neat little animation, it does not add any functionality. Please remove it or replace it with animations.
Thanks I'll look into it.
Report comment to moderator  
Reply With Quote
Unread 08-09-13, 08:42 AM  
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 1176
File comments: 26
Uploads: 6
This AddOn is tainting the talent/glyph frame. Here is the error captured by BugSack:
1010x !NoTaint-13.02.13\Code.lua:71: AddOn calls UIFrameFlash, you may not be able to switch talent.
<in C code>
!NoTaint-13.02.13\Code.lua:71: in function <!NoTaint\Code.lua:68>
<in C code>
FrameXML\MainMenuBarMicroButtons.lua:193: in function "MicroButtonPulse"
MerchantFilterButtons\MerchantFilterButtons-1.7.lua:68: in function <MerchantFilterButtons\MerchantFilterButtons.lua:59>
MerchantFilterButtons\MerchantFilterButtons-1.7.lua:117: in function <MerchantFilterButtons\MerchantFilterButtons.lua:110>
Glyph changing/talent changing no longer works after this error(the alknown error comes up). MicroButtonPulse may add a neat little animation, it does not add any functionality. Please remove it or replace it with animations.
Last edited by ravagernl : 08-09-13 at 08:44 AM.
Report comment to moderator  
Reply With Quote
Unread 03-14-13, 02:18 PM  
Barleduq
Premium Member
 
Barleduq's Avatar
Premium Member

Forum posts: 135
File comments: 742
Uploads: 0
Still not working

This is what the end of the file currently looks like. These are the last 11 lines of the file.

Lua Code:
  1. f:SetScript("OnEvent", function(self,event,...)
  2.     local arg1, arg2 = ...
  3.     if event == "PLAYER_ENTERING_WORLD" then
  4.         self:UnregisterEvent(event)
  5.         MerchantFrameLootFilter:Hide()
  6.                 MerchantFrame_SetFilter(MerchantFrame,LE_LOOT_FILTER_ALL)
  7.         BuildButtons()
  8.     elseif event == "MERCHANT_FILTER_ITEM_UPDATE" then
  9.         SetPushed(GetMerchantFilter())
  10.     end
  11. end)

What am I doing wrong?
Report comment to moderator  
Reply With Quote
Unread 03-13-13, 03:55 PM  
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 331
File comments: 1467
Uploads: 50
Re: Re: Default to 'All'

Originally Posted by Barleduq
I added it, I believe correctly, and there's no change in behavior - the button highlighted when I first open a vendor pane is the one for my class.
Turns out I put the added line in the wrong order, it needs to be before (BuildButtons()):

Lua Code:
  1. local f = CreateFrame("frame")
  2. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. f:RegisterEvent("MERCHANT_FILTER_ITEM_UPDATE")
  4. f:SetScript("OnEvent", function(self,event,...)
  5.     local arg1, arg2 = ...
  6.     if event == "PLAYER_ENTERING_WORLD" then
  7.         self:UnregisterEvent(event)
  8.         MerchantFrameLootFilter:Hide()
  9.         MerchantFrame_SetFilter(MerchantFrame,LE_LOOT_FILTER_ALL)
  10.         BuildButtons()
  11.     elseif event == "MERCHANT_FILTER_ITEM_UPDATE" then
  12.         SetPushed(GetMerchantFilter())
  13.     end
  14. end)
Report comment to moderator  
Reply With Quote
Unread 03-12-13, 09:28 PM  
Barleduq
Premium Member
 
Barleduq's Avatar
Premium Member

Forum posts: 135
File comments: 742
Uploads: 0
Re: Default to 'All'

An easy way to add this function would be to add the line commented to the event parsing at the end of the code:
I added it, I believe correctly, and there's no change in behavior - the button highlighted when I first open a vendor pane is the one for my class.
Report comment to moderator  
Reply With Quote
Unread 03-09-13, 03:17 PM  
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 331
File comments: 1467
Uploads: 50
Re: Thank you, and request

Originally Posted by Barleduq
First off, thank you for updating to 5.2, and for being so responsive!!

Second, I've been looking for some way to have the selection at the merchant default to 'all'. I originally found this addon when I was looking for some way to do that, since, as far as I can tell, Blizz doesn't provide it.

I expect other people would want it different; would it be possible to add a setting to have the default choice be (for example), all, class, class spec 1, 2, 3, ... (I seem to think there are 6 buttons, but I can't remember the other one...)

Regardless, it's much more pleasant to use this than the drop-down in hte default ui. Thank you!
An easy way to add this function would be to add the line commented to the event parsing at the end of the code:

Lua Code:
  1. local f = CreateFrame("frame")
  2. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. f:RegisterEvent("MERCHANT_FILTER_ITEM_UPDATE")
  4. f:SetScript("OnEvent", function(self,event,...)
  5.     local arg1, arg2 = ...
  6.     if event == "PLAYER_ENTERING_WORLD" then
  7.         self:UnregisterEvent(event)
  8.         MerchantFrameLootFilter:Hide()     
  9.         BuildButtons()
  10.         MerchantFrame_SetFilter(MerchantFrame,LE_LOOT_FILTER_ALL) -- Add this line or replace all code here.
  11.     elseif event == "MERCHANT_FILTER_ITEM_UPDATE" then
  12.         SetPushed(GetMerchantFilter())
  13.     end
  14. end)

This is untested, however it should work.
Last edited by suicidalkatt : 03-09-13 at 03:20 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.