Download
(3Kb)
Download
Updated: 10-10-20 05:00 PM
Pictures
File Info
Compatibility:
Shadowlands pre-patch (9.0.1)
Updated:10-10-20 05:00 PM
Created:11-24-14 07:41 PM
Downloads:6,478
Favorites:37
MD5:

Sorted Currency Tab  Popular! (More than 5000 hits)

Version: 2.2
by: Nephaliana [More]

Version 2.2 - updated for Shadowlands 9.0!

Sorted Currency Tab is a result from a request on MMO-Champion's Interface and Macro forum. Apparently several people wanted the Warlords of Draenor currencies to be more visible, rather than be thrown to the bottom of the list due to Blizzard's default alphabetical sorting of headers at the time. Sorted Currency Tab provides a way to customize currency header order. On each header, there are arrows to move each category up and down the list.

Additionally, collapsed currency headers will now stay collapsed between sessions! While this is still true, the default UI now handles this as well. The related code will likely be removed in the next release of this addon.

Please let me know if you have any issues. Thanks.

Notes:
- With the changes in version 2.0, localization should no longer be required. If you have a prior version of this addon installed, you can delete the file localization.lua in the SortedCurrencyTab folder.
- Default sort order is the order each category is discovered. Existing categories will be in the order defined by Blizzard (formerly alphabetical, but now mostly reverse chronological); new categories will be placed at the end.
- Default sort order can be restored by using the /sortcurrencytab command.

Change Log
==========
2.2
- Updated for Shadowlands compatibility

