OpenTTD Source  20241121-master-g67a0fccfad
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_colourBackground colour.
btn_colourButton colour.
captionWindow caption string.

Definition at line 415 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(WWT_CLOSEBOX, bg_colour),
NWidget(WWT_CAPTION, bg_colour, WID_GQ_CAPTION), SetDataTip(STR_GOAL_QUESTION_CAPTION_QUESTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PANEL, bg_colour),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_GQ_QUESTION), SetMinimalSize(300, 0), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_3), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
}
static const WidgetDimensions unscaled
Unscaled widget dimensions.
Definition: window_gui.h:67
@ WID_GQ_BUTTON_1
First button.
Definition: goal_widget.h:29
@ WID_GQ_QUESTION
Question text.
Definition: goal_widget.h:27
@ WID_GQ_BUTTON_2
Second button.
Definition: goal_widget.h:30
@ WID_GQ_CAPTION
Caption of the window.
Definition: goal_widget.h:26
@ WID_GQ_BUTTON_3
Third button.
Definition: goal_widget.h:31
@ WID_GQ_BUTTONS
Buttons selection (between 1, 2 or 3).
Definition: goal_widget.h:28
constexpr NWidgetPart SetFill(uint16_t fill_x, uint16_t fill_y)
Widget part function for setting filling.
Definition: widget_type.h:1181
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:1260
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:1228
constexpr NWidgetPart SetDataTip(uint32_t data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1202
constexpr NWidgetPart SetMinimalSize(int16_t x, int16_t y)
Widget part function for setting the minimal size.
Definition: widget_type.h:1137
constexpr NWidgetPart NWidget(WidgetType tp, Colours col, WidgetID idx=-1)
Widget part function for starting a new 'real' widget.
Definition: widget_type.h:1309
constexpr NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition: widget_type.h:1191
@ NC_EQUALSIZE
Value of the NCB_EQUALSIZE flag.
Definition: widget_type.h:524
@ WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition: widget_type.h:112
@ NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:75
@ WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:50
@ WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:61
@ NWID_VERTICAL
Vertical container.
Definition: widget_type.h:77
@ WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:69
@ WWT_EMPTY
Empty widget, place holder to reserve space in widget tree.
Definition: widget_type.h:48
@ NWID_SELECTION
Stacked widgets, only one visible at a time (eg in a panel with tabs).
Definition: widget_type.h:80

Definition at line 416 of file goal_gui.cpp.


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