OpenTTD Source: CompanyButtonLine Class Reference

OpenTTD Source 15.3

Public Member Functions | Private Attributes
CompanyButtonLine Class Reference
Inheritance diagram for CompanyButtonLine:

## Public Member Functions
| CompanyButtonLine (CompanyID company_id)
void | Draw (Rect r) const override
| Draw the button 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.
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.

## Detailed Description

Definition at line 1457 of file network_gui.cpp.

## Constructor & Destructor Documentation

## ◆ CompanyButtonLine()

CompanyButtonLine::CompanyButtonLine | ( | CompanyID | company_id | ) |
| inline

Definition at line 1459 of file network_gui.cpp.

## Member Function Documentation

## ◆ Draw()

void CompanyButtonLine::Draw | ( | Rect | r | ) | const
| inlineoverridevirtual

Draw the button line.

Parameters

  r | Rect to draw within.

Implements ButtonLine.

Definition at line 1461 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(), WidgetDimensions::hsep_normal, Rect::Indent(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), SA_CENTER, WidgetDimensions::scaled, TD_RTL, and Rect::WithWidth().

## Field Documentation

## ◆ company_id

CompanyID CompanyButtonLine::company_id
| private

Definition at line 1481 of file network_gui.cpp.

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

- src/network/network_gui.cpp