OpenTTD Source  20241108-master-g80f628063a
WidgetDimensions Class Reference

Data Fields

RectPadding imgbtn
 Padding around image button image.
 
RectPadding inset
 Padding inside inset container.
 
RectPadding vscrollbar
 Padding inside vertical scrollbar buttons.
 
RectPadding hscrollbar
 Padding inside horizontal scrollbar buttons.
 
RectPadding bevel
 Bevel thickness, affected by "scaled bevels" game option.
 
RectPadding fullbevel
 Always-scaled bevel thickness.
 
RectPadding framerect
 Standard padding inside many panels.
 
RectPadding frametext
 Padding inside frame with text.
 
RectPadding matrix
 Padding of WWT_MATRIX items.
 
RectPadding shadebox
 Padding around image in shadebox widget.
 
RectPadding stickybox
 Padding around image in stickybox widget.
 
RectPadding debugbox
 Padding around image in debugbox widget.
 
RectPadding defsizebox
 Padding around image in defsizebox widget.
 
RectPadding resizebox
 Padding around image in resizebox widget.
 
RectPadding closebox
 Padding around image in closebox widget.
 
RectPadding captiontext
 Padding for text within caption widget.
 
RectPadding dropdowntext
 Padding of drop down list item.
 
RectPadding dropdownlist
 Padding of complete drop down list.
 
RectPadding modalpopup
 Spacing for popup warning/information windows.
 
RectPadding picker
 Padding for a picker (dock, station, etc) window.
 
RectPadding sparse
 Padding used for 'sparse' widget window, usually containing multiple frames.
 
RectPadding sparse_resize
 Padding used for a resizeable 'sparse' widget window, usually containing multiple frames.
 
int vsep_picker
 Vertical spacing of picker-window widgets.
 
int vsep_normal
 Normal vertical spacing.
 
int vsep_sparse
 Normal vertical spacing for 'sparse' widget window.
 
int vsep_wide
 Wide vertical spacing.
 
int hsep_normal
 Normal horizontal spacing.
 
int hsep_wide
 Wide horizontal spacing.
 
int hsep_indent
 Width of identation for tree layouts.
 

Static Public Attributes

static const WidgetDimensions unscaled
 Unscaled widget dimensions.
 
static WidgetDimensions scaled = {}
 Widget dimensions scaled for current zoom level.
 
static constexpr float ASPECT_LOCATION = 12.f / 14.f
 
static constexpr float ASPECT_RENAME = 12.f / 14.f
 
static constexpr float ASPECT_SETTINGS_BUTTON = 21.f / 12.f
 
static constexpr float ASPECT_TOGGLE_SIZE = 12.f / 14.f
 
static constexpr float ASPECT_LEFT_RIGHT_BUTTON = 8.f / 12.f
 
static constexpr float ASPECT_UP_DOWN_BUTTON = 11.f / 12.f
 
static constexpr float ASPECT_VEHICLE_ICON = 15.f / 12.f
 
static constexpr float ASPECT_VEHICLE_FLAG = 11.f / 12.f
 

Private Attributes

friend NWidgetLeaf
 

Static Private Attributes

static constexpr uint WD_SHADEBOX_WIDTH = 12
 Distances used in drawing widgets. More...
 
static constexpr uint WD_STICKYBOX_WIDTH = 12
 Minimum width of a standard sticky box widget.
 
static constexpr uint WD_DEBUGBOX_WIDTH = 12
 Minimum width of a standard debug box widget.
 
static constexpr uint WD_DEFSIZEBOX_WIDTH = 12
 Minimum width of a standard defsize box widget.
 
static constexpr uint WD_RESIZEBOX_WIDTH = 12
 Minimum width of a resize box widget.
 
static constexpr uint WD_CLOSEBOX_WIDTH = 11
 Minimum width of a close box widget.
 
static constexpr uint WD_CAPTION_HEIGHT = 14
 Minimum height of a title bar.
 
static constexpr uint WD_DROPDOWN_HEIGHT = 12
 Minimum height of a drop down widget.
 

Detailed Description

Definition at line 34 of file window_gui.h.

Field Documentation

◆ WD_SHADEBOX_WIDTH

constexpr uint WidgetDimensions::WD_SHADEBOX_WIDTH = 12
staticconstexprprivate

Distances used in drawing widgets.

These constants should not be used elsewhere, use scaled/unscaled WidgetDimensions instead. Minimum width of a standard shade box widget.

Definition at line 84 of file window_gui.h.


The documentation for this class was generated from the following files: