(svn r18223) -Codechange: remove the requirement of having an index for background widgets

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
rubidium 15 years ago
parent 5ad4a5e3e2
commit e7075c7e2b

@ -1375,9 +1375,8 @@ NWidgetCore *NWidgetSpacer::GetWidgetFromPos(int x, int y)
*/
NWidgetBackground::NWidgetBackground(WidgetType tp, Colours colour, int index, NWidgetPIPContainer *child) : NWidgetCore(tp, colour, true, true, 0x0, STR_NULL)
{
this->SetIndex(index);
assert(tp == WWT_PANEL || tp == WWT_INSET || tp == WWT_FRAME);
assert(index >= 0);
if (index >= 0) this->SetIndex(index);
this->child = child;
}

Loading…
Cancel
Save