# player_gui.cpp File Reference

`#include "stdafx.h"`
`#include "openttd.h"`
`#include "gui.h"`
`#include "window_gui.h"`
`#include "textbuf_gui.h"`
`#include "viewport_func.h"`
`#include "gfx_func.h"`
`#include "player_func.h"`
`#include "player_base.h"`
`#include "command_func.h"`
`#include "network/network.h"`
`#include "variables.h"`
`#include "roadveh.h"`
`#include "train.h"`
`#include "aircraft.h"`
`#include "newgrf.h"`
`#include "network/network_data.h"`
`#include "network/network_client.h"`
`#include "network/network_gui.h"`
`#include "player_face.h"`
`#include "strings_func.h"`
`#include "functions.h"`
`#include "window_func.h"`
`#include "date_func.h"`
`#include "string_func.h"`
`#include "settings_type.h"`
`#include "widgets/dropdown_func.h"`
`#include "table/sprites.h"`
`#include "table/strings.h"`

Go to the source code of this file.

## Data Structures
struct | facesel_d
struct | livery_d
## Enumerations
enum | PlayerFinancesWindowWidgets { PFW_WIDGET_TOGGLE_SIZE = 2, PFW_WIDGET_INCREASE_LOAN = 6, PFW_WIDGET_REPAY_LOAN = 7 }
enum | PlayerLiveryWindowWidgets { PLW_WIDGET_CLASS_GENERAL = 2, PLW_WIDGET_CLASS_RAIL, PLW_WIDGET_CLASS_ROAD, PLW_WIDGET_CLASS_SHIP, PLW_WIDGET_CLASS_AIRCRAFT, PLW_WIDGET_PRI_COL_DROPDOWN = 9, PLW_WIDGET_SEC_COL_DROPDOWN, PLW_WIDGET_MATRIX }
enum | PlayerFaceWindowWidgets { PFW_WIDGET_CLOSEBOX = 0, PFW_WIDGET_CAPTION, PFW_WIDGET_TOGGLE_LARGE_SMALL, PFW_WIDGET_SELECT_FACE, PFW_WIDGET_CANCEL, PFW_WIDGET_ACCEPT, PFW_WIDGET_MALE, PFW_WIDGET_FEMALE, PFW_WIDGET_RANDOM_NEW_FACE, PFW_WIDGET_TOGGLE_LARGE_SMALL_BUTTON, PFW_WIDGET_LOAD, PFW_WIDGET_FACECODE, PFW_WIDGET_SAVE, PFW_WIDGET_ETHNICITY_EUR, PFW_WIDGET_ETHNICITY_AFR, PFW_WIDGET_HAS_MOUSTACHE_EARRING, PFW_WIDGET_HAS_GLASSES, PFW_WIDGET_EYECOLOUR_L, PFW_WIDGET_EYECOLOUR, PFW_WIDGET_EYECOLOUR_R, PFW_WIDGET_CHIN_L, PFW_WIDGET_CHIN, PFW_WIDGET_CHIN_R, PFW_WIDGET_EYEBROWS_L, PFW_WIDGET_EYEBROWS, PFW_WIDGET_EYEBROWS_R, PFW_WIDGET_LIPS_MOUSTACHE_L, PFW_WIDGET_LIPS_MOUSTACHE, PFW_WIDGET_LIPS_MOUSTACHE_R, PFW_WIDGET_NOSE_L, PFW_WIDGET_NOSE, PFW_WIDGET_NOSE_R, PFW_WIDGET_HAIR_L, PFW_WIDGET_HAIR, PFW_WIDGET_HAIR_R, PFW_WIDGET_JACKET_L, PFW_WIDGET_JACKET, PFW_WIDGET_JACKET_R, PFW_WIDGET_COLLAR_L, PFW_WIDGET_COLLAR, PFW_WIDGET_COLLAR_R, PFW_WIDGET_TIE_EARRING_L, PFW_WIDGET_TIE_EARRING, PFW_WIDGET_TIE_EARRING_R, PFW_WIDGET_GLASSES_L, PFW_WIDGET_GLASSES, PFW_WIDGET_GLASSES_R }
| Names of the widgets. More...
enum | PlayerCompanyWindowWidgets { PCW_WIDGET_CLOSEBOX = 0, PCW_WIDGET_CAPTION, PCW_WIDGET_FACE, PCW_WIDGET_NEW_FACE, PCW_WIDGET_COLOR_SCHEME, PCW_WIDGET_PRESIDENT_NAME, PCW_WIDGET_COMPANY_NAME, PCW_WIDGET_BUILD_VIEW_HQ, PCW_WIDGET_RELOCATE_HQ, PCW_WIDGET_BUY_SHARE, PCW_WIDGET_SELL_SHARE, PCW_WIDGET_COMPANY_PASSWORD }
## Functions
| assert_compile (WINDOW_CUSTOM_SIZE >=sizeof(facesel_d))
static void | DoShowPlayerFinances (PlayerID player, bool show_small, bool show_stickied)
static void | DoSelectPlayerFace (PlayerID player, bool adv)
| Open the simple/advanced player face selection window.
static void | DrawPlayerEconomyStats (const Player *p, byte mode)
static void | PlayerFinancesWndProc (Window *w, WindowEvent *e)
void | ShowPlayerFinances (PlayerID player)
| assert_compile (WINDOW_CUSTOM_SIZE >=sizeof(livery_d))
static void | ShowColourDropDownMenu (Window *w, uint32 widget)
static void | SelectPlayerLiveryWndProc (Window *w, WindowEvent *e)
void | DrawPlayerFace (PlayerFace pf, int color, int x, int y)
| Draws the face of a player.
void | DrawFaceStringLabel (const Window *w, byte widget_index, StringID str, uint8 val, bool is_bool_widget)
| Draw dynamic a label to the left of the button and a value in the button.
static void | SelectPlayerFaceWndProc (Window *w, WindowEvent *e)
| Player face selection window event definition.
static void | DrawPlayerVehiclesAmount (PlayerID player)
| Draws text "Vehicles:" and number of all vehicle types, or "(none)".
int | GetAmountOwnedBy (const Player *p, PlayerID owner)
static void | DrawCompanyOwnerText (const Player *p)
| Draws list of all companies with shares.
static void | PlayerCompanyWndProc (Window *w, WindowEvent *e)
| Player company window event definition.
void | ShowPlayerCompany (PlayerID player)
static void | BuyCompanyWndProc (Window *w, WindowEvent *e)
void | ShowBuyCompanyDialog (uint player)
static void | SetupHighScoreEndWindow (Window *w, uint *x, uint *y)
StringID | EndGameGetPerformanceTitleFromValue (uint value)
static void | EndGameWndProc (Window *w, WindowEvent *e)
| End game window shown at the end of the game.
static void | HighScoreWndProc (Window *w, WindowEvent *e)
void | ShowHighscoreTable (int difficulty, int8 ranking)
| Show the highscore table for a given difficulty.
void | ShowEndGameChart ()
| Show the endgame victory screen in 2050.
## Variables
static const Widget | _player_finances_widgets []
static const Widget | _player_finances_small_widgets []
static const WindowDesc | _player_finances_desc
static const WindowDesc | _player_finances_small_desc
static const StringID | _colour_dropdown []
static const LiveryClass | livery_class [LS_END]
static const byte | livery_height []
static const Widget | _select_player_livery_2cc_widgets []
static const WindowDesc | _select_player_livery_2cc_desc
static const Widget | _select_player_livery_widgets []
static const WindowDesc | _select_player_livery_desc
static const Widget | _select_player_face_widgets []
| Widget description for the normal/simple player face selection dialog.
static const Widget | _select_player_face_adv_widgets []
| Widget description for the advanced player face selection dialog.
static const WindowDesc | _select_player_face_desc
| normal/simple player face selection window description
static const WindowDesc | _select_player_face_adv_desc
| advanced player face selection window description
static const Widget | _player_company_widgets []
static const WindowDesc | _player_company_desc
static const Widget | _buy_company_widgets []
static const WindowDesc | _buy_company_desc
static const Widget | _highscore_widgets []
static const WindowDesc | _highscore_desc
static const WindowDesc | _endgame_desc

## Detailed Description

Definition in file player_gui.cpp.

## Enumeration Type Documentation

enum PlayerFaceWindowWidgets

Names of the widgets.

Keep them in the same order as in the widget array. Do not change the order of the widgets from PFW_WIDGET_HAS_MOUSTACHE_EARRING to PFW_WIDGET_GLASSES_R, this order is needed for the WE_CLICK event of DrawFaceStringLabel().

Definition at line 554 of file player_gui.cpp.

## Function Documentation

static void DoSelectPlayerFace | ( | PlayerID | player,
|  | bool | adv |
| ) |  |  | `[static]`

Open the simple/advanced player face selection window.

Parameters:

  | player | the player which face shall be edited
  | adv | simple or advanced player face selection window

Precondition:
  is player a valid player

Definition at line 955 of file player_gui.cpp.

References AllocateWindowDescFront().

Referenced by PlayerCompanyWndProc(), and SelectPlayerFaceWndProc().

static void DrawCompanyOwnerText | ( | const Player * | p | ) | `[static]`

Draws list of all companies with shares.

Parameters:

  | p | pointer to the Player structure

Definition at line 1070 of file player_gui.cpp.

Referenced by PlayerCompanyWndProc().

void DrawFaceStringLabel | ( | const Window * | w,
|  | byte | widget_index,
|  | StringID | str,
|  | uint8 | val,
|  | bool | is_bool_widget |
| ) |  |  |

Draw dynamic a label to the left of the button and a value in the button.

Parameters:

  | w | Window on which the widget is located
  | widget_index | index of this widget in the window
  | str | the label which will be draw
  | val | the value which will be draw
  | is_bool_widget | is it a bool button

Definition at line 681 of file player_gui.cpp.

Referenced by SelectPlayerFaceWndProc().

void DrawPlayerFace | ( | PlayerFace | pf,
|  | int | color,
|  | int | x,
|  | int | y |
| ) |  |  |

Draws the face of a player.

Parameters:

  | pf | the player's face
  | color | the (background) color of the gradient
  | x | x-position to draw the face
  | y | y-position to draw the face

Definition at line 512 of file player_gui.cpp.

References _pf_info, GE_WM, GENDER_FEMALE, GetPlayerFaceBits(), GetPlayerFaceSprite(), and HasBit().

Referenced by PlayerCompanyWndProc(), and SelectPlayerFaceWndProc().

static void DrawPlayerVehiclesAmount | ( | PlayerID | player | ) | `[static]`

Draws text "Vehicles:" and number of all vehicle types, or "(none)".

Parameters:

  | player | ID of player to print statistics of

Definition at line 1006 of file player_gui.cpp.

References IsFrontEngine(), and IsNormalAircraft().

Referenced by PlayerCompanyWndProc().

static void PlayerCompanyWndProc | ( | Window * | w,
|  | WindowEvent * | e |
| ) |  |  | `[static]`

Player company window event definition.

Parameters:

  | w | window pointer
  | e | event been triggered

Definition at line 1093 of file player_gui.cpp.

References _cmd_text, _networking, AllocateWindowDescFront(), CMD_BUILD_COMPANY_HQ, CMD_BUY_SHARE_IN_COMPANY, CMD_CHANGE_COMPANY_NAME, CMD_CHANGE_PRESIDENT_NAME, CMD_MSG, CMD_NO_WATER, CMD_SELL_SHARE_IN_COMPANY, CS_ALPHANUMERAL, DoCommandP(), DoSelectPlayerFace(), DrawCompanyOwnerText(), DrawPlayerFace(), DrawPlayerVehiclesAmount(), DrawStringMultiCenter(), MAX_LENGTH_PRESIDENT_NAME, PLAYER_SPECTATOR, SetWindowDirty(), ShowQueryString(), and VHM_RECT.

static void SelectPlayerFaceWndProc | ( | Window * | w,
|  | WindowEvent * | e |
| ) |  |  | `[static]`

Player face selection window event definition.

Parameters:

  | w | window pointer
  | e | event been triggered

Definition at line 708 of file player_gui.cpp.

References _pf_info, _player_face, CMD_SET_PLAYER_FACE, CS_NUMERAL, DoCommandP(), DoSelectPlayerFace(), DrawFaceStringLabel(), DrawPlayerFace(), ETHNICITY_BLACK, GB(), GENDER_FEMALE, GetPlayerFaceBits(), HasBit(), IncreasePlayerFaceBits(), RandomPlayerFaceBits(), ScaleAllPlayerFaceBits(), SetPlayerFaceBits(), SetWindowDirty(), ShowQueryString(), and WIDGET_LIST_END.

void ShowEndGameChart | ( |  | ) |

Show the endgame victory screen in 2050.

Update the new highscore if it was high enough

Definition at line 1494 of file player_gui.cpp.

References _networking, AllocateWindowDesc(), CMD_PAUSE, DoCommandP(), HideVitalWindows(), MarkWholeScreenDirty(), PLAYER_SPECTATOR, SaveHighScoreValue(), and SCORE_MAX.

void ShowHighscoreTable | ( | int | difficulty,
|  | int8 | ranking |
| ) |  |  |

Show the highscore table for a given difficulty.

When called from endgame ranking is set to the top5 element that was newly added and is thus highlighted

Definition at line 1471 of file player_gui.cpp.

References _networking, AllocateWindowDesc(), CMD_PAUSE, DoCommandP(), HideVitalWindows(), and MarkWholeScreenDirty().

Referenced by EndGameWndProc().

## Variable Documentation

const WindowDesc _buy_company_desc`[static]`

Initial value:

     {
      153, 171, 334, 137, 334, 137,
      WC_BUY_COMPANY, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
      _buy_company_widgets,
      BuyCompanyWndProc
    }

Definition at line 1332 of file player_gui.cpp.

const Widget _buy_company_widgets[]`[static]`

Initial value:

     {
    {   WWT_CLOSEBOX,   RESIZE_NONE,     5,     0,    10,     0,    13, STR_00C5,              STR_018B_CLOSE_WINDOW},
    {    WWT_CAPTION,   RESIZE_NONE,     5,    11,   333,     0,    13, STR_00B3_MESSAGE_FROM, STR_018C_WINDOW_TITLE_DRAG_THIS},
    {      WWT_PANEL,   RESIZE_NONE,     5,     0,   333,    14,   136, 0x0,                   STR_NULL},
    {    WWT_TEXTBTN,   RESIZE_NONE,     5,   148,   207,   117,   128, STR_00C9_NO,           STR_NULL},
    {    WWT_TEXTBTN,   RESIZE_NONE,     5,   218,   277,   117,   128, STR_00C8_YES,          STR_NULL},
    {   WIDGETS_END},
    }

Definition at line 1323 of file player_gui.cpp.

const StringID _colour_dropdown[]`[static]`

Initial value:

     {
      STR_00D1_DARK_BLUE,
      STR_00D2_PALE_GREEN,
      STR_00D3_PINK,
      STR_00D4_YELLOW,
      STR_00D5_RED,
      STR_00D6_LIGHT_BLUE,
      STR_00D7_GREEN,
      STR_00D8_DARK_GREEN,
      STR_00D9_BLUE,
      STR_00DA_CREAM,
      STR_00DB_MAUVE,
      STR_00DC_PURPLE,
      STR_00DD_ORANGE,
      STR_00DE_BROWN,
      STR_00DF_GREY,
      STR_00E0_WHITE,
      INVALID_STRING_ID
    }

Definition at line 242 of file player_gui.cpp.

const WindowDesc _endgame_desc`[static]`

Initial value:

     {
      0, 0, 641, 481, 641, 481,
      WC_ENDSCREEN, WC_NONE,
      0,
      _highscore_widgets,
      EndGameWndProc
    }

Definition at line 1460 of file player_gui.cpp.

const WindowDesc _highscore_desc`[static]`

Initial value:

     {
      0, 0, 641, 481, 641, 481,
      WC_HIGHSCORE, WC_NONE,
      0,
      _highscore_widgets,
      HighScoreWndProc
    }

Definition at line 1452 of file player_gui.cpp.

const Widget _highscore_widgets[]`[static]`

Initial value:

     {
    {      WWT_PANEL, RESIZE_NONE, 16, 0, 640, 0, 480, 0x0, STR_NULL},
    {   WIDGETS_END},
    }

Definition at line 1447 of file player_gui.cpp.

const WindowDesc _player_company_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 360, 170, 360, 170,
      WC_COMPANY, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
      _player_company_widgets,
      PlayerCompanyWndProc
    }

Definition at line 1272 of file player_gui.cpp.

const Widget _player_company_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,   359,     0,    13, STR_7001,                          STR_018C_WINDOW_TITLE_DRAG_THIS},
    {      WWT_PANEL,   RESIZE_NONE,    14,     0,   359,    14,   157, 0x0,                               STR_NULL},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    89,   158,   169, STR_7004_NEW_FACE,                 STR_7030_SELECT_NEW_FACE_FOR_PRESIDENT},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,    90,   179,   158,   169, STR_7005_COLOR_SCHEME,             STR_7031_CHANGE_THE_COMPANY_VEHICLE},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   180,   269,   158,   169, STR_7009_PRESIDENT_NAME,           STR_7032_CHANGE_THE_PRESIDENT_S},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   270,   359,   158,   169, STR_7008_COMPANY_NAME,             STR_7033_CHANGE_THE_COMPANY_NAME},
    {    WWT_TEXTBTN,   RESIZE_NONE,    14,   266,   355,    18,    29, STR_7072_VIEW_HQ,                  STR_7070_BUILD_COMPANY_HEADQUARTERS},
    {    WWT_TEXTBTN,   RESIZE_NONE,    14,   266,   355,    32,    43, STR_RELOCATE_HQ,                   STR_RELOCATE_COMPANY_HEADQUARTERS},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,   179,   158,   169, STR_7077_BUY_25_SHARE_IN_COMPANY,  STR_7079_BUY_25_SHARE_IN_THIS_COMPANY},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   180,   359,   158,   169, STR_7078_SELL_25_SHARE_IN_COMPANY, STR_707A_SELL_25_SHARE_IN_THIS_COMPANY},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   266,   355,   138,   149, STR_COMPANY_PASSWORD,              STR_COMPANY_PASSWORD_TOOLTIP},
    {   WIDGETS_END},
    }

Definition at line 985 of file player_gui.cpp.

const WindowDesc _player_finances_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 407, 216, 407, 216,
      WC_FINANCES, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
      _player_finances_widgets,
      PlayerFinancesWndProc
    }

Definition at line 208 of file player_gui.cpp.

const WindowDesc _player_finances_small_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 280, 60, 280, 60,
      WC_FINANCES, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
      _player_finances_small_widgets,
      PlayerFinancesWndProc
    }

Definition at line 216 of file player_gui.cpp.

const Widget _player_finances_small_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,   253,     0,    13, STR_700E_FINANCES,      STR_018C_WINDOW_TITLE_DRAG_THIS},
    {     WWT_IMGBTN,   RESIZE_NONE,    14,   254,   267,     0,    13, SPR_LARGE_SMALL_WINDOW, STR_7075_TOGGLE_LARGE_SMALL_WINDOW},
    {  WWT_STICKYBOX,   RESIZE_NONE,    14,   268,   279,     0,    13, 0x0,                    STR_STICKY_BUTTON},
    {      WWT_EMPTY,   RESIZE_NONE,     0,     0,     0,     0,     0, 0x0,                    STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,    14,     0,   279,    14,    47, STR_NULL,               STR_NULL},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,   139,    48,    59, STR_7029_BORROW,        STR_7035_INCREASE_SIZE_OF_LOAN},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   140,   279,    48,    59, STR_702A_REPAY,         STR_7036_REPAY_PART_OF_LOAN},
    {   WIDGETS_END},
    }

Definition at line 140 of file player_gui.cpp.

