forked from mirror/OpenTTD
Codechange: add and use SetSprite over directly accessing widget_data
This commit is contained in:
@@ -1134,6 +1134,15 @@ void NWidgetCore::SetDataTip(uint32_t widget_data, StringID tool_tip)
|
||||
this->tool_tip = tool_tip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set sprite of the nested widget.
|
||||
* @param sprite The new sprite.
|
||||
*/
|
||||
void NWidgetCore::SetSprite(SpriteID sprite)
|
||||
{
|
||||
this->widget_data = sprite;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the text style of the nested widget.
|
||||
* @param colour TextColour to use.
|
||||
|
Reference in New Issue
Block a user