FWGS / mainui_cpp

Main menu UI toolkit for Xash3D FWGS engine
31 stars 36 forks source link

Add sorting to custom game menu #104

Closed lorsanta closed 3 months ago

lorsanta commented 3 months ago

Fix FWGS/xash3d-fwgs#1641.

I added this line here https://github.com/lorsanta/mainui_cpp/blob/1ad9fb91257c0283cfb439dc80b0f4ebaca46046/controls/Table.cpp#L336, because without it if you click to sort the mods, for example by name in discending order, you may have 'Activate' grayed out because UpdateExtras() wasn't called

I didn't add sorting by size and by version. To sort by size I guess I would need to write the opposite of Q_pretifymem(), let me know if it something that could be useful.

a1batross commented 3 months ago

Looks good to me!

Yeah, unfortunately, struct GAMEINFO doesn't pass raw data to menu. I think sorting for type and name is enough for now.

Kerr-Avon-2015 commented 3 months ago

This is brilliant, thank you so much! And don't worry about size or version; sorting by name is exactly what I was looking for.

Thanks again, mate,.