OpenTTD Source: src/misc_gui.cpp File Reference

OpenTTD Source 15.3

Data Structures | Macros | Enumerations | Functions | Variables
misc_gui.cpp File Reference

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

`#include "stdafx.h"`
`#include "debug.h"`
`#include "landscape.h"`
`#include "error.h"`
`#include "gui.h"`
`#include "gfx_layout.h"`
`#include "tilehighlight_func.h"`
`#include "command_func.h"`
`#include "company_func.h"`
`#include "town.h"`
`#include "string_func.h"`
`#include "company_base.h"`
`#include "station_base.h"`
`#include "waypoint_base.h"`
`#include "texteff.hpp"`
`#include "strings_func.h"`
`#include "window_func.h"`
`#include "querystring_gui.h"`
`#include "core/geometry_func.hpp"`
`#include "newgrf_debug.h"`
`#include "zoom_func.h"`
`#include "viewport_func.h"`
`#include "landscape_cmd.h"`
`#include "station_cmd.h"`
`#include "waypoint_cmd.h"`
`#include "rev.h"`
`#include "timer/timer.h"`
`#include "timer/timer_window.h"`
`#include "pathfinder/water_regions.h"`
`#include "widgets/misc_widget.h"`
`#include "table/strings.h"`
`#include "safeguards.h"`

Go to the source code of this file.

## Data Structures
class | LandInfoWindow
struct | AboutWindow
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...

## Macros
#define | LANDINFOD_LEVEL 1

## Enumerations
enum | OskActivation : uint8_t { OSKA_DISABLED , OSKA_DOUBLE_CLICK , OSKA_SINGLE_CLICK , OSKA_IMMEDIATELY }
| Method to open the OSK. More...

## Functions
void | ShowLandInfo (TileIndex tile)
| Show land information window.
void | ShowAboutWindow ()
void | ShowEstimatedCostOrIncome (Money cost, int x, int y)
| Display estimated costs.
void | ShowCostOrIncomeAnimation (int x, int y, int z, Money cost)
| Display animated income or costs on the map.
void | ShowFeederIncomeAnimation (int x, int y, int z, Money transfer, Money income)
| Display animated feeder income.
TextEffectID | ShowFillingPercent (int x, int y, int z, uint8_t percent, StringID string)
| Display vehicle loading indicators.
void | UpdateFillingPercent (TextEffectID te_id, uint8_t percent, StringID string)
| Update vehicle loading indicators.
void | HideFillingPercent (TextEffectID *te_id)
| Hide vehicle loading indicators.
void | GuiShowTooltips (Window *parent, EncodedString &&text, TooltipCloseCondition close_tooltip)
| Shows a tooltip.
static int | GetCaretWidth ()
static Rect | ScrollEditBoxTextRect (Rect r, const Textbuf &tb)
| Reposition edit text box rect based on textbuf length can caret position.
void | ShowQueryString (std::string_view str, StringID caption, uint maxsize, Window *parent, CharSetFilter afilter, QueryStringFlags flags)
| Show a query popup window with a textbox in it.
void | ShowQuery (EncodedString &&caption, EncodedString &&message, Window *parent, QueryCallbackProc *callback, bool focus)
| Show a confirmation window with standard 'yes' and 'no' buttons The window is aligned to the centre of its parent.

## Variables
static constexpr std::initializer_list< NWidgetPart > | _nested_land_info_widgets
static WindowDesc | _land_info_desc (WDP_AUTO, {}, 0, 0, WC_LAND_INFO, WC_NONE, {}, _nested_land_info_widgets)
static constexpr std::initializer_list< NWidgetPart > | _nested_about_widgets
static WindowDesc | _about_desc (WDP_CENTER, {}, 0, 0, WC_GAME_OPTIONS, WC_NONE, {}, _nested_about_widgets)
static const std::initializer_list< const std::string_view > | _credits
static constexpr std::initializer_list< NWidgetPart > | _nested_tooltips_widgets
static WindowDesc | _tool_tips_desc (WDP_MANUAL, {}, 0, 0, WC_TOOLTIPS, WC_NONE, {WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose}, _nested_tooltips_widgets)
static constexpr std::initializer_list< NWidgetPart > | _nested_query_string_widgets
static WindowDesc | _query_string_desc (WDP_CENTER, {}, 0, 0, WC_QUERY_STRING, WC_NONE, {}, _nested_query_string_widgets)
static constexpr std::initializer_list< NWidgetPart > | _nested_query_widgets
static WindowDesc | _query_desc (WDP_CENTER, {}, 0, 0, WC_CONFIRM_POPUP_QUERY, WC_NONE, WindowDefaultFlag::Modal, _nested_query_widgets)

