OpenTTD Source: NestedGoalWidgets< bg_colour, btn_colour, caption > Struct Template Reference

OpenTTD Source 15.0-RC2

Static Public Attributes
NestedGoalWidgets< bg_colour, btn_colour, caption > Struct Template Reference

Widgets of the goal question window. More...

## Static Public Attributes
static constexpr auto | widgetparts

## Detailed Description

template<Colours bg_colour, Colours btn_colour, StringID caption>
struct NestedGoalWidgets< bg_colour, btn_colour, caption >

Widgets of the goal question window.

Template Parameters

  bg_colour | Background colour.
  btn_colour | Button colour.
  caption | Window caption string.

Definition at line 408 of file goal_gui.cpp.

## Field Documentation

## ◆ widgetparts

template<Colours bg_colour, Colours btn_colour, StringID caption>

constexpr auto NestedGoalWidgets< bg_colour, btn_colour, caption >::widgetparts
| staticconstexpr

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, bg_colour),
NWidget(WWT_CAPTION, bg_colour, WID_GQ_CAPTION), SetStringTip(caption, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(),
NWidget(WWT_PANEL, bg_colour),
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.modalpopup), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_GQ_QUESTION), SetMinimalSize(300, 0), SetFill(1, 0),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GQ_BUTTONS),
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize), SetPIP(85, WidgetDimensions::unscaled.hsep_wide, 85),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_1), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize), SetPIP(65, WidgetDimensions::unscaled.hsep_wide, 65),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_1), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_2), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize), SetPIP(25, WidgetDimensions::unscaled.hsep_wide, 25),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_1), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_2), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_3), SetFill(1, 0),
EndContainer(),
EndContainer(),
EndContainer(),
EndContainer(),
}
WidgetDimensions::unscaled
static const WidgetDimensions unscaled
Unscaled widget dimensions.
Definition window_gui.h:93
WID_GQ_BUTTON_1
@ WID_GQ_BUTTON_1
First button.
Definition goal_widget.h:29
WID_GQ_QUESTION
@ WID_GQ_QUESTION
Question text.
Definition goal_widget.h:27
WID_GQ_BUTTON_2
@ WID_GQ_BUTTON_2
Second button.
Definition goal_widget.h:30
WID_GQ_CAPTION
@ WID_GQ_CAPTION
Caption of the window.
Definition goal_widget.h:26
WID_GQ_BUTTON_3
@ WID_GQ_BUTTON_3
Third button.
Definition goal_widget.h:31
WID_GQ_BUTTONS
@ WID_GQ_BUTTONS
Buttons selection (between 1, 2 or 3).
Definition goal_widget.h:28
SetFill
constexpr NWidgetPart SetFill(uint16_t fill_x, uint16_t fill_y)
Widget part function for setting filling.
Definition widget_type.h:1219
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:1375
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:1332
SetStringTip
constexpr NWidgetPart SetStringTip(StringID string, StringID tip={})
Widget part function for setting the string and tooltip.
Definition widget_type.h:1240
SetMinimalSize
constexpr NWidgetPart SetMinimalSize(int16_t x, int16_t y)
Widget part function for setting the minimal size.
Definition widget_type.h:1156
EndContainer
constexpr NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition widget_type.h:1229
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:1424
WWT_PUSHTXTBTN
@ WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition widget_type.h:104
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
NWID_VERTICAL
@ NWID_VERTICAL
Vertical container.
Definition widget_type.h:68
WWT_CLOSEBOX
@ WWT_CLOSEBOX
Close box (at top-left of a window)
Definition widget_type.h:60
WWT_EMPTY
@ WWT_EMPTY
Empty widget, place holder to reserve space in widget tree.
Definition widget_type.h:37
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:541

Definition at line 409 of file goal_gui.cpp.

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

- src/goal_gui.cpp