1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 01:49:10 +00:00

(svn r16201) -Codechange: Add NWidgetBase::SetPadding method.

This commit is contained in:
alberth
2009-05-02 16:33:28 +00:00
parent eab4fb07c6
commit 37afd58fdb
2 changed files with 17 additions and 9 deletions

View File

@@ -1636,16 +1636,9 @@ static int MakeNWidget(const NWidgetPart *parts, int count, NWidgetBase **dest,
break;
}
case WPT_PADDING: {
NWidgetBase *nwb = *dest;
if (nwb != NULL) {
nwb->padding_top = parts->u.padding.top;
nwb->padding_right = parts->u.padding.right;
nwb->padding_bottom = parts->u.padding.bottom;
nwb->padding_left = parts->u.padding.left;
}
case WPT_PADDING:
if (*dest != NULL) (*dest)->SetPadding(parts->u.padding.top, parts->u.padding.right, parts->u.padding.bottom, parts->u.padding.left);
break;
}
case WPT_PIPSPACE: {
NWidgetPIPContainer *nwc = dynamic_cast<NWidgetPIPContainer *>(*dest);