Data Structures | Functions | Variables

fios_gui.cpp File Reference

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

#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 "widgets/fios_widget.h"
#include "table/sprites.h"
#include "table/strings.h"

Go to the source code of this file.

Data Structures

struct  SaveLoadWindow

Functions

void BuildFileList ()
static void MakeSortedSaveGameList ()
void ShowSaveLoadDialog (SaveLoadDialogMode mode)
 Launch save/load dialog in the given 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 []
 Colours for fios types, indexed by FiosType.
static const WindowDesc _load_dialog_desc (WDP_CENTER, 500, 294, WC_SAVELOAD, WC_NONE, 0, _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, 0, _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, 0, _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.


Function Documentation

void ShowSaveLoadDialog ( SaveLoadDialogMode  mode  ) 

Variable Documentation

const FileType _file_modetotype[] [static]
Initial value:
 {
  FT_SAVEGAME,  
  FT_SCENARIO,  
  FT_SAVEGAME,  
  FT_SCENARIO,  
  FT_HEIGHTMAP, 
  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 726 of file fios_gui.cpp.

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
}

Colours for fios types, indexed by FiosType.

Definition at line 184 of file fios_gui.cpp.

Referenced by SaveLoadWindow::DrawWidget().

Initial value:
 {
  NWidget(NWID_HORIZONTAL),
    NWidget(WWT_CLOSEBOX, COLOUR_GREY),
    NWidget(WWT_CAPTION, COLOUR_GREY, WID_SL_CAPTION),
  EndContainer(),
  NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(),
  NWidget(NWID_VERTICAL),
    NWidget(NWID_HORIZONTAL),
      NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
        NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_SORT_BYNAME), SetDataTip(STR_SORT_BY_CAPTION_NAME, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0), SetResize(1, 0),
        NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_SORT_BYDATE), SetDataTip(STR_SORT_BY_CAPTION_DATE, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0), SetResize(1, 0),
      EndContainer(),
      NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_SL_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON),
    EndContainer(),
    NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_FILE_BACKGROUND),
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_INSET, COLOUR_GREY, WID_SL_DRIVES_DIRECTORIES_LIST), SetFill(1, 1), SetPadding(2, 1, 2, 2),
            SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(WID_SL_SCROLLBAR), EndContainer(),
        NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_SL_SCROLLBAR),
      EndContainer(),
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_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 114 of file fios_gui.cpp.