* Initialization of a 'real' widget. * @param tp Type of the widget. * @param colour Colour of the widget. * @param index Index of the widget. * @param fill_x Default horizontal filling. * @param fill_y Default vertical filling. * @param widget_data Data component of the widget. @see Widget::data * @param tool_tip Tool tip of the widget. @see Widget::tooltip
| 1168 | * @param tool_tip Tool tip of the widget. @see Widget::tooltips |
| 1169 | */ |
| 1170 | NWidgetCore::NWidgetCore(WidgetType tp, Colours colour, WidgetID index, uint fill_x, uint fill_y, const WidgetData &widget_data, StringID tool_tip) : NWidgetResizeBase(tp, index, fill_x, fill_y) |
| 1171 | { |
| 1172 | this->colour = colour; |
| 1173 | this->widget_data = widget_data; |
| 1174 | this->SetToolTip(tool_tip); |
| 1175 | this->text_colour = tp == WWT_CAPTION ? TC_WHITE : TC_BLACK; |
| 1176 | } |
| 1177 | |
| 1178 | /** |
| 1179 | * Set string of the nested widget. |
nothing calls this directly
no test coverage detected