# misc_gui.cpp File Reference

GUIs for a number of misc windows. More...

`#include "stdafx.h"`
`#include "openttd.h"`
`#include "landscape.h"`
`#include "newgrf_text.h"`
`#include "saveload/saveload.h"`
`#include "gui.h"`
`#include "viewport_func.h"`
`#include "gfx_func.h"`
`#include "command_func.h"`
`#include "company_func.h"`
`#include "town.h"`
`#include "network/network.h"`
`#include "network/network_content.h"`
`#include "company_base.h"`
`#include "texteff.hpp"`
`#include "cargotype.h"`
`#include "company_manager_face.h"`
`#include "strings_func.h"`
`#include "fileio_func.h"`
`#include "fios.h"`
`#include "zoom_func.h"`
`#include "window_func.h"`
`#include "tilehighlight_func.h"`
`#include "querystring_gui.h"`
`#include "core/geometry_func.hpp"`
`#include "table/strings.h"`

Go to the source code of this file.

## Data Structures
class | LandInfoWindow
struct | AboutWindow
struct | ErrmsgWindow
| Window class for displaying an error message window. More...
struct | TooltipsWindow
| Window for displaying a tooltip. More...
struct | QueryStringWindow
| Class for the string query window. More...
struct | QueryWindow
| Window used for asking the user a YES/NO question. More...
struct | SaveLoadWindow
## Defines
#define | LANDINFOD_LEVEL 1
## Enumerations
enum | LandInfoWidgets { LIW_BACKGROUND }
| Widgets for the land info window. More...
enum | AboutWidgets { AW_SCROLLING_TEXT, AW_WEBSITE }
| Widgets for the land info window. More...
enum | ErrorMessageWidgets { EMW_CAPTION, EMW_FACE, EMW_MESSAGE }
| Widgets of the error message windows.
enum | QueryStringWidgets { QUERY_STR_WIDGET_CAPTION, QUERY_STR_WIDGET_TEXT, QUERY_STR_WIDGET_DEFAULT, QUERY_STR_WIDGET_CANCEL, QUERY_STR_WIDGET_OK }
| Widget of the string query window. More...
enum | QueryWidgets { QUERY_WIDGET_CAPTION, QUERY_WIDGET_TEXT, QUERY_WIDGET_NO, QUERY_WIDGET_YES }
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 }
## Functions
bool | GetClipboardContents (char *buffer, size_t buff_len)
| Try to retrive the current clipboard contents.
static void | Place_LandInfo (TileIndex tile)
void | PlaceLandBlockInfo ()
void | ShowAboutWindow ()
void | ShowErrorMessage (StringID summary_msg, StringID detailed_msg, int x, int y, bool no_timeout)
| Display an error message in a window.
void | ShowEstimatedCostOrIncome (Money cost, int x, int y)
void | ShowCostOrIncomeAnimation (int x, int y, int z, Money cost)
void | ShowFeederIncomeAnimation (int x, int y, int z, Money cost)
TextEffectID | ShowFillingPercent (int x, int y, int z, uint8 percent, StringID string)
void | UpdateFillingPercent (TextEffectID te_id, uint8 percent, StringID string)
void | HideFillingPercent (TextEffectID *te_id)
void | GuiShowTooltips (StringID str, uint paramcount, const uint64 params[], bool use_left_mouse_button)
| Shows a tooltip.
static void | DelChar (Textbuf *tb, bool backspace)
bool | DeleteTextBufferChar (Textbuf *tb, int delmode)
| Delete a character from a textbuffer, either with 'Delete' or 'Backspace' The character is delete from the position the caret is at.
void | DeleteTextBufferAll (Textbuf *tb)
| Delete every character in the textbuffer.
bool | InsertTextBufferChar (Textbuf *tb, WChar key)
| Insert a character to a textbuffer.
bool | InsertTextBufferClipboard (Textbuf *tb)
| Insert a chunk of text from the clipboard onto the textbuffer.
bool | MoveTextBufferPos (Textbuf *tb, int navmode)
| Handle text navigation with arrow keys left/right.
void | InitializeTextBuffer (Textbuf *tb, char *buf, uint16 maxsize, uint16 maxwidth)
| Initialize the textbuffer by supplying it the buffer to write into and the maximum length of this buffer.
void | UpdateTextBufferSize (Textbuf *tb)
| Update Textbuf type with its actual physical character and screenlength Get the count of characters in the string as well as the width in pixels.
bool | HandleCaret (Textbuf *tb)
void | ShowQueryString (StringID str, StringID caption, uint maxsize, uint maxwidth, Window *parent, CharSetFilter afilter, QueryStringFlags flags)
| Show a query popup window with a textbox in it.
void | ShowQuery (StringID caption, StringID message, Window *parent, QueryCallbackProc *callback)
| Show a modal confirmation window with standard 'yes' and 'no' buttons The window is aligned to the centre of its parent.
void | BuildFileList ()
static void | MakeSortedSaveGameList ()
void | StartupEngines ()
void | ShowSaveLoadDialog (SaveLoadDialogMode mode)
void | RedrawAutosave ()
void | SetFiosType (const byte fiostype)
## Variables
SaveLoadDialogMode | _saveload_mode
| defined in misc_gui.cpp
static bool | _fios_path_changed
static bool | _savegame_sort_dirty
int | _caret_timer
static const NWidgetPart | _nested_land_info_widgets []
static const WindowDesc | _land_info_desc (WDP_AUTO, 0, 0, WC_LAND_INFO, WC_NONE, 0, _nested_land_info_widgets, lengthof(_nested_land_info_widgets))
static const NWidgetPart | _nested_about_widgets []
static const WindowDesc | _about_desc (WDP_CENTER, 0, 0, WC_GAME_OPTIONS, WC_NONE, 0, _nested_about_widgets, lengthof(_nested_about_widgets))
static const char *const | _credits []
static const NWidgetPart | _nested_errmsg_widgets []
static const WindowDesc | _errmsg_desc (WDP_MANUAL, 0, 0, WC_ERRMSG, WC_NONE, 0, _nested_errmsg_widgets, lengthof(_nested_errmsg_widgets))
static const NWidgetPart | _nested_errmsg_face_widgets []
static const WindowDesc | _errmsg_face_desc (WDP_MANUAL, 0, 0, WC_ERRMSG, WC_NONE, 0, _nested_errmsg_face_widgets, lengthof(_nested_errmsg_face_widgets))
static const NWidgetPart | _nested_tooltips_widgets []
static const WindowDesc | _tool_tips_desc (WDP_MANUAL, 0, 0, WC_TOOLTIPS, WC_NONE, 0, _nested_tooltips_widgets, lengthof(_nested_tooltips_widgets))
static const NWidgetPart | _nested_query_string_widgets []
static const WindowDesc | _query_string_desc (WDP_AUTO, 0, 0, WC_QUERY_STRING, WC_NONE, 0, _nested_query_string_widgets, lengthof(_nested_query_string_widgets))
static const NWidgetPart | _nested_query_widgets []
static const WindowDesc | _query_desc (WDP_CENTER, 0, 0, WC_CONFIRM_POPUP_QUERY, WC_NONE, WDF_UNCLICK_BUTTONS|WDF_MODAL, _nested_query_widgets, lengthof(_nested_query_widgets))
static const NWidgetPart | _nested_load_dialog_widgets []
static const NWidgetPart | _nested_save_dialog_widgets []
const TextColour | _fios_colours []
static const WindowDesc | _load_dialog_desc (WDP_CENTER, 257, 294, WC_SAVELOAD, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_load_dialog_widgets, lengthof(_nested_load_dialog_widgets))
static const WindowDesc | _save_dialog_desc (WDP_CENTER, 257, 320, WC_SAVELOAD, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets))
static const FileType | _file_modetotype []
| These values are used to convert the file/operations mode into a corresponding file type.

## Detailed Description

GUIs for a number of misc windows.

Definition in file misc_gui.cpp.

## Enumeration Type Documentation

enum AboutWidgets

Widgets for the land info window.

Enumerator:

  AW_SCROLLING_TEXT | The actually scrolling text.
  AW_WEBSITE | URL of OpenTTD website.

Definition at line 320 of file misc_gui.cpp.

enum LandInfoWidgets

Widgets for the land info window.

Enumerator:

  LIW_BACKGROUND | Background to draw on.

Definition at line 59 of file misc_gui.cpp.

enum QueryStringWidgets

Widget of the string query window.

Definition at line 1218 of file misc_gui.cpp.

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.

Definition at line 1527 of file misc_gui.cpp.

## Function Documentation

void DeleteTextBufferAll | ( | Textbuf * | tb | ) |

Delete every character in the textbuffer.

Parameters:

  | tb | Textbuf buffer to be emptied

Definition at line 915 of file misc_gui.cpp.

bool DeleteTextBufferChar | ( | Textbuf * | tb,
|  | int | delmode |
| ) |  |  |

Delete a character from a textbuffer, either with 'Delete' or 'Backspace' The character is delete from the position the caret is at.

Parameters:

  | tb | Textbuf type to be changed
  | delmode | Type of deletion, either WKC_BACKSPACE or WKC_DELETE

