mirror of https://github.com/OpenTTD/OpenTTD
Codechange: replace last usage of SetDataTip with specific variant
parent
cb18cb5832
commit
60b9eb5cc6
|
@ -1123,17 +1123,6 @@ NWidgetCore::NWidgetCore(WidgetType tp, Colours colour, WidgetID index, uint fil
|
||||||
this->align = SA_CENTER;
|
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.
|
* Set string of the nested widget.
|
||||||
* @param string The new string.
|
* @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));
|
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.
|
* Set the text style of the nested widget.
|
||||||
* @param colour TextColour to use.
|
* @param colour TextColour to use.
|
||||||
|
@ -2770,7 +2768,8 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, WidgetID index, uint32_t
|
||||||
case WWT_RESIZEBOX:
|
case WWT_RESIZEBOX:
|
||||||
this->SetFill(0, 0);
|
this->SetFill(0, 0);
|
||||||
this->SetMinimalSize(WidgetDimensions::WD_RESIZEBOX_WIDTH, 12);
|
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;
|
break;
|
||||||
|
|
||||||
case WWT_CLOSEBOX:
|
case WWT_CLOSEBOX:
|
||||||
|
|
|
@ -372,12 +372,12 @@ class NWidgetCore : public NWidgetResizeBase {
|
||||||
public:
|
public:
|
||||||
NWidgetCore(WidgetType tp, Colours colour, WidgetID index, uint fill_x, uint fill_y, uint32_t widget_data, StringID tool_tip);
|
NWidgetCore(WidgetType tp, Colours colour, WidgetID index, uint fill_x, uint fill_y, uint32_t widget_data, StringID tool_tip);
|
||||||
|
|
||||||
void SetDataTip(uint32_t widget_data, StringID tool_tip);
|
|
||||||
void SetString(StringID string);
|
void SetString(StringID string);
|
||||||
void SetStringTip(StringID string, StringID tool_tip);
|
void SetStringTip(StringID string, StringID tool_tip);
|
||||||
void SetSprite(SpriteID sprite);
|
void SetSprite(SpriteID sprite);
|
||||||
void SetSpriteTip(SpriteID sprite, StringID tool_tip);
|
void SetSpriteTip(SpriteID sprite, StringID tool_tip);
|
||||||
void SetMatrixDimension(uint8_t columns, uint8_t rows);
|
void SetMatrixDimension(uint8_t columns, uint8_t rows);
|
||||||
|
void SetResizeWidgetType(ResizeWidgetValues type);
|
||||||
void SetToolTip(StringID tool_tip);
|
void SetToolTip(StringID tool_tip);
|
||||||
StringID GetToolTip() const;
|
StringID GetToolTip() const;
|
||||||
void SetTextStyle(TextColour colour, FontSize size);
|
void SetTextStyle(TextColour colour, FontSize size);
|
||||||
|
|
Loading…
Reference in New Issue