mirror of https://github.com/OpenTTD/OpenTTD
Codechange: make direct access to tooltip/widget_data protected
parent
e543768570
commit
532f7de1f8
|
@ -3142,7 +3142,7 @@ static bool IsAttributeWidgetPartType(WidgetType tp)
|
|||
* @param dest NWidget to apply attribute to.
|
||||
* @pre NWidgetPart must be an attribute NWidgetPart.
|
||||
*/
|
||||
static void ApplyNWidgetPartAttribute(const NWidgetPart &nwid, NWidgetBase *dest)
|
||||
void ApplyNWidgetPartAttribute(const NWidgetPart &nwid, NWidgetBase *dest)
|
||||
{
|
||||
switch (nwid.type) {
|
||||
case WPT_RESIZE: {
|
||||
|
|
|
@ -400,14 +400,18 @@ public:
|
|||
|
||||
NWidgetDisplay disp_flags; ///< Flags that affect display and interaction with the widget.
|
||||
Colours colour; ///< Colour of this widget.
|
||||
protected:
|
||||
const WidgetID index; ///< Index of the nested widget (\c -1 means 'not used').
|
||||
WidgetData widget_data; ///< Data of the widget. @see Widget::data
|
||||
StringID tool_tip; ///< Tooltip of the widget. @see Widget::tootips
|
||||
StringID tool_tip; ///< Tooltip of the widget. @see Widget::tool_tips
|
||||
WidgetID scrollbar_index; ///< Index of an attached scrollbar.
|
||||
TextColour highlight_colour; ///< Colour of highlight.
|
||||
TextColour text_colour; ///< Colour of text within widget.
|
||||
FontSize text_size; ///< Size of text within widget.
|
||||
StringAlignment align; ///< Alignment of text/image within widget.
|
||||
|
||||
/* This function constructs the widgets, so it should be able to write the variables. */
|
||||
friend void ApplyNWidgetPartAttribute(const struct NWidgetPart &nwid, NWidgetBase *dest);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue