* Sorts the saves by date. * @param action Pointer to an action. */
| 341 | * @param action Pointer to an action. |
| 342 | */ |
| 343 | void ListGamesState::sortDateClick(Action *) |
| 344 | { |
| 345 | if (_sortable) |
| 346 | { |
| 347 | if (Options::saveOrder == SORT_DATE_ASC) |
| 348 | { |
| 349 | Options::saveOrder = SORT_DATE_DESC; |
| 350 | } |
| 351 | else |
| 352 | { |
| 353 | Options::saveOrder = SORT_DATE_ASC; |
| 354 | } |
| 355 | updateArrows(); |
| 356 | _lstSaves->clearList(); |
| 357 | sortList(Options::saveOrder); |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | void ListGamesState::disableSort() |
| 362 | { |