summaryrefslogtreecommitdiff
path: root/src/widget_type.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-16 16:22:23 +0000
committeralberth <alberth@openttd.org>2009-07-16 16:22:23 +0000
commitd0a47fc1b417d697175b751d3236f66c4e325e91 (patch)
tree13681f47fc388cc4b331c11eca22c08c1b06fe83 /src/widget_type.h
parent3cba03c5eb540f3a29aee96a6d8426ab297aed9d (diff)
downloadopenttd-d0a47fc1b417d697175b751d3236f66c4e325e91.tar.xz
(svn r16845) -Codechange: Introduction of constants for describing the bits in a WWT_MATRIX data field.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r--src/widget_type.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/widget_type.h b/src/widget_type.h
index 8a496d9a8..20c89e6e6 100644
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -65,6 +65,17 @@ enum {
WIDGET_LIST_END = -1, ///< indicate the end of widgets' list for vararg functions
};
+/** Bits of the #WWT_MATRIX widget data. */
+enum MatrixWidgetValues {
+ /* Number of column bits of the WWT_MATRIX widget data. */
+ MAT_COL_START = 0, ///< Lowest bit of the number of columns.
+ MAT_COL_BITS = 8, ///< Number of bits for the number of columns in the matrix.
+
+ /* Number of row bits of the WWT_MATRIX widget data. */
+ MAT_ROW_START = 8, ///< Lowest bit of the number of rows.
+ MAT_ROW_BITS = 8, ///< Number of bits for the number of rows in the matrix.
+};
+
/**
* Window widget types, nested widget types, and nested widget part types.
*/
@@ -81,7 +92,7 @@ enum WidgetType {
WWT_TEXTBTN_2, ///< Button with diff text when clicked
WWT_LABEL, ///< Centered label
WWT_TEXT, ///< Pure simple text
- WWT_MATRIX, ///< Grid of rows and columns. Lower 8 bit of the widget data are the number of columns, upper 8 bit are the number of rows.
+ WWT_MATRIX, ///< Grid of rows and columns. @see MatrixWidgetValues
WWT_SCROLLBAR, ///< Vertical scrollbar
WWT_FRAME, ///< Frame
WWT_CAPTION, ///< Window caption (window title between closebox and stickybox)