Returns:
  Return true on successful change of Textbuf, or false otherwise

Definition at line 898 of file misc_gui.cpp.

bool GetClipboardContents | ( | char * | buffer,
|  | size_t | buff_len |
| ) |  |  |

Try to retrive the current clipboard contents.

Note:
  OS-specific funtion.

Returns:
  True if some text could be retrived.

Definition at line 179 of file os2.cpp.

References convert_from_fs(), FS2OTTD(), and ttd_strlcpy().

Referenced by InsertTextBufferClipboard().

void GuiShowTooltips | ( | StringID | str,
|  | uint | paramcount,
|  | const uint64 | params[],
|  | bool | use_left_mouse_button |
| ) |  |  |

Shows a tooltip.

Parameters:

  | str | String to be displayed
  | paramcount | number of params to deal with
  | params | (optional) up to 5 pieces of additional information that may be added to a tooltip
  | use_left_mouse_button | close the tooltip when the left (true) or right (false) mousebutton is released

Definition at line 858 of file misc_gui.cpp.

References DeleteWindowById().

Referenced by DispatchRightClickEvent(), and ShowMeasurementTooltips().

void InitializeTextBuffer | ( | Textbuf * | tb,
|  | char * | buf,
|  | uint16 | maxsize,
|  | uint16 | maxwidth |
| ) |  |  |

Initialize the textbuffer by supplying it the buffer to write into and the maximum length of this buffer.

Parameters:

  | tb | Textbuf type which is getting initialized
  | buf | the buffer that will be holding the data for input
  | maxsize | maximum size in bytes, including terminating ''
  | maxwidth | maximum length in pixels of this buffer. If reached, buffer cannot grow, even if maxsize would allow because there is space. Width of zero '0' means the buffer is only restricted by maxsize

Definition at line 1049 of file misc_gui.cpp.

References UpdateTextBufferSize().

bool InsertTextBufferChar | ( | Textbuf * | tb,
|  | WChar | key |
| ) |  |  |

Insert a character to a textbuffer.

If maxwidth of the Textbuf is zero, we don't care about the visual-length but only about the physical length of the string

Parameters:

  | tb | Textbuf type to be changed
  | key | Character to be inserted

Returns:
  Return true on successful change of Textbuf, or false otherwise

Definition at line 930 of file misc_gui.cpp.

References FS_NORMAL, GetCharacterWidth(), and Utf8CharLen().

bool InsertTextBufferClipboard | ( | Textbuf * | tb | ) |

Insert a chunk of text from the clipboard onto the textbuffer.

Get TEXT clipboard and append this up to the maximum length (either absolute or screenlength). If maxlength is zero, we don't care about the screenlength but only about the physical length of the string

Parameters:

  | tb | Textbuf type to be changed

Returns:
  true on successful change of Textbuf, or false otherwise

Definition at line 954 of file misc_gui.cpp.

References FS_NORMAL, GetCharacterWidth(), GetClipboardContents(), lengthof, and Utf8CharLen().

bool MoveTextBufferPos | ( | Textbuf * | tb,
|  | int | navmode |
| ) |  |  |

Handle text navigation with arrow keys left/right.

This defines where the caret will blink and the next characer interaction will occur