2.1
- Corrected sorting arrows not disappearing when you used the mouse wheel to scroll the currency frame (still don't always appear correctly if a header gets placed under the mouse pointer when using the mouse wheel scrolling, but I think that is less of an issue than the arrows remaining visible on non-header rows)
- Added command to reset sort order to default (current categories are sorted in the game's default order [alphabetically]; new ones will still be added to the bottom)
-- Use /sortcurrencytab, /sortcurtab, or /sortcurrency

2.0
- Added way for users to customize order (up/down arrows on category headers)
- As the order is now customizable, Warlords of Draenor and Dungeon & Raid categories are no longer sorted to the top and bottom, respectively, by default.
- Localization should be a non-issue, as the addon will sort and organize using the localized names returned in-game (localization.lua removed).
- Collapsed status of the categories is now remembered between sessions

1.2a
- Removed extraneous print() (debug) statement

1.2
- Added localization support (full support for deDE, esMX, ptBR; possibly also esES, frFR, and itIT)
- Defaulted search for WoD currency header to Blizzard-provided constant (theoretically adds partial support for all localizations)

1.1
- Fixed issue where new currencies would not display on currency tab
- Made data variable local (was global for testing and forgot to set it back)

1.0
- Initial Release
Post A Reply Comment Options
Unread 11-07-22, 07:31 AM  
Daveo77
Premium Member
 
Daveo77's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 141
File comments: 58
Uploads: 1
Thanks Nathanyel, that got the addon working again
__________________
Report comment to moderator  
Reply With Quote
Unread 11-02-22, 04:35 AM  
Nathanyel
A Deviate Faerie Dragon
 
Nathanyel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 213
Uploads: 17
Originally Posted by Nephaliana
Originally Posted by Daveo77
Will this addon be updated for 10.0.0 Dragonflight Pre-patch/10.0.2 Dragonflight ?
I honestly haven't logged on retail for a while. I'll try if I can squeeze in some time tonight to see what updates it will need.

Edit: I just saw Nathanyel's post.. so that should make it easier to update.
Note that you can log onto characters at level <= 20 without a sub
Report comment to moderator  
Reply With Quote
Unread 11-01-22, 06:17 PM  
Nephaliana
A Kobold Labourer
 
Nephaliana's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 37
Uploads: 22
Originally Posted by Daveo77
Will this addon be updated for 10.0.0 Dragonflight Pre-patch/10.0.2 Dragonflight ?
I honestly haven't logged on retail for a while. I'll try if I can squeeze in some time tonight to see what updates it will need.

Edit: I just saw Nathanyel's post.. so that should make it easier to update.
Last edited by Nephaliana : 11-01-22 at 06:19 PM.
Report comment to moderator  
Reply With Quote
Unread 10-30-22, 09:14 AM  
Nathanyel
A Deviate Faerie Dragon
 
Nathanyel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 213
Uploads: 17
Originally Posted by Daveo77
Will this addon be updated for 10.0.0 Dragonflight Pre-patch/10.0.2 Dragonflight ?
To get the addon "working" again, showing existing sorting, replace all mentions of
Code:
TokenFrameContainer
with
Code:
TokenFrame
To get the arrows working again, append this code to the main .lua file:
Code:
local CreateArrow = function( self, button, elementData )
	if not button then
		return;
	end

	button.Highlight:SetAlpha(0.5) -- lessen the highlight effect, making the buttons more visible

	if not button.sctMoveUp then
		local b = CreateFrame("Button", nil, button)
		button.sctMoveUp = b
		b:SetPoint("TOPRIGHT", -1, -0.5)
		b:SetSize(16, 8)
		b:Hide()

		local t = b:CreateTexture(nil, "BACKGROUND")
		t:SetTexture("Interface\\PaperDollInfoFrame\\StatSortArrows.blp")
		t:SetAlpha(0.6)
		t:SetTexCoord(0, 1, 0, 0.5)
		t:SetAllPoints()
		b.texture = t

		b:SetScript("OnEnter", function(self)
			self:Show()
			self.texture:SetAlpha(1)
			self:GetParent().sctMoveDown:Show()
		end)

		b:SetScript("OnLeave", function(self)
			self.texture:SetAlpha(0.6);
			if not self:GetParent():IsMouseOver() then
				self:Hide();
				self:GetParent().sctMoveDown:Hide();
			end
		end)

		b:SetScript("OnClick", function(self)
			SortedCurrencyTab_MoveUp(self:GetParent().Name:GetText())
		end)
	end

	if not button.sctMoveDown then
	local b = CreateFrame("Button", nil, button)
		button.sctMoveDown = b
		b:SetPoint("TOPLEFT", button.sctMoveUp, "BOTTOMLEFT")
		b:SetSize(16, 8)
		b:Hide()

		local t = b:CreateTexture(nil, "BACKGROUND")
		t:SetTexture("Interface\\PaperDollInfoFrame\\StatSortArrows.blp")
		t:SetAlpha(0.6)
		t:SetTexCoord(0, 1, 0.5, 1)
		t:SetAllPoints()
		b.texture = t

		b:SetScript("OnEnter", function(self)
			self:Show()
			self.texture:SetAlpha(1)
			self:GetParent().sctMoveUp:Show()
		end)

		b:SetScript("OnLeave", function(self)
			self.texture:SetAlpha(0.6);
			if not self:GetParent():IsMouseOver() then
				self:Hide();
				self:GetParent().sctMoveUp:Hide();
			end
		end)

		b:SetScript("OnClick", function(self)
			SortedCurrencyTab_MoveDown(self:GetParent().Name:GetText())
		end)
	end

	if not button.scriptsChanged then
		button.scriptsChanged = true

		button.oldOnEnter = button:GetScript("OnEnter")

		button:SetScript("OnEnter", function(self, ...)
			if self.isHeader then
				self.sctMoveUp:Show()
				self.sctMoveDown:Show()
			end
			if self.oldOnEnter then
				self.oldOnEnter(self, ...)
			end
		end)

		button.oldOnLeave = button:GetScript("OnLeave")

		button:SetScript("OnLeave", function(self, ...)
			if self.isHeader then
				self.sctMoveUp:Hide()
				self.sctMoveDown:Hide()
			end
			if self.oldOnLeave then
				self.oldOnLeave(self, ...)
			end
		end)
	end
		
	if not button.isHeader then
		button.sctMoveUp:Hide()
		button.sctMoveDown:Hide()
	end

end
hooksecurefunc( "TokenFrame_InitTokenButton", CreateArrow )
Traversing over the currency entries is more cumbersome in this Interface, so I converted the CreateArrows function to a non-loop that's called for every entry (and some element names were capitalized)
The old function should be removed, but it's also not causing any errors, so let's keep it simple for this hotfix.
Last edited by Nathanyel : 10-30-22 at 09:16 AM.
Report comment to moderator  
Reply With Quote
Unread 10-26-22, 04:43 PM  
Daveo77
Premium Member
 
Daveo77's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 141
File comments: 58
Uploads: 1
Will this addon be updated for 10.0.0 Dragonflight Pre-patch/10.0.2 Dragonflight ?
__________________
Report comment to moderator  
Reply With Quote
Unread 10-15-20, 01:16 AM  
spiralofhope
A Deviate Faerie Dragon
 
spiralofhope's Avatar

Forum posts: 13
File comments: 276
Uploads: 0
Hey thanks for the update, I appreciate it.
__________________
spiralofhope.com
Report comment to moderator  
Reply With Quote
Unread 10-06-20, 06:15 PM  
Nephaliana
A Kobold Labourer
 
Nephaliana's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 37
Uploads: 22
Re: Shadowlands support

Originally Posted by spiralofhope
Are you still actively maintaining this AddOn?

It's currently throwing errors in the beta.
I'll take a look. I honestly haven't logged into the beta yet to see what needs to change.

Edit: Apparently there was more changed with the Blizzard API than I was expecting. I believe I have all issues resolved. Version 2.2 has been uploaded for use on the beta and once the pre-expansion patch goes live in a few days.
Last edited by Nephaliana : 10-10-20 at 05:06 PM.
Report comment to moderator  
Reply With Quote
Unread 10-05-20, 11:10 AM  
spiralofhope
A Deviate Faerie Dragon
 
spiralofhope's Avatar

Forum posts: 13
File comments: 276
Uploads: 0
Shadowlands support

Are you still actively maintaining this AddOn?

It's currently throwing errors in the beta.
__________________
spiralofhope.com
Report comment to moderator  
Reply With Quote
Unread 08-12-18, 03:51 PM  
Nephaliana
A Kobold Labourer
 
Nephaliana's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 37
Uploads: 22
I'll take a look. Thanks.

Edit: I'm not seeing this error. Does it occur with only this addon loaded?

Originally Posted by Ookami.kun
Running in to the following errors post 8.0.1. The errors don't seem to affect the functionality of the addon, just that the errors pop after getting out of combat the first time after first logging in or reloading. Hoping for a fix, thanks.

Code:
Date: 2018-08-07 18:19:20
ID: 5
Error occured in: AddOn: SortedCurrencyTab
Count: 1
Message: Note: AddOn SortedCurrencyTab attempted to call a protected function (MainMenuBar:ClearAllPoints()) during combat lockdown.
Debug:
   [C]: ClearAllPoints()
   ..\FrameXML\MainMenuBar.lua:43: SetPositionForStatusBars()
   ..\FrameXML\MainMenuBar.lua:122:
      ..\FrameXML\MainMenuBar.lua:65
Locals:
None
AddOns:
Code:
Date: 2018-08-07 18:19:20
ID: 6
Error occured in: AddOn: SortedCurrencyTab
Count: 1
Message: Note: AddOn SortedCurrencyTab attempted to call a protected function (MainMenuBar:SetPoint()) during combat lockdown.
Debug:
   [C]: SetPoint()
   ..\FrameXML\UIParent.lua:2943: UIParentManageFramePositions()
   ..\FrameXML\UIParent.lua:2326:
      ..\FrameXML\UIParent.lua:2313
   [C]: SetAttribute()
   ..\FrameXML\UIParent.lua:3115:
      ..\FrameXML\UIParent.lua:3113
   [C]: UIParent_ManageFramePositions()
   ..\FrameXML\MainMenuBar.lua:60: SetPositionForStatusBars()
   ..\FrameXML\MainMenuBar.lua:122:
      ..\FrameXML\MainMenuBar.lua:65
Locals:
None
AddOns:
Last edited by Nephaliana : 08-12-18 at 05:01 PM.
Report comment to moderator  
Reply With Quote
Unread 08-07-18, 04:24 PM  
Ookami.kun
A Cliff Giant
 
Ookami.kun's Avatar

Forum posts: 79
File comments: 238
Uploads: 0
Running in to the following errors post 8.0.1. The errors don't seem to affect the functionality of the addon, just that the errors pop after getting out of combat the first time after first logging in or reloading. Hoping for a fix, thanks.

Code:
Date: 2018-08-07 18:19:20
ID: 5
Error occured in: AddOn: SortedCurrencyTab
Count: 1
Message: Note: AddOn SortedCurrencyTab attempted to call a protected function (MainMenuBar:ClearAllPoints()) during combat lockdown.
Debug:
   [C]: ClearAllPoints()
   ..\FrameXML\MainMenuBar.lua:43: SetPositionForStatusBars()
   ..\FrameXML\MainMenuBar.lua:122:
      ..\FrameXML\MainMenuBar.lua:65
Locals:
None
AddOns:
Code:
Date: 2018-08-07 18:19:20
ID: 6
Error occured in: AddOn: SortedCurrencyTab
Count: 1
Message: Note: AddOn SortedCurrencyTab attempted to call a protected function (MainMenuBar:SetPoint()) during combat lockdown.
Debug:
   [C]: SetPoint()
   ..\FrameXML\UIParent.lua:2943: UIParentManageFramePositions()
   ..\FrameXML\UIParent.lua:2326:
      ..\FrameXML\UIParent.lua:2313
   [C]: SetAttribute()
   ..\FrameXML\UIParent.lua:3115:
      ..\FrameXML\UIParent.lua:3113
   [C]: UIParent_ManageFramePositions()
   ..\FrameXML\MainMenuBar.lua:60: SetPositionForStatusBars()
   ..\FrameXML\MainMenuBar.lua:122:
      ..\FrameXML\MainMenuBar.lua:65
Locals:
None
AddOns:
__________________
Last edited by Ookami.kun : 08-07-18 at 04:25 PM.
Report comment to moderator  
Reply With Quote
Unread 07-20-16, 04:13 AM  
Daveo77
Premium Member
 
Daveo77's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 141
File comments: 58
Uploads: 1
No issues, except the marked 'out of date'.

Thank you for checking.
__________________
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 03:20 PM  
Nephaliana
A Kobold Labourer
 
Nephaliana's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 37
Uploads: 22
Originally Posted by Daveo77
Will this addon be updated for Legion pre-expansion patch & Legion (when released)
I'll take a look. I haven't touched this one yet as I've been working on some of my other ones first. I started with PFTP and PFCTC as I knew both would have serious issues due to the significant changes to the window they affect, but I'll get to this one soon.

Edit: I took a look in game, but I did not see any issues with this addon. As my general policy (with a few exceptions over the years), I don't update an addon simply to change the TOC number to make it appear "up to date." Were you having any issue with it besides it being marked out of date?
Last edited by Nephaliana : 07-19-16 at 08:14 PM.
Report comment to moderator  
Reply With Quote
Unread 07-19-16, 09:36 AM  
Daveo77
Premium Member
 
Daveo77's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 141
File comments: 58
Uploads: 1
Will this addon be updated for Legion pre-expansion patch & Legion (when released)
__________________
Report comment to moderator  
Reply With Quote
Unread 01-10-15, 01:35 PM  
boombeef
A Kobold Labourer

Forum posts: 1
File comments: 40
Uploads: 0
Love addon, Thank you so much.
Report comment to moderator  
Reply With Quote
Unread 01-03-15, 05:00 PM  
Nephaliana
A Kobold Labourer
 
Nephaliana's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 37
Uploads: 22
Originally Posted by EKE
haha sorry for my poor english, i mean let addon default settting keep WOD currency top, just because im lazy and annoying for click click click for my characters. no matter how thank you for your update and replay!
Oh, well, you should only need to "click click click" once. Your other characters should keep that same order.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: