OpenTTD Source  20240915-master-g3784a3d3d6
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 Types

enum  WidgetDrawDistances {
  WD_SHADEBOX_WIDTH = 12, WD_STICKYBOX_WIDTH = 12, WD_DEBUGBOX_WIDTH = 12, WD_DEFSIZEBOX_WIDTH = 12,
  WD_RESIZEBOX_WIDTH = 12, WD_CLOSEBOX_WIDTH = 11, WD_CAPTION_HEIGHT = 14, WD_DROPDOWN_HEIGHT = 12
}
 Distances used in drawing widgets. More...
 

Private Attributes

friend NWidgetLeaf
 

Detailed Description

Definition at line 34 of file window_gui.h.

Member Enumeration Documentation

◆ WidgetDrawDistances

Distances used in drawing widgets.

These constants should not be used elsewhere, use scaled/unscaled WidgetDimensions instead.

Enumerator
WD_SHADEBOX_WIDTH 

Minimum width of a standard shade box widget.

WD_STICKYBOX_WIDTH 

Minimum width of a standard sticky box widget.

WD_DEBUGBOX_WIDTH 

Minimum width of a standard debug box widget.

WD_DEFSIZEBOX_WIDTH 

Minimum width of a standard defsize box widget.

WD_RESIZEBOX_WIDTH 

Minimum width of a resize box widget.

WD_CLOSEBOX_WIDTH 

Minimum width of a close box widget.

WD_CAPTION_HEIGHT 

Minimum height of a title bar.

WD_DROPDOWN_HEIGHT 

Minimum height of a drop down widget.

Definition at line 84 of file window_gui.h.


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