## Detailed Description

GUIs for a number of misc windows.

Definition in file misc_gui.cpp.

## Enumeration Type Documentation

## ◆ OskActivation

enum OskActivation : uint8_t

Method to open the OSK.

Enumerator
OSKA_DISABLED | The OSK shall not be activated at all.
OSKA_DOUBLE_CLICK | Double click on the edit box opens OSK.
OSKA_SINGLE_CLICK | Single click after focus click opens OSK.
OSKA_IMMEDIATELY | Focusing click already opens OSK.

Definition at line 47 of file misc_gui.cpp.

## Function Documentation

## ◆ GetCaretWidth()

static int GetCaretWidth | ( |  | ) |
| static

Definition at line 712 of file misc_gui.cpp.

## ◆ GuiShowTooltips()

void GuiShowTooltips | ( | Window * | parent,
|  | EncodedString && | text,
|  | TooltipCloseCondition | close_tooltip
| ) |  |

Shows a tooltip.

Parameters

  parent | The window this tooltip is related to.
  text | String to be displayed. May include encoded parameters.
  close_tooltip | the condition under which the tooltip closes

Definition at line 693 of file misc_gui.cpp.

References CloseWindowById(), CursorVars::in_window, and WC_TOOLTIPS.

Referenced by DispatchHoverEvent(), DispatchRightClickEvent(), DepotWindow::OnRightClick(), ReplaceVehicleWindow::OnTooltip(), CheatWindow::OnTooltip(), IndustryCargoesWindow::OnTooltip(), LinkGraphLegendWindow::OnTooltip(), NetworkClientListWindow::OnTooltip(), BuildRailToolbarWindow::OnTooltip(), TextfileWindow::OnTooltip(), VehicleDetailsWindow::OnTooltip(), and ShowMeasurementTooltips().

## ◆ HideFillingPercent()

void HideFillingPercent | ( | TextEffectID * | te_id | ) |

Hide vehicle loading indicators.

Parameters

  *te_id | TextEffectID which is supposed to be hidden.

Definition at line 586 of file misc_gui.cpp.

Referenced by CmdReverseTrainDirection(), Train::Crash(), Vehicle::LeaveStation(), and Vehicle::PreDestructor().

## ◆ ScrollEditBoxTextRect()

static Rect ScrollEditBoxTextRect | ( | Rect | r,
|  | const Textbuf & | tb
| ) |  |
| static

Reposition edit text box rect based on textbuf length can caret position.

Parameters

  r | Initial rect of edit text box.
  tb | The Textbuf being processed.

Returns
  Updated rect.

Definition at line 723 of file misc_gui.cpp.

References Textbuf::caretxoffs, Textbuf::pixels, Rect::Translate(), Rect::Width(), and Rect::WithWidth().

Referenced by QueryString::GetBoundingRect(), QueryString::GetCaretPosition(), and QueryString::GetCharAtPosition().

## ◆ ShowAboutWindow()

void ShowAboutWindow | ( |  | ) |

Definition at line 483 of file misc_gui.cpp.

## ◆ ShowCostOrIncomeAnimation()

void ShowCostOrIncomeAnimation | ( | int | x,
|  | int | y,
|  | int | z,
|  | Money | cost
| ) |  |

Display animated income or costs on the map.

Does nothing if cost is zero.

