OpenTTD Source: src/fios_gui.cpp File Reference

OpenTTD Source 12.0-beta1

Data Structures | Functions | Variables
fios_gui.cpp File Reference
`#include "stdafx.h"`
`#include "saveload/saveload.h"`
`#include "error.h"`
`#include "gui.h"`
`#include "gfx_func.h"`
`#include "command_func.h"`
`#include "network/network.h"`
`#include "network/network_content.h"`
`#include "strings_func.h"`
`#include "fileio_func.h"`
`#include "fios.h"`
`#include "window_func.h"`
`#include "tilehighlight_func.h"`
`#include "querystring_gui.h"`
`#include "engine_func.h"`
`#include "landscape_type.h"`
`#include "date_func.h"`
`#include "core/geometry_func.hpp"`
`#include "gamelog.h"`
`#include "stringfilter_type.h"`
`#include "widgets/fios_widget.h"`
`#include "table/sprites.h"`
`#include "table/strings.h"`
`#include "safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | SaveLoadWindow

## Functions
static void | SortSaveGameList (FileList &file_list)
| Sort the collected list save games prior to displaying it in the save/load gui. More...
void | ShowSaveLoadDialog (AbstractFileType abstract_filetype, SaveLoadOperation fop)
| Launch save/load dialog in the given mode. More...

## Variables
LoadCheckData | _load_check_data
| Data loaded from save during SL_LOAD_CHECK.
static bool | _fios_path_changed
static bool | _savegame_sort_dirty
static const NWidgetPart | _nested_load_dialog_widgets []
| Load game/scenario with optional content download.
static const NWidgetPart | _nested_load_heightmap_dialog_widgets []
| Load heightmap with content download.
static const NWidgetPart | _nested_save_dialog_widgets []
| Save game/scenario.
static const TextColour | _fios_colours []
| Text colours of DetailedFileType fios entries in the window. More...
static WindowDesc | _load_dialog_desc (WDP_CENTER, "load_game", 500, 294, WC_SAVELOAD, WC_NONE, 0, _nested_load_dialog_widgets, lengthof(_nested_load_dialog_widgets))
| Load game/scenario.
static WindowDesc | _load_heightmap_dialog_desc (WDP_CENTER, "load_heightmap", 257, 320, WC_SAVELOAD, WC_NONE, 0, _nested_load_heightmap_dialog_widgets, lengthof(_nested_load_heightmap_dialog_widgets))
| Load heightmap.
static WindowDesc | _save_dialog_desc (WDP_CENTER, "save_game", 500, 294, WC_SAVELOAD, WC_NONE, 0, _nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets))
| Save game/scenario.

## Detailed Description

GUIs for loading/saving games, scenarios, heightmaps, ...

Definition in file fios_gui.cpp.

## Function Documentation

## ◆ ShowSaveLoadDialog()

void ShowSaveLoadDialog | ( | AbstractFileType | abstract_filetype,
|  | SaveLoadOperation | fop
| ) |  |

Launch save/load dialog in the given mode.

Parameters

  abstract_filetype | Kind of file to handle.
  fop | File operation to perform (load or save).

Definition at line 921 of file fios_gui.cpp.

References _load_dialog_desc, _load_heightmap_dialog_desc, _save_dialog_desc, CloseWindowById(), FT_HEIGHTMAP, SLO_SAVE, and WC_SAVELOAD.

Referenced by SelectGameWindow::OnClick().

## ◆ SortSaveGameList()

static void SortSaveGameList | ( | FileList & | file_list | ) |
| static

Sort the collected list save games prior to displaying it in the save/load gui.

Parameters

  [in,out] | file_list | List of save game files found in the directory.

Definition at line 243 of file fios_gui.cpp.

## Variable Documentation

## ◆ _fios_colours

const TextColour _fios_colours[]
| static

Initial value:
= {
TC_LIGHT_BROWN,
TC_ORANGE,
TC_YELLOW,
TC_ORANGE,
TC_LIGHT_BLUE,
TC_DARK_GREEN,
TC_DARK_GREEN,
TC_ORANGE,
}

Text colours of DetailedFileType fios entries in the window.

Definition at line 227 of file fios_gui.cpp.