(svn r18273) -Codechange: do not require widget numbers for default widgets (close, sticky, resize buttons and the caption), except when you want to use SetStringParameter for the caption ofcourse. Also remove the requirement for some of the WDF flags; no need to test for both the flag whether a feature is used and whether the feature is in action.
This commit is contained in:
@@ -1693,7 +1693,7 @@ Dimension NWidgetLeaf::closebox_dimension = {0, 0};
|
||||
*/
|
||||
NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, int index, uint16 data, StringID tip) : NWidgetCore(tp, colour, 1, 1, data, tip)
|
||||
{
|
||||
assert(index >= 0 || tp == WWT_LABEL || tp == WWT_TEXT);
|
||||
assert(index >= 0 || tp == WWT_LABEL || tp == WWT_TEXT || tp == WWT_CAPTION || tp == WWT_RESIZEBOX || tp == WWT_STICKYBOX || tp == WWT_CLOSEBOX);
|
||||
if (index >= 0) this->SetIndex(index);
|
||||
this->SetMinimalSize(0, 0);
|
||||
this->SetResize(0, 0);
|
||||
|
Reference in New Issue
Block a user