Parameters:

  | tb | Textbuf type where navigation occurs
  | navmode | Direction in which navigation occurs WKC_LEFT, WKC_RIGHT, WKC_END, WKC_HOME

Returns:
  Return true on successful change of Textbuf, or false otherwise

Definition at line 997 of file misc_gui.cpp.

References FS_NORMAL, GetCharacterWidth(), and Utf8PrevChar().

void ShowErrorMessage | ( | StringID | summary_msg,
|  | StringID | detailed_msg,
|  | int | x,
|  | int | y,
|  | bool | no_timeout |
| ) |  |  |

Display an error message in a window.

Parameters:

  | summary_msg | General error message showed in first line. Must be valid.
  | detailed_msg | Detailed error message showed in second line. Can be INVALID_STRING_ID.
  | x | World X position (TileVirtX) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
  | y | World Y position (TileVirtY) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
  | no_timeout | Set to true, if the message is that important that it should not close automatically after some time.

Definition at line 688 of file misc_gui.cpp.

References _settings_client, DeleteWindowById(), GUISettings::errmsg_duration, GetDParam(), ClientSettings::gui, and MAX_COMPANIES.

Referenced by ChangeDynamicEngines(), CheckForMissingGlyphsInLoadedLanguagePack(), CheckTrainsLengths(), DoAutosave(), DoCommandP(), ExpandTown(), IndustryProductionCallback(), MakeScreenshot(), FoundTownWindow::OnClick(), NewGRFWindow::OnClick(), NewGRFAddWindow::OnClick(), BuildIndustryWindow::OnClick(), SelectCompanyManagerFaceWindow::OnClick(), AIConfigWindow::OnClick(), AISettingsWindow::OnClick(), BuildIndustryWindow::OnPlaceObject(), SelectCompanyManagerFaceWindow::OnQueryTextFinished(), ReadHeightmapBMP(), SaveFileError(), SaveOrLoad(), ShowBuildBridgeWindow(), ShowNewGRFError(), ShowNewGrfVehicleError(), StartScenario(), and WarnCorruptSprite().

void ShowQuery | ( | StringID | caption,
|  | StringID | message,
|  | Window * | parent,
|  | QueryCallbackProc * | callback |
| ) |  |  |

Show a modal confirmation window with standard 'yes' and 'no' buttons The window is aligned to the centre of its parent.

Parameters:

  | caption | string shown as window caption
  | message | string that will be shown for the window
  | parent | pointer to parent window, if this pointer is NULL the parent becomes the main window WC_MAIN_WINDOW
  | callback | callback function pointer to set in the window descriptor

Definition at line 1521 of file misc_gui.cpp.

Referenced by CmdPause(), and NewGRFWindow::OnClick().

void ShowQueryString | ( | StringID | str,
|  | StringID | caption,
|  | uint | maxsize,
|  | uint | maxwidth,
|  | Window * | parent,
|  | CharSetFilter | afilter,
|  | QueryStringFlags | flags |
| ) |  |  |

Show a query popup window with a textbox in it.

Parameters:

  | str | StringID for the text shown in the textbox
  | caption | StringID of text shown in caption of querywindow
  | maxsize | maximum size in bytes (including terminating '')
  | maxwidth | maximum width in pixels allowed
  | parent | pointer to a Window that will handle the events (ok/cancel) of this window. If NULL, results are handled by global function HandleOnEditText
  | afilter | filters out unwanted character input
  | flags | various flags,

See also:
  QueryStringFlags

Definition at line 1370 of file misc_gui.cpp.

References DeleteWindowById().

Referenced by VehicleDetailsWindow::OnClick(), StationViewWindow::OnClick(), OrdersWindow::OnClick(), NewGRFWindow::OnClick(), CompanyWindow::OnClick(), SelectCompanyManagerFaceWindow::OnClick(), and AISettingsWindow::OnClick().

void UpdateTextBufferSize | ( | Textbuf * | tb | ) |

Update Textbuf type with its actual physical character and screenlength Get the count of characters in the string as well as the width in pixels.

Useful when copying in a larger amount of text at once

Parameters:

  | tb | Textbuf type which length is calculated

Definition at line 1066 of file misc_gui.cpp.

References FS_NORMAL, GetCharacterWidth(), and Utf8CharLen().

Referenced by IConsoleHistoryNavigate(), and InitializeTextBuffer().

## Variable Documentation

const FileType _file_modetotype[]`[static]`

Initial value:

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

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 1959 of file misc_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 1602 of file misc_gui.cpp.

const NWidgetPart _nested_about_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_GREY),
        NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_ABOUT_OPENTTD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
      EndContainer(),
      NWidget(WWT_PANEL, COLOUR_GREY), SetPIP(4, 2, 4),
        NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_ABOUT_ORIGINAL_COPYRIGHT, STR_NULL),
        NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_ABOUT_VERSION, STR_NULL),
        NWidget(WWT_FRAME, COLOUR_GREY), SetPadding(0, 5, 1, 5),
          NWidget(WWT_EMPTY, INVALID_COLOUR, AW_SCROLLING_TEXT),
        EndContainer(),
        NWidget(WWT_LABEL, COLOUR_GREY, AW_WEBSITE), SetDataTip(STR_BLACK_RAW_STRING, STR_NULL),
        NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_ABOUT_COPYRIGHT_OPENTTD, STR_NULL),
      EndContainer(),
    }

Definition at line 325 of file misc_gui.cpp.

const NWidgetPart _nested_errmsg_face_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_RED),
        NWidget(WWT_CAPTION, COLOUR_RED, EMW_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY, STR_NULL),
      EndContainer(),
      NWidget(WWT_PANEL, COLOUR_RED),
        NWidget(NWID_HORIZONTAL), SetPIP(2, 1, 2),
          NWidget(WWT_EMPTY, COLOUR_RED, EMW_FACE), SetMinimalSize(92, 119), SetFill(0, 1), SetPadding(2, 0, 1, 0),
          NWidget(WWT_EMPTY, COLOUR_RED, EMW_MESSAGE), SetFill(0, 1), SetMinimalSize(238, 123),
        EndContainer(),
      EndContainer(),
    }

Definition at line 504 of file misc_gui.cpp.

const NWidgetPart _nested_errmsg_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_RED),
        NWidget(WWT_CAPTION, COLOUR_RED, EMW_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION, STR_NULL),
      EndContainer(),
      NWidget(WWT_PANEL, COLOUR_RED),
        NWidget(WWT_EMPTY, COLOUR_RED, EMW_MESSAGE), SetPadding(0, 2, 0, 2), SetMinimalSize(236, 32),
      EndContainer(),
    }

Definition at line 487 of file misc_gui.cpp.

const NWidgetPart _nested_land_info_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_GREY),
        NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_LAND_AREA_INFORMATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
      EndContainer(),
      NWidget(WWT_PANEL, COLOUR_GREY, LIW_BACKGROUND), EndContainer(),
    }

Definition at line 63 of file misc_gui.cpp.

const NWidgetPart _nested_load_dialog_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_GREY),
        NWidget(WWT_CAPTION, COLOUR_GREY, SLWW_WINDOWTITLE),
      EndContainer(),
      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_PANEL, COLOUR_GREY, SLWW_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(),
      NWidget(WWT_PANEL, COLOUR_GREY, SLWW_FILE_BACKGROUND),
        NWidget(NWID_HORIZONTAL),
          NWidget(NWID_VERTICAL),
            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), EndContainer(),
            NWidget(NWID_SELECTION, INVALID_COLOUR, SLWW_CONTENT_DOWNLOAD_SEL),
              NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_CONTENT_DOWNLOAD), SetResize(1, 0),
                        SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
            EndContainer(),
          EndContainer(),
          NWidget(NWID_VERTICAL),
            NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, SLWW_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON),
            NWidget(WWT_SCROLLBAR, COLOUR_GREY, SLWW_SCROLLBAR),
            NWidget(WWT_RESIZEBOX, COLOUR_GREY),
          EndContainer(),
        EndContainer(),
      EndContainer(),
    }

Definition at line 1543 of file misc_gui.cpp.

const NWidgetPart _nested_query_string_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_GREY),
        NWidget(WWT_CAPTION, COLOUR_GREY, QUERY_STR_WIDGET_CAPTION), SetDataTip(STR_WHITE_STRING, STR_NULL),
      EndContainer(),
      NWidget(WWT_PANEL, COLOUR_GREY),
        NWidget(WWT_EDITBOX, COLOUR_GREY, QUERY_STR_WIDGET_TEXT), SetMinimalSize(256, 12), SetFill(1, 1), SetPadding(2, 2, 2, 2),
      EndContainer(),
      NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
        NWidget(WWT_TEXTBTN, COLOUR_GREY, QUERY_STR_WIDGET_DEFAULT), SetMinimalSize(87, 12), SetFill(1, 1), SetDataTip(STR_BUTTON_DEFAULT, STR_NULL),
        NWidget(WWT_TEXTBTN, COLOUR_GREY, QUERY_STR_WIDGET_CANCEL), SetMinimalSize(86, 12), SetFill(1, 1), SetDataTip(STR_BUTTON_CANCEL, STR_NULL),
        NWidget(WWT_TEXTBTN, COLOUR_GREY, QUERY_STR_WIDGET_OK), SetMinimalSize(87, 12), SetFill(1, 1), SetDataTip(STR_BUTTON_OK, STR_NULL),
      EndContainer(),
    }

Definition at line 1338 of file misc_gui.cpp.

const NWidgetPart _nested_query_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_RED),
        NWidget(WWT_CAPTION, COLOUR_RED, QUERY_WIDGET_CAPTION), SetDataTip(STR_JUST_STRING, STR_NULL),
      EndContainer(),
      NWidget(WWT_PANEL, COLOUR_RED), SetPIP(8, 15, 8),
        NWidget(WWT_TEXT, COLOUR_RED, QUERY_WIDGET_TEXT), SetMinimalSize(200, 12),
        NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(20, 29, 20),
          NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, QUERY_WIDGET_NO), SetMinimalSize(71, 12), SetDataTip(STR_QUIT_NO, STR_NULL),
          NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, QUERY_WIDGET_YES), SetMinimalSize(71, 12), SetDataTip(STR_QUIT_YES, STR_NULL),
        EndContainer(),
      EndContainer(),
    }

Definition at line 1492 of file misc_gui.cpp.

const NWidgetPart _nested_save_dialog_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_CLOSEBOX, COLOUR_GREY),
        NWidget(WWT_CAPTION, COLOUR_GREY, SLWW_WINDOWTITLE),
      EndContainer(),
      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_PANEL, COLOUR_GREY, SLWW_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(),
      NWidget(WWT_PANEL, COLOUR_GREY, SLWW_FILE_BACKGROUND),
        NWidget(NWID_HORIZONTAL),
          NWidget(WWT_INSET, COLOUR_GREY, SLWW_DRIVES_DIRECTORIES_LIST), SetPadding(2, 1, 0, 2),
                        SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), EndContainer(),
          NWidget(NWID_VERTICAL),
            NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, SLWW_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON),
            NWidget(WWT_SCROLLBAR, COLOUR_GREY, SLWW_SCROLLBAR),
          EndContainer(),
        EndContainer(),
        NWidget(WWT_EDITBOX, COLOUR_GREY, SLWW_SAVE_OSK_TITLE), SetPadding(3, 2, 2, 2), SetFill(1, 0), SetResize(1, 0),
                        SetDataTip(STR_SAVELOAD_OSKTITLE, STR_SAVELOAD_EDITBOX_TOOLTIP),
      EndContainer(),
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_DELETE_SELECTION), SetDataTip(STR_SAVELOAD_DELETE_BUTTON, STR_SAVELOAD_DELETE_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
        NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_SAVE_GAME),        SetDataTip(STR_SAVELOAD_SAVE_BUTTON, STR_SAVELOAD_SAVE_TOOLTIP),     SetFill(1, 0), SetResize(1, 0),
        NWidget(WWT_RESIZEBOX, COLOUR_GREY),
      EndContainer(),
    }

Definition at line 1572 of file misc_gui.cpp.

const NWidgetPart _nested_tooltips_widgets[]`[static]`

Initial value:

     {
      NWidget(WWT_PANEL, COLOUR_GREY, 0), SetMinimalSize(200, 32), EndContainer(),
    }

Definition at line 760 of file misc_gui.cpp.