# fios_gui.cpp File Reference

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

`#include "stdafx.h"`
`#include "saveload/saveload.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 "table/sprites.h"`
`#include "table/strings.h"`

Go to the source code of this file.

## Data Structures
struct | SaveLoadWindow
## Enumerations
enum | SaveLoadWindowWidgets { SLWW_WINDOWTITLE, SLWW_SORT_BYNAME, SLWW_SORT_BYDATE, SLWW_BACKGROUND, SLWW_FILE_BACKGROUND, SLWW_HOME_BUTTON, SLWW_DRIVES_DIRECTORIES_LIST, SLWW_SCROLLBAR, SLWW_CONTENT_DOWNLOAD, SLWW_SAVE_OSK_TITLE, SLWW_DELETE_SELECTION, SLWW_SAVE_GAME, SLWW_CONTENT_DOWNLOAD_SEL, SLWW_DETAILS, SLWW_NEWGRF_INFO, SLWW_LOAD_BUTTON }
## Functions
void | BuildFileList ()
static void | MakeSortedSaveGameList ()
void | ShowSaveLoadDialog (SaveLoadDialogMode mode)
void | SetFiosType (const byte fiostype)
## Variables
SaveLoadDialogMode | _saveload_mode
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.
const TextColour | _fios_colours []
static const WindowDesc | _load_dialog_desc (WDP_CENTER, 500, 294, WC_SAVELOAD, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_load_dialog_widgets, lengthof(_nested_load_dialog_widgets))
| Load game/scenario.
static const WindowDesc | _load_heightmap_dialog_desc (WDP_CENTER, 257, 320, WC_SAVELOAD, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_load_heightmap_dialog_widgets, lengthof(_nested_load_heightmap_dialog_widgets))
| Load heightmap.
static const WindowDesc | _save_dialog_desc (WDP_CENTER, 500, 294, WC_SAVELOAD, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets))
| Save game/scenario.
static const FileType | _file_modetotype []
| These values are used to convert the file/operations mode into a corresponding file type.

## Detailed Description

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

..

Definition in file fios_gui.cpp.

## Enumeration Type Documentation

enum SaveLoadWindowWidgets

Enumerator:

  SLWW_CONTENT_DOWNLOAD | only available for play scenario/heightmap (content download)
  SLWW_SAVE_OSK_TITLE | only available for save operations
  SLWW_DELETE_SELECTION | same in here
  SLWW_SAVE_GAME | not to mention in here too
  SLWW_CONTENT_DOWNLOAD_SEL | Selection 'stack' to 'hide' the content download.
  SLWW_DETAILS | Panel with game details.
  SLWW_NEWGRF_INFO | Button to open NewGgrf configuration.
  SLWW_LOAD_BUTTON | Button to load game/scenario.

Definition at line 64 of file fios_gui.cpp.

## Variable Documentation

const FileType _file_modetotype[]`[static]`

Initial value:

     {
      FT_SAVEGAME,
      FT_SCENARIO,
      FT_SAVEGAME,
      FT_SCENARIO,
      FT_HEIGHTMAP,
    }

These values are used to convert the file/operations mode into a corresponding file type.

So each entry, as expressed by the related comment, is based on the enum

Definition at line 719 of file fios_gui.cpp.

const TextColour _fios_colours[]

Initial value:

     {
      TC_LIGHT_BLUE, TC_DARK_GREEN,  TC_DARK_GREEN, TC_ORANGE, TC_LIGHT_BROWN,
      TC_ORANGE,     TC_LIGHT_BROWN, TC_ORANGE,     TC_ORANGE, TC_YELLOW
    }

Definition at line 195 of file fios_gui.cpp.

const NWidgetPart _nested_load_heightmap_dialog_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_GREY),
        NWidget(WWT_CAPTION, COLOUR_GREY, SLWW_WINDOWTITLE),
      EndContainer(),
      NWidget(WWT_PANEL, COLOUR_GREY, SLWW_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(),
      NWidget(NWID_VERTICAL),
        NWidget(NWID_HORIZONTAL),
          NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
            NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_SORT_BYNAME), SetDataTip(STR_SORT_BY_CAPTION_NAME, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0), SetResize(1, 0),
            NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_SORT_BYDATE), SetDataTip(STR_SORT_BY_CAPTION_DATE, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0), SetResize(1, 0),
          EndContainer(),
          NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, SLWW_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON),
        EndContainer(),
        NWidget(WWT_PANEL, COLOUR_GREY, SLWW_FILE_BACKGROUND),
          NWidget(NWID_HORIZONTAL),
            NWidget(WWT_INSET, COLOUR_GREY, SLWW_DRIVES_DIRECTORIES_LIST), SetFill(1, 1), SetPadding(2, 1, 2, 2),
                SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(SLWW_SCROLLBAR), EndContainer(),
            NWidget(NWID_VSCROLLBAR, COLOUR_GREY, SLWW_SCROLLBAR),
          EndContainer(),
          NWidget(NWID_HORIZONTAL),
            NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_CONTENT_DOWNLOAD), SetResize(1, 0),
                SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
            NWidget(WWT_RESIZEBOX, COLOUR_GREY),
          EndContainer(),
        EndContainer(),
      EndContainer(),
    }

Load heightmap with content download.

Definition at line 125 of file fios_gui.cpp.