Parameters

  x | World X position of the animation location.
  y | World Y position of the animation location.
  z | World Z position of the animation location.
  cost | Estimated cost (or income if negative).

Definition at line 513 of file misc_gui.cpp.

References Ticks::DAY_TICKS, GetEncodedString(), RemapCoords(), TE_RISING, Coord2D< T >::x, and Coord2D< T >::y.

Referenced by CmdChangeBankBalance(), CommandHelperBase::InternalPostResult(), and VehicleEnterDepot().

## ◆ ShowEstimatedCostOrIncome()

void ShowEstimatedCostOrIncome | ( | Money | cost,
|  | int | x,
|  | int | y
| ) |  |

Display estimated costs.

Parameters

  cost | Estimated cost (or income if negative).
  x | X position of the notification window.
  y | Y position of the notification window.

Definition at line 495 of file misc_gui.cpp.

References GetEncodedString(), ShowErrorMessage(), and WL_INFO.

Referenced by CommandHelperBase::InternalPostResult().

## ◆ ShowFeederIncomeAnimation()

void ShowFeederIncomeAnimation | ( | int | x,
|  | int | y,
|  | int | z,
|  | Money | transfer,
|  | Money | income
| ) |  |

Display animated feeder income.

Parameters

  x | World X position of the animation location.
  y | World Y position of the animation location.
  z | World Z position of the animation location.
  transfer | Estimated feeder income.
  income | Real income from goods being delivered to their final destination.

Definition at line 536 of file misc_gui.cpp.

References Ticks::DAY_TICKS, GetEncodedString(), RemapCoords(), TE_RISING, Coord2D< T >::x, and Coord2D< T >::y.

## ◆ ShowFillingPercent()

TextEffectID ShowFillingPercent | ( | int | x,
|  | int | y,
|  | int | z,
|  | uint8_t | percent,
|  | StringID | string
| ) |  |

Display vehicle loading indicators.

Parameters

  x | World X position of the animation location.
  y | World Y position of the animation location.
  z | World Z position of the animation location.
  percent | Estimated feeder income.
  string | String which is drawn on the map.

Returns
  TextEffectID to be used for future updates of the loading indicators.

Definition at line 561 of file misc_gui.cpp.

References GetEncodedString(), RemapCoords(), TE_STATIC, Coord2D< T >::x, and Coord2D< T >::y.

Referenced by LoadUnloadVehicle().

## ◆ ShowLandInfo()

void ShowLandInfo | ( | TileIndex | tile | ) |

Show land information window.

Parameters

  tile | The tile to show information about.

Definition at line 321 of file misc_gui.cpp.

References CloseWindowById(), and WC_LAND_INFO.

Referenced by MainToolbarWindow::OnPlaceObject(), and ScenarioEditorToolbarWindow::OnPlaceObject().

## ◆ ShowQuery()

void ShowQuery | ( | EncodedString && | caption,
|  | EncodedString && | message,
|  | Window * | parent,
|  | QueryCallbackProc * | callback,
|  | bool | focus
| ) |  |

Show a 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 nullptr the parent becomes the main window WC_MAIN_WINDOW
  callback | callback function pointer to set in the window descriptor
  focus | whether the window should be focussed (by default false)

Definition at line 1204 of file misc_gui.cpp.

References QueryWindow::Close(), GetMainWindow(), Window::parent, QueryWindow::proc, SetFocusedWindow(), WC_CONFIRM_POPUP_QUERY, and Window::window_class.

Referenced by CmdPause(), MakeScreenshotWithConfirm(), DepotWindow::OnClick(), GenerateLandscapeWindow::OnClick(), GenerateProgressWindow::OnClick(), VehicleGroupWindow::OnClick(), BuildIndustryWindow::OnClick(), NetworkContentListWindow::OnClick(), NewGRFWindow::OnClick(), GameOptionsWindow::OnClick(), ScenarioEditorLandscapeGenerationWindow::OnClick(), NetworkClientListWindow::OnDropdownSelect(), and SaveLoadWindow::OnTimeout().

