OpenTTD Source 20260206-master-g4d4e37dbf1
ExpensesList Struct Reference

Expense list container. More...

Public Member Functions

 ExpensesList (StringID title, const std::initializer_list< ExpensesType > &list)
uint GetHeight () const
uint GetListWidth () const
 Compute width of the expenses categories in pixels.

Data Fields

const StringID title
 StringID of list title.
const std::initializer_list< ExpensesType > & items
 List of expenses types.

Detailed Description

Expense list container.

Definition at line 90 of file company_gui.cpp.

Constructor & Destructor Documentation

◆ ExpensesList()

ExpensesList::ExpensesList ( StringID title,
const std::initializer_list< ExpensesType > & list )
inline

Definition at line 94 of file company_gui.cpp.

Member Function Documentation

◆ GetHeight()

uint ExpensesList::GetHeight ( ) const
inline

Definition at line 98 of file company_gui.cpp.

◆ GetListWidth()

uint ExpensesList::GetListWidth ( ) const
inline

Compute width of the expenses categories in pixels.

Definition at line 105 of file company_gui.cpp.

References GetStringBoundingBox().

Field Documentation

◆ items

const std::initializer_list<ExpensesType>& ExpensesList::items

List of expenses types.

Definition at line 92 of file company_gui.cpp.

Referenced by DrawCategory(), and DrawYearCategory().

◆ title

const StringID ExpensesList::title

StringID of list title.

Definition at line 91 of file company_gui.cpp.


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