Game Development Community

Sort missions by name?

by CodingChris · in Torque Game Engine Advanced · 01/12/2008 (12:58 pm) · 5 replies

Hi,
my missions got the names 1, 2, 3, 4, 5, 6, 7 and so on... How can I sort the missions in the StartMissionGUI numerical?

#1
01/12/2008 (1:27 pm)
If you're usding a GuiTextListCtrl for your misson names you can sort them with the sort function.

ConsoleMethod( GuiTextListCtrl, sort, void, 3, 4, "(int columnID, bool increasing=false)" 
"Performs a standard (alphabetical) sort on the values in the specified column.")
#2
01/13/2008 (1:06 am)
Then I got:
10
11
12
13
14
15
2
3
4
5
6
7
...
Not really the right order...
#3
01/14/2008 (5:38 am)
You can name your missions like this

01
02
03
...
10
11
...
20
...

and sorting will work :)
#4
01/14/2008 (6:23 am)
Nice idea. But a lot of work for 60 mission, ahh I only have to change the first nine or not?
#5
01/14/2008 (8:18 am)
Exactly.