ds_list_sort(id, ascend);

参数 描述
id The id of the list to sort.
ascend Whether the values should be ascending (true) or descending (false) order.

返回: N/A(无返回值)


With this function you can sort all the values within a list, either in ascending or descending order. If the list contains strings, these will be sorted alphabetically, based on the English 26 letter alphabet.


if newgame
   ds_list_sort(name_list, true);

The above code will sort the list indexed in the variable "name_list" if the variable "newgame" is flagged as true.

上一页: DS Lists
下一页: ds_list_copy
© Copyright YoYo Games Ltd. 2018 All Rights Reserved