|
OpenTTD Source 20260311-master-g511d3794ce
|
Public Member Functions | |
| CompanyButtonLine (CompanyID company_id) | |
| void | Draw (Rect r) const override |
| Draw the button line. | |
| Public Member Functions inherited from ButtonLine | |
| virtual | ~ButtonLine ()=default |
| Ensure the destructor of the sub classes are called as well. | |
| template<typename T, typename... TArgs> | |
| T & | AddButton (TArgs &&... args) |
| ButtonCommon * | GetButton (Rect r, const Point &pt) const |
| Get the button at a given point on the line. | |
| virtual std::optional< EncodedString > | GetTooltip (Rect r, const Point &pt) const |
| Get tooptip for a given point on the line. | |
Private Attributes | |
| CompanyID | company_id |
Additional Inherited Members | |
| Data Fields inherited from ButtonLine | |
| std::vector< std::unique_ptr< ButtonCommon > > | buttons {} |
| Buttons for this line. | |
| Protected Member Functions inherited from ButtonLine | |
| Rect | DrawButtons (Rect r) const |
| Draw the buttons for this line. | |
Definition at line 1456 of file network_gui.cpp.
|
inline |
Definition at line 1458 of file network_gui.cpp.
|
inlineoverridevirtual |
Draw the button line.
| r | Rect to draw within. |
Implements ButtonLine.
Definition at line 1460 of file network_gui.cpp.
References _current_text_dir, Rect::CentreToHeight(), COMPANY_NEW_COMPANY, COMPANY_SPECTATOR, ButtonLine::DrawButtons(), DrawString(), FS_NORMAL, GetCharacterHeight(), GetCompanyPalette(), GetScaledSpriteSize(), GetString(), Rect::Indent(), SA_CENTER, WidgetDimensions::scaled, TD_RTL, and Rect::WithWidth().
|
private |
Definition at line 1480 of file network_gui.cpp.