mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r18223) -Codechange: remove the requirement of having an index for background widgets
This commit is contained in:
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…
Reference in New Issue
Block a user