## ◆ ShowQueryString()

void ShowQueryString | ( | std::string_view | str,
|  | StringID | caption,
|  | uint | maxsize,
|  | 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 or characters (including terminating '\0') depending on flags
  parent | pointer to a Window that will handle the events (ok/cancel) of this window.
  afilter | filters out unwanted character input
  flags | various flags,

See also
  QueryStringFlags

Definition at line 1064 of file misc_gui.cpp.

References CloseWindowByClass(), LengthIsInChars, MAX_CHAR_LENGTH, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and WC_QUERY_STRING.

Referenced by BuildVehicleWindow::OnClick(), SelectCompanyManagerFaceWindow::OnClick(), CompanyWindow::OnClick(), DepotWindow::OnClick(), GSConfigWindow::OnClick(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), IndustryViewWindow::OnClick(), NetworkGameWindow::OnClick(), NetworkStartServerWindow::OnClick(), NetworkClientListWindow::OnClick(), NewGRFInspectWindow::OnClick(), SpriteAlignerWindow::OnClick(), NewGRFParametersWindow::OnClick(), OrdersWindow::OnClick(), ScriptSettingsWindow::OnClick(), CustomCurrencyWindow::OnClick(), StationViewWindow::OnClick(), TimetableWindow::OnClick(), TownViewWindow::OnClick(), FoundTownWindow::OnClick(), VehicleViewWindow::OnClick(), WaypointWindow::OnClick(), GenerateLandscapeWindow::OnDropdownSelect(), and ToolbarScenDatePanel().

## ◆ UpdateFillingPercent()

void UpdateFillingPercent | ( | TextEffectID | te_id,
|  | uint8_t | percent,
|  | StringID | string
| ) |  |

Update vehicle loading indicators.

Parameters

  te_id | TextEffectID to be updated.
  string | String which is printed.

Definition at line 575 of file misc_gui.cpp.

References GetEncodedString().

Referenced by LoadUnloadVehicle().

## Variable Documentation

## ◆ _credits

const std::initializer_list<const std::string_view> _credits
| static

Definition at line 350 of file misc_gui.cpp.

## ◆ _nested_about_widgets

constexpr std::initializer_list<NWidgetPart> _nested_about_widgets
| staticconstexpr

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_ABOUT_OPENTTD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY), SetPIP(4, 2, 4),
NWidget(WWT_LABEL, INVALID_COLOUR), SetStringTip(STR_ABOUT_ORIGINAL_COPYRIGHT),
NWidget(WWT_LABEL, INVALID_COLOUR), SetStringTip(STR_ABOUT_VERSION),
NWidget(WWT_FRAME, COLOUR_GREY), SetPadding(0, 5, 1, 5),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_A_SCROLLING_TEXT),
EndContainer(),
NWidget(WWT_LABEL, INVALID_COLOUR, WID_A_WEBSITE),
NWidget(WWT_LABEL, INVALID_COLOUR, WID_A_COPYRIGHT),
EndContainer(),
}
SetPIP
constexpr NWidgetPart SetPIP(uint8_t pre, uint8_t inter, uint8_t post)
Widget part function for setting a pre/inter/post spaces.
Definition widget_type.h:1378
SetPadding
constexpr NWidgetPart SetPadding(uint8_t top, uint8_t right, uint8_t bottom, uint8_t left)
Widget part function for setting additional space around a widget.
Definition widget_type.h:1335
SetStringTip
constexpr NWidgetPart SetStringTip(StringID string, StringID tip={})
Widget part function for setting the string and tooltip.
Definition widget_type.h:1243
EndContainer
constexpr NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition widget_type.h:1232
NWidget
constexpr NWidgetPart NWidget(WidgetType tp, Colours col, WidgetID idx=INVALID_WIDGET)
Widget part function for starting a new 'real' widget.
Definition widget_type.h:1427
WID_A_WEBSITE
@ WID_A_WEBSITE
URL of OpenTTD website.
Definition misc_widget.h:27
WID_A_COPYRIGHT
@ WID_A_COPYRIGHT
Copyright string.
Definition misc_widget.h:28
WID_A_SCROLLING_TEXT
@ WID_A_SCROLLING_TEXT
The actually scrolling text.
Definition misc_widget.h:26
WWT_LABEL
@ WWT_LABEL
Centered label.
Definition widget_type.h:48
NWID_HORIZONTAL
@ NWID_HORIZONTAL
Horizontal container.
Definition widget_type.h:66
WWT_PANEL
@ WWT_PANEL
Simple depressed panel.
Definition widget_type.h:39
WWT_CAPTION
@ WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition widget_type.h:52
WWT_CLOSEBOX
@ WWT_CLOSEBOX
Close box (at top-left of a window)
Definition widget_type.h:60
WWT_FRAME
@ WWT_FRAME
Frame.
Definition widget_type.h:51
WWT_EMPTY
@ WWT_EMPTY
Empty widget, place holder to reserve space in widget tree.
Definition widget_type.h:37

Definition at line 327 of file misc_gui.cpp.

## ◆ _nested_land_info_widgets

constexpr std::initializer_list<NWidgetPart> _nested_land_info_widgets
| staticconstexpr

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_LAND_AREA_INFORMATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_LI_LOCATION), SetAspect(WidgetDimensions::ASPECT_LOCATION), SetSpriteTip(SPR_GOTO_LOCATION, STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP),
NWidget(WWT_DEBUGBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_LI_BACKGROUND), EndContainer(),
}
SetSpriteTip
constexpr NWidgetPart SetSpriteTip(SpriteID sprite, StringID tip={})
Widget part function for setting the sprite and tooltip.
Definition widget_type.h:1254
SetAspect
constexpr NWidgetPart SetAspect(float ratio, AspectFlags flags=AspectFlag::ResizeX)
Widget part function for setting the aspect ratio.
Definition widget_type.h:1413
WID_LI_BACKGROUND
@ WID_LI_BACKGROUND
Background of the window.
Definition misc_widget.h:16
WID_LI_LOCATION
@ WID_LI_LOCATION
Scroll to location.
Definition misc_widget.h:15
WWT_PUSHIMGBTN
@ WWT_PUSHIMGBTN
Normal push-button (no toggle button) with image caption.
Definition widget_type.h:106
WWT_DEBUGBOX
@ WWT_DEBUGBOX
NewGRF debug box (at top-right of a window, between WWT_CAPTION and WWT_SHADEBOX)
Definition widget_type.h:54

Definition at line 55 of file misc_gui.cpp.

## ◆ _nested_query_string_widgets

