|
OpenTTD Source 20251104-master-g3befbdd52f
|
Public Member Functions | |
| ClientButtonLine (ClientPoolID client_pool_id) | |
| void | Draw (Rect r) const override |
| Draw the button line. | |
| std::optional< EncodedString > | GetTooltip (Rect r, const Point &pt) const override |
| Get tooptip for a given point on the line. | |
Public Member Functions inherited from ButtonLine | |
| 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. | |
Private Attributes | |
| ClientPoolID | client_pool_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 1484 of file network_gui.cpp.
|
inline |
Definition at line 1486 of file network_gui.cpp.
|
inlineoverridevirtual |
Draw the button line.
| r | Rect to draw within. |
Implements ButtonLine.
Definition at line 1488 of file network_gui.cpp.
References _current_text_dir, _network_own_client_id, Rect::CentreToHeight(), NetworkClientInfo::client_id, CLIENT_ID_SERVER, NetworkClientInfo::client_name, ButtonLine::DrawButtons(), DrawString(), FS_NORMAL, GetCharacterHeight(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_networkclientinfo_pool >::GetIfValid(), GetScaledSpriteSize(), GetString(), WidgetDimensions::hsep_normal, Rect::Indent(), SA_CENTER, WidgetDimensions::scaled, TD_RTL, and Rect::WithWidth().
|
inlineoverridevirtual |
Get tooptip for a given point on the line.
| r | Rect of line. |
| pt | Point of interest. |
std::nullopt if none. Reimplemented from ButtonLine.
Definition at line 1514 of file network_gui.cpp.
References _current_text_dir, _network_own_client_id, NetworkClientInfo::client_id, CLIENT_ID_SERVER, Rect::Contains(), GetEncodedString(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_networkclientinfo_pool >::GetIfValid(), GetScaledSpriteSize(), ButtonLine::GetTooltip(), TD_RTL, and Rect::WithWidth().
|
private |
Definition at line 1534 of file network_gui.cpp.