(svn r25531) -Codechange: Use separate function to set data of WWT_MATRIX widgets.

This commit is contained in:
frosch
2013-06-30 14:32:31 +00:00
parent 631540c400
commit 98fdd20f84
17 changed files with 37 additions and 25 deletions

View File

@@ -1020,6 +1020,18 @@ static inline NWidgetPart SetDataTip(uint16 data, StringID tip)
return part;
}
/**
* Widget part function for setting the data and tooltip of WWT_MATRIX widgets
* @param cols Number of columns.
* @param rows Number of rows.
* @param tip Tooltip of the widget.
* @ingroup NestedWidgetParts
*/
static inline NWidgetPart SetMatrixDataTip(uint8 cols, uint8 rows, StringID tip)
{
return SetDataTip((rows << MAT_ROW_START) | (cols << MAT_COL_START), tip);
}
/**
* Widget part function for setting additional space around a widget.
* Parameters start above the widget, and are specified in clock-wise direction.