Codechange: add and use SetSprite over directly accessing widget_data

This commit is contained in:
Rubidium
2025-01-02 12:51:56 +01:00
committed by rubidium42
parent 9ac1bad480
commit fb06ddafba
8 changed files with 43 additions and 33 deletions

View File

@@ -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.