Public Member Functions

# SelectGameWindow Struct Reference

Inheritance diagram for SelectGameWindow:

## Public Member Functions
| SelectGameWindow (const WindowDesc *desc)
virtual void | OnInvalidateData (int data=0, bool gui_scope=true)
| Some data on this window has become invalid.
virtual void | OnInit ()
| Notification that the nested widget tree gets initialized.
virtual void | DrawWidget (const Rect &r, int widget) const
| Draw the contents of a nested widget.
virtual void | UpdateWidgetSize (int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
| Update size and resize step of a widget in the window.
virtual void | OnClick (Point pt, int widget, int click_count)
| A click with the left mouse button has been made on the window.

## Detailed Description

Definition at line 36 of file intro_gui.cpp.

## Member Function Documentation

virtual void SelectGameWindow::DrawWidget | ( | const Rect & | r,
|  | int | widget |
| ) |  |  | const`[inline, virtual]`

Draw the contents of a nested widget.

Parameters:

  | r | Rectangle occupied by the widget.
  | widget | Number of the widget to draw.

Note:
  This method may not change any state, it may only use drawing functions.

Reimplemented from Window.

Definition at line 65 of file intro_gui.cpp.

References _current_language, DrawStringMultiLine(), LanguagePackHeader::missing, SA_CENTER, SetDParam(), and WID_SGI_TRANSLATION.

virtual void SelectGameWindow::OnClick | ( | Point | pt,
|  | int | widget,
|  | int | click_count |
| ) |  |  | `[inline, virtual]`

A click with the left mouse button has been made on the window.

Parameters:

  | pt | the point inside the window that has been clicked.
  | widget | the clicked widget.
  | click_count | Number of fast consecutive clicks at same position

Reimplemented from Window.

Definition at line 95 of file intro_gui.cpp.

References _ctrl_pressed, _grfconfig_newgame, _is_network_server, _network_available, GENERATE_NEW_SEED, INVALID_STRING_ID, IsInsideMM(), SetNewLandscapeType(), ShowAIConfigWindow(), ShowErrorMessage(), ShowGameOptions(), ShowGameSettings(), ShowGenerateLandscape(), ShowHighscoreTable(), ShowNetworkContentListWindow(), ShowNewGRFSettings(), ShowSaveLoadDialog(), SLD_LOAD_GAME, SLD_LOAD_HEIGHTMAP, SLD_LOAD_SCENARIO, StartNewGameWithoutGUI(), StartScenarioEditor(), WID_SGI_AI_SETTINGS, WID_SGI_ARCTIC_LANDSCAPE, WID_SGI_CONTENT_DOWNLOAD, WID_SGI_EDIT_SCENARIO, WID_SGI_EXIT, WID_SGI_GENERATE_GAME, WID_SGI_GRF_SETTINGS, WID_SGI_HIGHSCORE, WID_SGI_LOAD_GAME, WID_SGI_OPTIONS, WID_SGI_PLAY_HEIGHTMAP, WID_SGI_PLAY_NETWORK, WID_SGI_PLAY_SCENARIO, WID_SGI_SETTINGS_OPTIONS, WID_SGI_TEMPERATE_LANDSCAPE, WID_SGI_TOYLAND_LANDSCAPE, WID_SGI_TROPIC_LANDSCAPE, and WL_ERROR.

virtual void SelectGameWindow::OnInit | ( |  | ) | `[inline, virtual]`

Notification that the nested widget tree gets initialized.

The event can be used to perform general computations.

Note:
  nested_root and/or nested_array (normally accessed via GetWidget()) may not exist during this call.

Reimplemented from Window.

Definition at line 59 of file intro_gui.cpp.

References _current_language, _settings_client, ClientSettings::gui, LanguagePackHeader::missing, GUISettings::missing_strings_threshold, and SZSP_NONE.

virtual void SelectGameWindow::OnInvalidateData | ( | int | data = `0`,
|  | bool | gui_scope = `true` |
| ) |  |  | `[inline, virtual]`

Some data on this window has become invalid.

Parameters:

  | data | Information about the changed data.
  | gui_scope | Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See InvalidateWindowData() for details.

Reimplemented from Window.

Definition at line 50 of file intro_gui.cpp.

References _settings_newgame, GameSettings::game_creation, GameCreationSettings::landscape, Window::SetWidgetLoweredState(), WID_SGI_ARCTIC_LANDSCAPE, WID_SGI_TEMPERATE_LANDSCAPE, WID_SGI_TOYLAND_LANDSCAPE, and WID_SGI_TROPIC_LANDSCAPE.

virtual void SelectGameWindow::UpdateWidgetSize | ( | int | widget,
|  | Dimension * | size,
|  | const Dimension & | padding,
|  | Dimension * | fill,
|  | Dimension * | resize |
| ) |  |  | `[inline, virtual]`

Update size and resize step of a widget in the window.

After retrieval of the minimal size and the resize-steps of a widget, this function is called to allow further refinement, typically by computing the real maximal size of the content. Afterwards, size is taken to be the minimal size of the widget and resize is taken to contain the resize steps. For the convenience of the callee, padding contains the amount of padding between the content and the edge of the widget. This should be added to the returned size.

Parameters:

  | widget | Widget number.
  | size | Size of the widget.
  | padding | Recommended amount of space between the widget content and the widget edge.
  | fill | Fill step of the widget.
  | resize | Resize step of the widget.

Reimplemented from Window.

Definition at line 75 of file intro_gui.cpp.

References _current_language, FONT_HEIGHT_NORMAL, GetStringBoundingBox(), GetStringHeight(), Window::height, maxdim(), LanguagePackHeader::missing, SetDParam(), and WID_SGI_TRANSLATION.

The documentation for this struct was generated from the following file:

- src/intro_gui.cpp