const Widget _player_finances_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,   379,     0,    13, STR_700E_FINANCES,      STR_018C_WINDOW_TITLE_DRAG_THIS},
    {     WWT_IMGBTN,   RESIZE_NONE,    14,   380,   394,     0,    13, SPR_LARGE_SMALL_WINDOW, STR_7075_TOGGLE_LARGE_SMALL_WINDOW},
    {  WWT_STICKYBOX,   RESIZE_NONE,    14,   395,   406,     0,    13, 0x0,                    STR_STICKY_BUTTON},
    {      WWT_PANEL,   RESIZE_NONE,    14,     0,   406,    14,   169, 0x0,                    STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,    14,     0,   406,   170,   203, 0x0,                    STR_NULL},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,   202,   204,   215, STR_7029_BORROW,        STR_7035_INCREASE_SIZE_OF_LOAN},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   203,   406,   204,   215, STR_702A_REPAY,         STR_7036_REPAY_PART_OF_LOAN},
    {   WIDGETS_END},
    }

Definition at line 128 of file player_gui.cpp.

const WindowDesc _select_player_face_adv_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 220, 220, 220, 220,
      WC_PLAYER_FACE, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
      _select_player_face_adv_widgets,
      SelectPlayerFaceWndProc
    }

advanced player face selection window description

Definition at line 939 of file player_gui.cpp.

const WindowDesc _select_player_face_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 190, 163, 190, 163,
      WC_PLAYER_FACE, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
      _select_player_face_widgets,
      SelectPlayerFaceWndProc
    }

normal/simple player face selection window description

Definition at line 930 of file player_gui.cpp.

const Widget _select_player_face_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,   174,     0,    13, STR_7043_FACE_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS},
    {     WWT_IMGBTN,   RESIZE_NONE,    14,   175,   189,     0,    13, SPR_LARGE_SMALL_WINDOW,  STR_FACE_ADVANCED_TIP},
    {      WWT_PANEL,   RESIZE_NONE,    14,     0,   189,    14,   150, 0x0,                     STR_NULL},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    94,   151,   162, STR_012E_CANCEL,         STR_7047_CANCEL_NEW_FACE_SELECTION},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,    95,   189,   151,   162, STR_012F_OK,             STR_7048_ACCEPT_NEW_FACE_SELECTION},
    {    WWT_TEXTBTN,   RESIZE_NONE,    14,    95,   187,    75,    86, STR_7044_MALE,           STR_7049_SELECT_MALE_FACES},
    {    WWT_TEXTBTN,   RESIZE_NONE,    14,    95,   187,    87,    98, STR_7045_FEMALE,         STR_704A_SELECT_FEMALE_FACES},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     2,    93,   137,   148, STR_7046_NEW_FACE,       STR_704B_GENERATE_RANDOM_NEW_FACE},
    { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,    95,   187,    16,    27, STR_FACE_ADVANCED,       STR_FACE_ADVANCED_TIP},
    {   WIDGETS_END},
    }

Widget description for the normal/simple player face selection dialog.

Definition at line 606 of file player_gui.cpp.

const WindowDesc _select_player_livery_2cc_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 400, 49 + 1 * 14, 400, 49 + 1 * 14,
      WC_PLAYER_COLOR, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
      _select_player_livery_2cc_widgets,
      SelectPlayerLiveryWndProc
    }

Definition at line 472 of file player_gui.cpp.

const Widget _select_player_livery_2cc_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_7007_NEW_COLOR_SCHEME, STR_018C_WINDOW_TITLE_DRAG_THIS },
    {   WWT_IMGBTN, RESIZE_NONE, 14,   0,  21,  14,  35, SPR_IMG_COMPANY_GENERAL,   STR_LIVERY_GENERAL_TIP },
    {   WWT_IMGBTN, RESIZE_NONE, 14,  22,  43,  14,  35, SPR_IMG_TRAINLIST,         STR_LIVERY_TRAIN_TIP },
    {   WWT_IMGBTN, RESIZE_NONE, 14,  44,  65,  14,  35, SPR_IMG_TRUCKLIST,         STR_LIVERY_ROADVEH_TIP },
    {   WWT_IMGBTN, RESIZE_NONE, 14,  66,  87,  14,  35, SPR_IMG_SHIPLIST,          STR_LIVERY_SHIP_TIP },
    {   WWT_IMGBTN, RESIZE_NONE, 14,  88, 109,  14,  35, SPR_IMG_AIRPLANESLIST,     STR_LIVERY_AIRCRAFT_TIP },
    {    WWT_PANEL, RESIZE_NONE, 14, 110, 399,  14,  35, 0x0,                       STR_NULL },
    {    WWT_PANEL, RESIZE_NONE, 14,   0, 149,  36,  47, 0x0,                       STR_NULL },
    { WWT_DROPDOWN, RESIZE_NONE, 14, 150, 274,  36,  47, STR_02BD,                  STR_LIVERY_PRIMARY_TIP },
    { WWT_DROPDOWN, RESIZE_NONE, 14, 275, 399,  36,  47, STR_02E1,                  STR_LIVERY_SECONDARY_TIP },
    {   WWT_MATRIX, RESIZE_NONE, 14,   0, 399,  48,  48 + 1 * 14, (1 << 8) | 1,     STR_LIVERY_PANEL_TIP },
    { WIDGETS_END },
    }

Definition at line 456 of file player_gui.cpp.

const WindowDesc _select_player_livery_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 275, 49 + 1 * 14, 275, 49 + 1 * 14,
      WC_PLAYER_COLOR, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
      _select_player_livery_widgets,
      SelectPlayerLiveryWndProc
    }

Definition at line 497 of file player_gui.cpp.

const Widget _select_player_livery_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, 274,   0,  13, STR_7007_NEW_COLOR_SCHEME, STR_018C_WINDOW_TITLE_DRAG_THIS },
    {   WWT_IMGBTN, RESIZE_NONE, 14,   0,  21,  14,  35, SPR_IMG_COMPANY_GENERAL,   STR_LIVERY_GENERAL_TIP },
    {   WWT_IMGBTN, RESIZE_NONE, 14,  22,  43,  14,  35, SPR_IMG_TRAINLIST,         STR_LIVERY_TRAIN_TIP },
    {   WWT_IMGBTN, RESIZE_NONE, 14,  44,  65,  14,  35, SPR_IMG_TRUCKLIST,         STR_LIVERY_ROADVEH_TIP },
    {   WWT_IMGBTN, RESIZE_NONE, 14,  66,  87,  14,  35, SPR_IMG_SHIPLIST,          STR_LIVERY_SHIP_TIP },
    {   WWT_IMGBTN, RESIZE_NONE, 14,  88, 109,  14,  35, SPR_IMG_AIRPLANESLIST,     STR_LIVERY_AIRCRAFT_TIP },
    {    WWT_PANEL, RESIZE_NONE, 14, 110, 274,  14,  35, 0x0,                       STR_NULL },
    {    WWT_PANEL, RESIZE_NONE, 14,   0, 149,  36,  47, 0x0,                       STR_NULL },
    { WWT_DROPDOWN, RESIZE_NONE, 14, 150, 274,  36,  47, STR_02BD,                  STR_LIVERY_PRIMARY_TIP },
    { WWT_DROPDOWN, RESIZE_NONE, 14, 275, 275,  36,  47, STR_02E1,                  STR_LIVERY_SECONDARY_TIP },
    {   WWT_MATRIX, RESIZE_NONE, 14,   0, 274,  48,  48 + 1 * 14, (1 << 8) | 1,     STR_LIVERY_PANEL_TIP },
    { WIDGETS_END },
    }

Definition at line 481 of file player_gui.cpp.

const LiveryClass livery_class[LS_END]`[static]`

Initial value:

     {
      LC_OTHER,
      LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL, LC_RAIL,
      LC_ROAD, LC_ROAD,
      LC_SHIP, LC_SHIP,
      LC_AIRCRAFT, LC_AIRCRAFT, LC_AIRCRAFT,
      LC_ROAD, LC_ROAD,
    }

Definition at line 263 of file player_gui.cpp.

const byte livery_height[]`[static]`

Initial value:

     {
      1,
      13,
      4,
      2,
      3,
    }

Definition at line 273 of file player_gui.cpp.