Changeset - r28120:a498e2364ad4
[Not reviewed]
master
0 2 0
Peter Nelson - 13 months ago 2023-10-25 00:04:42
peter1138@openttd.org
Add: WidgetDimensions for 'sparse' widget windows.

These are for windows that have space between widgets instead of being clumped together.
2 files changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -152,9 +152,12 @@ const WidgetDimensions WidgetDimensions:
 
	{WD_DROPDOWNTEXT_LEFT, WD_DROPDOWNTEXT_TOP, WD_DROPDOWNTEXT_RIGHT, WD_DROPDOWNTEXT_BOTTOM}, ///< dropdowntext
 
	{20, 10, 20, 10},    ///< modalpopup
 
	{3, 3, 3, 3},        ///< picker
 
	{10, 8, 10, 8},      ///< sparse window padding
 
	{10, 8, 10, 1},      ///< resizable sparse window padding
 
	1,                   ///< pressed
 
	1,                   ///< vsep_picker
 
	WD_PAR_VSEP_NORMAL,  ///< vsep_normal
 
	4,                   ///< vsep_sparse
 
	WD_PAR_VSEP_WIDE,    ///< vsep_wide
 
	2,                   ///< hsep_normal
 
	6,                   ///< hsep_wide
src/window_gui.h
Show inline comments
 
@@ -51,10 +51,13 @@ struct WidgetDimensions {
 
	RectPadding dropdowntext; ///< Offsets of text within a dropdown widget.
 
	RectPadding modalpopup;   ///< Padding for a modal popup.
 
	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 pressed;              ///< Offset for contents of depressed widget.
 
	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.
0 comments (0 inline, 0 general)