OpenTTD Source 20260206-master-g4d4e37dbf1
ClientButtonLine Class Reference
Inheritance diagram for ClientButtonLine:
ButtonLine

Public Member Functions

 ClientButtonLine (ClientPoolID client_pool_id)
void Draw (Rect r) const override
 Draw the button line.
std::optional< EncodedStringGetTooltip (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)
ButtonCommonGetButton (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.

Detailed Description

Definition at line 1484 of file network_gui.cpp.

Constructor & Destructor Documentation

◆ ClientButtonLine()

ClientButtonLine::ClientButtonLine ( ClientPoolID client_pool_id)
inline

Definition at line 1486 of file network_gui.cpp.

Member Function Documentation

◆ Draw()

◆ GetTooltip()

std::optional< EncodedString > ClientButtonLine::GetTooltip ( Rect r,
const Point & pt ) const
inlineoverridevirtual

Get tooptip for a given point on the line.

Parameters
rRect of line.
ptPoint of interest.
Returns
EncodedString of tooltip, or 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(), GetScaledSpriteSize(), ButtonLine::GetTooltip(), Point, TD_RTL, and Rect::WithWidth().

Field Documentation

◆ client_pool_id

ClientPoolID ClientButtonLine::client_pool_id
private

Definition at line 1534 of file network_gui.cpp.


The documentation for this class was generated from the following file: