#include "stdafx.h"
#include "openttd.h"
#include "heightmap.h"
#include "debug.h"
#include "landscape.h"
#include "newgrf.h"
#include "newgrf_text.h"
#include "saveload.h"
#include "tile_map.h"
#include "gui.h"
#include "window_gui.h"
#include "station_gui.h"
#include "textbuf_gui.h"
#include "viewport_func.h"
#include "gfx_func.h"
#include "station.h"
#include "command_func.h"
#include "player_func.h"
#include "player_base.h"
#include "town.h"
#include "network/network.h"
#include "variables.h"
#include "train.h"
#include "tgp.h"
#include "cargotype.h"
#include "player_face.h"
#include "strings_func.h"
#include "fileio.h"
#include "fios.h"
#include "tile_cmd.h"
#include "zoom_func.h"
#include "functions.h"
#include "window_func.h"
#include "date_func.h"
#include "sound_func.h"
#include "string_func.h"
#include "player_gui.h"
#include "settings_type.h"
#include "table/sprites.h"
#include "table/strings.h"
#include "table/tree_land.h"
Go to the source code of this file.
Data Structures | |
struct | query_d |
struct | CheatEntry |
Defines | |
#define | LANDINFOD_LEVEL 1 |
Typedefs | |
typedef int32 | CheckButtonClick (int32, int32) |
Enumerations | |
enum | { LAND_INFO_LINES = 7, LAND_INFO_LINE_BUFF_SIZE = 512 } |
enum | QueryStringWidgets { QUERY_STR_WIDGET_TEXT = 3, QUERY_STR_WIDGET_CANCEL, QUERY_STR_WIDGET_OK } |
enum | QueryWidgets { QUERY_WIDGET_CAPTION = 1, QUERY_WIDGET_NO = 3, QUERY_WIDGET_YES } |
Functions | |
static void | LandInfoWndProc (Window *w, WindowEvent *e) |
static void | Place_LandInfo (TileIndex tile) |
void | PlaceLandBlockInfo () |
static void | AboutWindowProc (Window *w, WindowEvent *e) |
void | ShowAboutWindow () |
static void | BuildTreesWndProc (Window *w, WindowEvent *e) |
void | ShowBuildTreesToolbar () |
void | ShowBuildTreesScenToolbar () |
static void | ErrmsgWndProc (Window *w, WindowEvent *e) |
void | ShowErrorMessage (StringID msg_1, StringID msg_2, int x, int y) |
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) |
static void | TooltipsWndProc (Window *w, WindowEvent *e) |
void | GuiShowTooltipsWithArgs (StringID str, uint paramcount, const uint64 params[]) |
Shows a tooltip. | |
static int | DrawStationCoverageText (const AcceptedCargo accepts, int str_x, int str_y, StationCoverageType sct) |
int | DrawStationCoverageAreaText (int sx, int sy, StationCoverageType sct, int rad) |
void | CheckRedrawStationCoverage (const Window *w) |
void | SetVScrollCount (Window *w, int num) |
void | SetVScroll2Count (Window *w, int num) |
void | SetHScrollCount (Window *w, int num) |
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 | MoveTextBufferPos (Textbuf *tb, int navmode) |
Handle text navigation with arrow keys left/right. | |
void | InitializeTextBuffer (Textbuf *tb, const char *buf, uint16 maxlength, 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. | |
int | HandleEditBoxKey (Window *w, querystr_d *string, int wid, WindowEvent *e) |
bool | HandleCaret (Textbuf *tb) |
void | HandleEditBox (Window *w, querystr_d *string, int wid) |
void | DrawEditBox (Window *w, querystr_d *string, int wid) |
static void | QueryStringWndProc (Window *w, WindowEvent *e) |
void | ShowQueryString (StringID str, StringID caption, uint maxlen, uint maxwidth, Window *parent, CharSetFilter afilter) |
Show a query popup window with a textbox in it. | |
assert_compile (WINDOW_CUSTOM_SIZE >=sizeof(query_d)) | |
static void | QueryWndProc (Window *w, WindowEvent *e) |
void | ShowQuery (StringID caption, StringID message, Window *parent, void(*callback)(Window *, bool)) |
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 | DrawFiosTexts (uint maxw) |
static void | MakeSortedSaveGameList () |
static void | GenerateFileName () |
void | StartupEngines () |
static void | SaveLoadDlgWndProc (Window *w, WindowEvent *e) |
void | ShowSaveLoadDialog (SaveLoadDialogMode mode) |
void | RedrawAutosave () |
void | SetFiosType (const byte fiostype) |
static int32 | ClickMoneyCheat (int32 p1, int32 p2) |
static int32 | ClickChangePlayerCheat (int32 p1, int32 p2) |
static int32 | ClickChangeClimateCheat (int32 p1, int32 p2) |
void | EnginesMonthlyLoop () |
static int32 | ClickChangeDateCheat (int32 p1, int32 p2) |
static void | CheatsWndProc (Window *w, WindowEvent *e) |
void | ShowCheatWindow () |
Variables | |
FiosItem * | _fios_list |
defined in misc_gui.cpp | |
SaveLoadDialogMode | _saveload_mode |
defined in misc_gui.cpp | |
static bool | _fios_path_changed |
static bool | _savegame_sort_dirty |
static char | _landinfo_data [LAND_INFO_LINES][LAND_INFO_LINE_BUFF_SIZE] |
static const Widget | _land_info_widgets [] |
static const WindowDesc | _land_info_desc |
static const char * | credits [] |
static const Widget | _about_widgets [] |
static const WindowDesc | _about_desc |
static int | _tree_to_plant |
static const PalSpriteID | _tree_sprites [] |
static const Widget | _build_trees_widgets [] |
static const WindowDesc | _build_trees_desc |
static const Widget | _build_trees_scen_widgets [] |
static const WindowDesc | _build_trees_scen_desc |
static uint64 | _errmsg_decode_params [20] |
static StringID | _errmsg_message_1 |
static StringID | _errmsg_message_2 |
static uint | _errmsg_duration |
static const Widget | _errmsg_widgets [] |
static const Widget | _errmsg_face_widgets [] |
static const Widget | _tooltips_widgets [] |
static const Widget | _query_string_widgets [] |
static const WindowDesc | _query_string_desc |
static char | _edit_str_buf [64] |
static const Widget | _query_widgets [] |
static const WindowDesc | _query_desc |
static const Widget | _load_dialog_widgets [] |
static const Widget | _save_dialog_widgets [] |
const TextColour | _fios_colors [] |
static const WindowDesc | _load_dialog_desc |
static const WindowDesc | _save_dialog_desc |
static const FileType | _file_modetotype [] |
These values are used to convert the file/operations mode into a corresponding file type. | |
static int32 | _money_cheat_amount = 10000000 |
The 'amount' to cheat with. | |
static const CheatEntry | _cheats_ui [] |
static const Widget | _cheat_widgets [] |
static const WindowDesc | _cheats_desc |
Definition in file misc_gui.cpp.
static int32 ClickChangeClimateCheat | ( | int32 | p1, | |
int32 | p2 | |||
) | [static] |
p1 | -1 or +1 (down/up) | |
p2 | unused |
Definition at line 1810 of file misc_gui.cpp.
References ReloadNewGRFData().
static int32 ClickChangeDateCheat | ( | int32 | p1, | |
int32 | p2 | |||
) | [static] |
p1 | unused | |
p2 | 1 (increase) or -1 (decrease) |
Definition at line 1825 of file misc_gui.cpp.
References ConvertDateToYMD(), ConvertYMDToDate(), and SetWindowDirty().
static int32 ClickChangePlayerCheat | ( | int32 | p1, | |
int32 | p2 | |||
) | [static] |
p1 | player to set to | |
p2 | is -1 or +1 (down/up) |
Definition at line 1791 of file misc_gui.cpp.
References MarkWholeScreenDirty(), and SetLocalPlayer().
void DeleteTextBufferAll | ( | Textbuf * | tb | ) |
Delete every character in the textbuffer.
tb | Textbuf buffer to be emptied |
Definition at line 913 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.
tb | Textbuf type to be changed | |
delmode | Type of deletion, either WKC_BACKSPACE or WKC_DELETE |
Definition at line 896 of file misc_gui.cpp.
void GuiShowTooltipsWithArgs | ( | StringID | str, | |
uint | paramcount, | |||
const uint64 | params[] | |||
) |
Shows a tooltip.
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; currently only supports parameters of {NUM} (integer) |
Definition at line 735 of file misc_gui.cpp.
References AllocateWindow(), Clamp(), and GetStringBoundingBox().
Referenced by CalcRaildirsDrawstyle(), VpSelectTilesWithMethod(), and VpSetPresizeRange().
void InitializeTextBuffer | ( | Textbuf * | tb, | |
const char * | buf, | |||
uint16 | maxlength, | |||
uint16 | maxwidth | |||
) |
Initialize the textbuffer by supplying it the buffer to write into and the maximum length of this buffer.
tb | Textbuf type which is getting initialized | |
buf | the buffer that will be holding the data for input | |
maxlength | maximum length in characters of this buffer | |
maxwidth | maximum length in pixels of this buffer. If reached, buffer cannot grow, even if maxlength would allow because there is space. A length of zero '0' means the buffer is only restricted by maxlength |
Definition at line 998 of file misc_gui.cpp.
References UpdateTextBufferSize().
Referenced by ShowQueryString().
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
tb | Textbuf type to be changed | |
key | Character to be inserted |
Definition at line 928 of file misc_gui.cpp.
References 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
tb | Textbuf type where navigation occurs | |
navmode | Direction in which navigation occurs WKC_LEFT, WKC_RIGHT, WKC_END, WKC_HOME |
Definition at line 952 of file misc_gui.cpp.
References Utf8PrevChar().
void ShowQuery | ( | StringID | caption, | |
StringID | message, | |||
Window * | parent, | |||
void(*)(Window *, bool) | callback | |||
) |
Show a modal confirmation window with standard 'yes' and 'no' buttons The window is aligned to the centre of its parent.
NOTE: You cannot use BindCString as parameter for this window!
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 1340 of file misc_gui.cpp.
References AllocateWindowDesc().
Referenced by CmdPause().
void ShowQueryString | ( | StringID | str, | |
StringID | caption, | |||
uint | maxlen, | |||
uint | maxwidth, | |||
Window * | parent, | |||
CharSetFilter | afilter | |||
) |
Show a query popup window with a textbox in it.
str | StringID for the text shown in the textbox | |
caption | StringID of text shown in caption of querywindow | |
maxlen | maximum length in characters allowed. If bit 12 is set we will not check the resulting string against to original string to return success | |
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 |
Definition at line 1219 of file misc_gui.cpp.
References AllocateWindowDesc(), and InitializeTextBuffer().
Referenced by GroupWndProc(), PatchesSelectionWndProc(), PlayerCompanyWndProc(), SelectPlayerFaceWndProc(), StationViewWndProc(), and VehicleDetailsWndProc().
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
tb | Textbuf type which length is calculated |
Definition at line 1013 of file misc_gui.cpp.
References buf, and Utf8CharLen().
Referenced by IConsoleHistoryNavigate(), and InitializeTextBuffer().
const WindowDesc _about_desc [static] |
Initial value:
{ WDP_CENTER, WDP_CENTER, 420, 272, 420, 272, WC_GAME_OPTIONS, WC_NONE, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, _about_widgets, AboutWindowProc }
Definition at line 313 of file misc_gui.cpp.
const Widget _about_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 419, 0, 13, STR_015B_OPENTTD, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 14, 0, 419, 14, 271, 0x0, STR_NULL}, { WWT_FRAME, RESIZE_NONE, 14, 5, 414, 40, 245, STR_NULL, STR_NULL}, { WIDGETS_END}, }
Definition at line 305 of file misc_gui.cpp.
const WindowDesc _build_trees_desc [static] |
Initial value:
{ 497, 22, 143, 171, 143, 171, WC_BUILD_TREES, WC_SCEN_LAND_GEN, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, _build_trees_widgets, BuildTreesWndProc }
Definition at line 445 of file misc_gui.cpp.
const WindowDesc _build_trees_scen_desc [static] |
Initial value:
{ WDP_AUTO, WDP_AUTO, 143, 184, 143, 184, WC_BUILD_TREES, WC_NONE, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, _build_trees_scen_widgets, BuildTreesWndProc }
Definition at line 474 of file misc_gui.cpp.
const Widget _build_trees_scen_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 142, 0, 13, STR_2802_TREES, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_PANEL, RESIZE_NONE, 7, 0, 142, 14, 183, 0x0, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 14, 2, 35, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 37, 70, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 72, 105, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 107, 140, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 2, 35, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 37, 70, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 72, 105, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 107, 140, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 2, 35, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 37, 70, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 72, 105, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 107, 140, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_TEXTBTN, RESIZE_NONE, 14, 2, 140, 157, 168, STR_TREES_RANDOM_TYPE, STR_TREES_RANDOM_TYPE_TIP}, { WWT_TEXTBTN, RESIZE_NONE, 14, 2, 140, 170, 181, STR_028A_RANDOM_TREES, STR_028B_PLANT_TREES_RANDOMLY_OVER}, { WIDGETS_END}, }
Definition at line 453 of file misc_gui.cpp.
const Widget _build_trees_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 7, 11, 142, 0, 13, STR_2802_TREES, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_PANEL, RESIZE_NONE, 7, 0, 142, 14, 170, 0x0, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 14, 2, 35, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 37, 70, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 72, 105, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 107, 140, 16, 61, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 2, 35, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 37, 70, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 72, 105, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 107, 140, 63, 108, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 2, 35, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 37, 70, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 72, 105, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_PANEL, RESIZE_NONE, 14, 107, 140, 110, 155, 0x0, STR_280D_SELECT_TREE_TYPE_TO_PLANT}, { WWT_TEXTBTN, RESIZE_NONE, 14, 2, 140, 157, 168, STR_TREES_RANDOM_TYPE, STR_TREES_RANDOM_TYPE_TIP}, { WIDGETS_END}, }
Definition at line 425 of file misc_gui.cpp.
const Widget _cheat_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 399, 0, 13, STR_CHEATS, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_PANEL, RESIZE_NONE, 14, 0, 399, 14, 169, 0x0, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 14, 0, 399, 14, 169, 0x0, STR_CHEATS_TIP}, { WIDGETS_END}, }
Definition at line 1861 of file misc_gui.cpp.
const WindowDesc _cheats_desc [static] |
Initial value:
{ 240, 22, 400, 170, 400, 170, WC_CHEATS, WC_NONE, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, _cheat_widgets, CheatsWndProc }
Definition at line 1966 of file misc_gui.cpp.
const CheatEntry _cheats_ui[] [static] |
Initial value:
{ {SLE_INT32, STR_CHEAT_MONEY, &_money_cheat_amount, &_cheats.money.been_used, &ClickMoneyCheat }, {SLE_UINT8, STR_CHEAT_CHANGE_PLAYER, &_local_player, &_cheats.switch_player.been_used, &ClickChangePlayerCheat }, {SLE_BOOL, STR_CHEAT_EXTRA_DYNAMITE, &_cheats.magic_bulldozer.value, &_cheats.magic_bulldozer.been_used, NULL }, {SLE_BOOL, STR_CHEAT_CROSSINGTUNNELS, &_cheats.crossing_tunnels.value, &_cheats.crossing_tunnels.been_used, NULL }, {SLE_BOOL, STR_CHEAT_BUILD_IN_PAUSE, &_cheats.build_in_pause.value, &_cheats.build_in_pause.been_used, NULL }, {SLE_BOOL, STR_CHEAT_NO_JETCRASH, &_cheats.no_jetcrash.value, &_cheats.no_jetcrash.been_used, NULL }, {SLE_BOOL, STR_CHEAT_SETUP_PROD, &_cheats.setup_prod.value, &_cheats.setup_prod.been_used, NULL }, {SLE_UINT8, STR_CHEAT_SWITCH_CLIMATE, &_opt.landscape, &_cheats.switch_climate.been_used, &ClickChangeClimateCheat}, {SLE_INT32, STR_CHEAT_CHANGE_DATE, &_cur_year, &_cheats.change_date.been_used, &ClickChangeDateCheat }, }
Definition at line 1848 of file misc_gui.cpp.
const Widget _errmsg_face_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 4, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 4, 11, 333, 0, 13, STR_00B3_MESSAGE_FROM, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 4, 0, 333, 14, 136, 0x0, STR_NULL}, { WIDGETS_END}, }
Definition at line 506 of file misc_gui.cpp.
const Widget _errmsg_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 4, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 4, 11, 239, 0, 13, STR_00B2_MESSAGE, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 4, 0, 239, 14, 45, 0x0, STR_NULL}, { WIDGETS_END}, }
Definition at line 499 of file misc_gui.cpp.
const FileType _file_modetotype[] [static] |
Initial value:
{ FT_SAVEGAME, FT_SCENARIO, FT_SAVEGAME, FT_SCENARIO, FT_HEIGHTMAP, FT_SAVEGAME, }
So each entry, as expressed by the related comment, is based on the enum
Definition at line 1682 of file misc_gui.cpp.
const TextColour _fios_colors[] |
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 1393 of file misc_gui.cpp.
const WindowDesc _land_info_desc [static] |
Initial value:
{ WDP_AUTO, WDP_AUTO, 280, 93, 280, 93, WC_LAND_INFO, WC_NONE, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, _land_info_widgets, LandInfoWndProc }
Definition at line 85 of file misc_gui.cpp.
const Widget _land_info_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 279, 0, 13, STR_01A3_LAND_AREA_INFORMATION, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_PANEL, RESIZE_NONE, 14, 0, 279, 14, 92, 0x0, STR_NULL}, { WIDGETS_END}, }
Definition at line 78 of file misc_gui.cpp.
const WindowDesc _load_dialog_desc [static] |
Initial value:
{ WDP_CENTER, WDP_CENTER, 257, 154, 257, 294, WC_SAVELOAD, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE, _load_dialog_widgets, SaveLoadDlgWndProc, }
Definition at line 1664 of file misc_gui.cpp.
const Widget _load_dialog_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_NULL, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, { WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, { WWT_PANEL, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, { WWT_PANEL, RESIZE_RB, 14, 0, 256, 48, 153, 0x0, STR_NULL}, { WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, { WWT_INSET, RESIZE_RB, 14, 2, 243, 50, 151, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, { WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 141, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 142, 153, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }
Definition at line 1360 of file misc_gui.cpp.
int32 _money_cheat_amount = 10000000 [static] |
The 'amount' to cheat with.
This variable is semantically a constant value, but because the cheat code requires to be able to write to the variable it is not constified.
Definition at line 1779 of file misc_gui.cpp.
const WindowDesc _query_desc [static] |
Initial value:
{ WDP_CENTER, WDP_CENTER, 210, 82, 210, 82, WC_CONFIRM_POPUP_QUERY, WC_NONE, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_DEF_WIDGET | WDF_MODAL, _query_widgets, QueryWndProc }
Definition at line 1324 of file misc_gui.cpp.
const WindowDesc _query_string_desc [static] |
Initial value:
{ 190, 219, 260, 42, 260, 42, WC_QUERY_STRING, WC_NONE, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, _query_string_widgets, QueryStringWndProc }
Definition at line 1200 of file misc_gui.cpp.
const Widget _query_string_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 14, 11, 259, 0, 13, STR_012D, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 14, 0, 259, 14, 29, 0x0, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 14, 2, 257, 16, 27, 0x0, STR_NULL}, { WWT_TEXTBTN, RESIZE_NONE, 14, 0, 129, 30, 41, STR_012E_CANCEL, STR_NULL}, { WWT_TEXTBTN, RESIZE_NONE, 14, 130, 259, 30, 41, STR_012F_OK, STR_NULL}, { WIDGETS_END}, }
Definition at line 1190 of file misc_gui.cpp.
const Widget _query_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 4, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_NONE, 4, 11, 209, 0, 13, STR_NULL, STR_NULL}, { WWT_PANEL, RESIZE_NONE, 4, 0, 209, 14, 81, 0x0, STR_NULL}, {WWT_PUSHTXTBTN, RESIZE_NONE, 3, 20, 90, 62, 73, STR_00C9_NO, STR_NULL}, {WWT_PUSHTXTBTN, RESIZE_NONE, 3, 120, 190, 62, 73, STR_00C8_YES, STR_NULL}, { WIDGETS_END }, }
Definition at line 1315 of file misc_gui.cpp.
const WindowDesc _save_dialog_desc [static] |
Initial value:
{ WDP_CENTER, WDP_CENTER, 257, 180, 257, 320, WC_SAVELOAD, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE, _save_dialog_widgets, SaveLoadDlgWndProc, }
Definition at line 1672 of file misc_gui.cpp.
const Widget _save_dialog_widgets[] [static] |
Initial value:
{ { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, { WWT_CAPTION, RESIZE_RIGHT, 14, 11, 256, 0, 13, STR_NULL, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 127, 14, 25, STR_SORT_BY_NAME, STR_SORT_ORDER_TIP}, { WWT_PUSHTXTBTN, RESIZE_NONE, 14, 128, 256, 14, 25, STR_SORT_BY_DATE, STR_SORT_ORDER_TIP}, { WWT_PANEL, RESIZE_RIGHT, 14, 0, 256, 26, 47, 0x0, STR_NULL}, { WWT_PANEL, RESIZE_RB, 14, 0, 256, 48, 151, 0x0, STR_NULL}, { WWT_PUSHIMGBTN, RESIZE_LR, 14, 245, 256, 48, 59, SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON}, { WWT_INSET, RESIZE_RB, 14, 2, 243, 50, 150, 0x0, STR_400A_LIST_OF_DRIVES_DIRECTORIES}, { WWT_SCROLLBAR, RESIZE_LRB, 14, 245, 256, 60, 151, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, { WWT_PANEL, RESIZE_RTB, 14, 0, 256, 152, 167, 0x0, STR_NULL}, { WWT_PANEL, RESIZE_RTB, 14, 2, 254, 154, 165, 0x0, STR_400B_CURRENTLY_SELECTED_NAME}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 127, 168, 179, STR_4003_DELETE, STR_400C_DELETE_THE_CURRENTLY_SELECTED}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 128, 244, 168, 179, STR_4002_SAVE, STR_400D_SAVE_THE_CURRENT_GAME_USING}, { WWT_RESIZEBOX, RESIZE_LRTB, 14, 245, 256, 168, 179, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }
Definition at line 1374 of file misc_gui.cpp.
const Widget _tooltips_widgets[] [static] |
Initial value:
{ { WWT_PANEL, RESIZE_NONE, 14, 0, 199, 0, 31, 0x0, STR_NULL}, { WIDGETS_END}, }
Definition at line 696 of file misc_gui.cpp.
const PalSpriteID _tree_sprites[] [static] |
Initial value:
{ { 0x655, PAL_NONE }, { 0x663, PAL_NONE }, { 0x678, PAL_NONE }, { 0x62B, PAL_NONE }, { 0x647, PAL_NONE }, { 0x639, PAL_NONE }, { 0x64E, PAL_NONE }, { 0x632, PAL_NONE }, { 0x67F, PAL_NONE }, { 0x68D, PAL_NONE }, { 0x69B, PAL_NONE }, { 0x6A9, PAL_NONE }, { 0x6AF, PAL_NONE }, { 0x6D2, PAL_NONE }, { 0x6D9, PAL_NONE }, { 0x6C4, PAL_NONE }, { 0x6CB, PAL_NONE }, { 0x6B6, PAL_NONE }, { 0x6BD, PAL_NONE }, { 0x6E0, PAL_NONE }, { 0x72E, PAL_NONE }, { 0x734, PAL_NONE }, { 0x74A, PAL_NONE }, { 0x74F, PAL_NONE }, { 0x76B, PAL_NONE }, { 0x78F, PAL_NONE }, { 0x788, PAL_NONE }, { 0x77B, PAL_NONE }, { 0x75F, PAL_NONE }, { 0x774, PAL_NONE }, { 0x720, PAL_NONE }, { 0x797, PAL_NONE }, { 0x79E, PAL_NONE }, { 0x7A5, PALETTE_TO_GREEN }, { 0x7AC, PALETTE_TO_RED }, { 0x7B3, PAL_NONE }, { 0x7BA, PAL_NONE }, { 0x7C1, PALETTE_TO_RED, }, { 0x7C8, PALETTE_TO_PALE_GREEN }, { 0x7CF, PALETTE_TO_YELLOW }, { 0x7D6, PALETTE_TO_RED } }
Definition at line 330 of file misc_gui.cpp.