Jump to content
RealModScene
Sign in to follow this  
Astaroshe

Group categories together

Recommended Posts

Is it possible to have for instance: Xbox 360 games grouped together alphabetically and then also have XBLA games grouped alphabetically in the same view, instead of having them all mixed up together?

Share this post


Link to post
Share on other sites

Ok, so here's an example of how you could make it work:

GameListSorters["Name Grouped by Type"] = function(Item1, Item2, Type)
	if Item1.Type ~= Item2.Type then
		return Item1.Type > Item2.Type
	end
	if Type == SortType.Descending then
		return string.lower(Item1.Name) > string.lower(Item2.Name)
	end
	return string.lower(Item1.Name) < string.lower(Item2.Name)
end
The way this sorts them is:

XBLA -> Xbox 360 (Including homebrew, sorry didn't include logic to handle that) -> Indie Games

As i do not have any Xbox games in my library (Classic Xbox) i'm not sure where in the order they end up...

Anyways, if you decide to switch between ascending and descending it'll only shift the names in the reverse order... if you wanted it to change the ordering of both name and such at the same time, you should be able to figure out how to do that by studying my code :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...