1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +01:00

Codechange: replace last usage of SetDataTip with specific variant

This commit is contained in:
Rubidium
2025-01-03 12:28:13 +01:00
committed by rubidium42
parent cb18cb5832
commit 60b9eb5cc6
2 changed files with 12 additions and 13 deletions

View File

@@ -1123,17 +1123,6 @@ NWidgetCore::NWidgetCore(WidgetType tp, Colours colour, WidgetID index, uint fil
this->align = SA_CENTER;
}
/**
* Set data and tool tip of the nested widget.
* @param widget_data Data to use.
* @param tool_tip Tool tip string to use.
*/
void NWidgetCore::SetDataTip(uint32_t widget_data, StringID tool_tip)
{
this->widget_data = widget_data;
this->tool_tip = tool_tip;
}
/**
* Set string of the nested widget.
* @param string The new string.
@@ -1184,6 +1173,15 @@ void NWidgetCore::SetMatrixDimension(uint8_t columns, uint8_t rows)
this->widget_data = static_cast<uint32_t>((rows << MAT_ROW_START) | (columns << MAT_COL_START));
}
/**
* Set the resize widget type of the nested widget.
* @param type The new resize widget.
*/
void NWidgetCore::SetResizeWidgetType(ResizeWidgetValues type)
{
this->widget_data = type;
}
/**
* Set the text style of the nested widget.
* @param colour TextColour to use.
@@ -2770,7 +2768,8 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, WidgetID index, uint32_t
case WWT_RESIZEBOX:
this->SetFill(0, 0);
this->SetMinimalSize(WidgetDimensions::WD_RESIZEBOX_WIDTH, 12);
this->SetDataTip(RWV_SHOW_BEVEL, STR_TOOLTIP_RESIZE);
this->SetResizeWidgetType(RWV_SHOW_BEVEL);
this->SetToolTip(STR_TOOLTIP_RESIZE);
break;
case WWT_CLOSEBOX: