OpenTTD Source 20260421-master-gc2fbc6fdeb
CompanyButtonLine Class Reference

A line in the NetworkClientList with a company on it. More...

Inheritance diagram for CompanyButtonLine:
ButtonLine

Public Member Functions

 CompanyButtonLine (CompanyID company_id)
 Create the line.
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>
TAddButton (TArgs &&... args)
 Construct a button and add it.
ButtonCommonGetButton (Rect r, const Point &pt) const
 Get the button at a given point on the line.
virtual std::optional< EncodedStringGetTooltip (Rect r, const Point &pt) const
 Get tooptip for a given point on the line.

Private Attributes

CompanyID company_id
 The company to show on the line.

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

A line in the NetworkClientList with a company on it.

Definition at line 1508 of file network_gui.cpp.

Constructor & Destructor Documentation

◆ CompanyButtonLine()

CompanyButtonLine::CompanyButtonLine ( CompanyID company_id)
inline

Create the line.

Parameters
company_idThe company to show on the line.

Definition at line 1514 of file network_gui.cpp.

References company_id.

Member Function Documentation

◆ Draw()

void CompanyButtonLine::Draw ( Rect r) const
inlineoverridevirtual

Field Documentation

◆ company_id

CompanyID CompanyButtonLine::company_id
private

The company to show on the line.

Definition at line 1536 of file network_gui.cpp.

Referenced by CompanyButtonLine(), and Draw().


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