* Sorts the saves by name. * @param action Pointer to an action. */
| 319 | * @param action Pointer to an action. |
| 320 | */ |
| 321 | void ListGamesState::sortNameClick(Action *) |
| 322 | { |
| 323 | if (_sortable) |
| 324 | { |
| 325 | if (Options::saveOrder == SORT_NAME_ASC) |
| 326 | { |
| 327 | Options::saveOrder = SORT_NAME_DESC; |
| 328 | } |
| 329 | else |
| 330 | { |
| 331 | Options::saveOrder = SORT_NAME_ASC; |
| 332 | } |
| 333 | updateArrows(); |
| 334 | _lstSaves->clearList(); |
| 335 | sortList(Options::saveOrder); |
| 336 | } |
| 337 | } |
| 338 | |
| 339 | /** |
| 340 | * Sorts the saves by date. |