constexpr std::initializer_list<NWidgetPart> _nested_query_string_widgets
| staticconstexpr

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_QS_CAPTION), SetTextStyle(TC_WHITE),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_QS_TEXT), SetMinimalSize(256, 0), SetFill(1, 0), SetPadding(2, 2, 2, 2),
EndContainer(),
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_QS_DEFAULT_SEL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_QS_DEFAULT), SetMinimalSize(65, 12), SetFill(1, 1), SetStringTip(STR_BUTTON_DEFAULT),
EndContainer(),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_QS_CANCEL), SetMinimalSize(65, 12), SetFill(1, 1), SetStringTip(STR_BUTTON_CANCEL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_QS_OK), SetMinimalSize(65, 12), SetFill(1, 1), SetStringTip(STR_BUTTON_OK),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_QS_MOVE_SEL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_QS_MOVE), SetMinimalSize(65, 12), SetFill(1, 1), SetStringTip(STR_BUTTON_MOVE),
EndContainer(),
EndContainer(),
}
SetFill
constexpr NWidgetPart SetFill(uint16_t fill_x, uint16_t fill_y)
Widget part function for setting filling.
Definition widget_type.h:1222
SetTextStyle
constexpr NWidgetPart SetTextStyle(TextColour colour, FontSize size=FS_NORMAL)
Widget part function for setting the text style.
Definition widget_type.h:1201
SetMinimalSize
constexpr NWidgetPart SetMinimalSize(int16_t x, int16_t y)
Widget part function for setting the minimal size.
Definition widget_type.h:1159
WID_QS_MOVE_SEL
@ WID_QS_MOVE_SEL
Container for move button, which can be hidden.
Definition misc_widget.h:40
WID_QS_DEFAULT
@ WID_QS_DEFAULT
Default button.
Definition misc_widget.h:35
WID_QS_CAPTION
@ WID_QS_CAPTION
Caption of the window.
Definition misc_widget.h:33
WID_QS_TEXT
@ WID_QS_TEXT
Text of the query.
Definition misc_widget.h:34
WID_QS_MOVE
@ WID_QS_MOVE
Move button.
Definition misc_widget.h:39
WID_QS_CANCEL
@ WID_QS_CANCEL
Cancel button.
Definition misc_widget.h:37
WID_QS_DEFAULT_SEL
@ WID_QS_DEFAULT_SEL
Container for default button, which can be hidden.
Definition misc_widget.h:36
WID_QS_OK
@ WID_QS_OK
OK button.
Definition misc_widget.h:38
WWT_EDITBOX
@ WWT_EDITBOX
a textbox for typing
Definition widget_type.h:62
WWT_TEXTBTN
@ WWT_TEXTBTN
(Toggle) Button with text
Definition widget_type.h:44
NWID_SELECTION
@ NWID_SELECTION
Stacked widgets, only one visible at a time (eg in a panel with tabs).
Definition widget_type.h:71
EqualSize
@ EqualSize
Containers should keep all their (resizing) children equally large.
Definition widget_type.h:544

Definition at line 1028 of file misc_gui.cpp.

## ◆ _nested_query_widgets

constexpr std::initializer_list<NWidgetPart> _nested_query_widgets
| staticconstexpr

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_RED),
NWidget(WWT_CAPTION, COLOUR_RED, WID_Q_CAPTION),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_RED),
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0), SetPadding(WidgetDimensions::unscaled.modalpopup),
NWidget(WWT_TEXT, INVALID_COLOUR, WID_Q_TEXT), SetMinimalSize(200, 12),
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize), SetPIP(WidgetDimensions::unscaled.hsep_indent, WidgetDimensions::unscaled.hsep_indent, WidgetDimensions::unscaled.hsep_indent),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_Q_NO), SetMinimalSize(71, 12), SetFill(1, 1), SetStringTip(STR_QUIT_NO),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_Q_YES), SetMinimalSize(71, 12), SetFill(1, 1), SetStringTip(STR_QUIT_YES),
EndContainer(),
EndContainer(),
EndContainer(),
}
WidgetDimensions::unscaled
static const WidgetDimensions unscaled
Unscaled widget dimensions.
Definition window_gui.h:93
WID_Q_NO
@ WID_Q_NO
Yes button.
Definition misc_widget.h:47
WID_Q_YES
@ WID_Q_YES
No button.
Definition misc_widget.h:48
WID_Q_CAPTION
@ WID_Q_CAPTION
Caption of the window.
Definition misc_widget.h:45
WID_Q_TEXT
@ WID_Q_TEXT
Text of the query.
Definition misc_widget.h:46
WWT_PUSHTXTBTN
@ WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition widget_type.h:105
NWID_VERTICAL
@ NWID_VERTICAL
Vertical container.
Definition widget_type.h:68
WWT_TEXT
@ WWT_TEXT
Pure simple text.
Definition widget_type.h:49

Definition at line 1171 of file misc_gui.cpp.

## ◆ _nested_tooltips_widgets

constexpr std::initializer_list<NWidgetPart> _nested_tooltips_widgets
| staticconstexpr

Initial value:
= {
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_TT_BACKGROUND),
}
WID_TT_BACKGROUND
@ WID_TT_BACKGROUND
Background of the window.
Definition misc_widget.h:21

Definition at line 594 of file misc_gui.cpp.