OpenTTD Source 20241224-master-gf74b0cf984
DropDownListColourItem< TSprite > Class Template Reference

Colour selection list item, with icon and string components. More...

Inheritance diagram for DropDownListColourItem< TSprite >:
DropDownIcon< DropDownString< DropDownListItem > > DropDownString< DropDownListItem > DropDownListItem

Public Member Functions

 DropDownListColourItem (int colour, bool masked)
 
- Public Member Functions inherited from DropDownIcon< DropDownString< DropDownListItem > >
 DropDownIcon (SpriteID sprite, PaletteID palette, Args &&... args)
 
 DropDownIcon (const Dimension &dim, SpriteID sprite, PaletteID palette, Args &&... args)
 
uint Height () const override
 
uint Width () const override
 
void Draw (const Rect &full, const Rect &r, bool sel, Colours bg_colour) const override
 
- Public Member Functions inherited from DropDownString< DropDownListItem >
 DropDownString (StringID string, Args &&... args)
 
 DropDownString (const std::string &string, Args &&... args)
 
void SetString (std::string &&string)
 
uint Height () const override
 
uint Width () const override
 
void Draw (const Rect &full, const Rect &r, bool sel, Colours bg_colour) const override
 
- Public Member Functions inherited from DropDownListItem
 DropDownListItem (int result, bool masked=false, bool shaded=false)
 
virtual bool Selectable () const
 
TextColour GetColour (bool sel) const
 

Additional Inherited Members

- Static Public Member Functions inherited from DropDownString< DropDownListItem >
static bool NatSortFunc (std::unique_ptr< const DropDownListItem > const &first, std::unique_ptr< const DropDownListItem > const &second)
 Natural sorting comparator function for DropDownList::sort().
 
- Data Fields inherited from DropDownListItem
int result
 Result value to return to window on selection.
 
bool masked
 Masked and unselectable item.
 
bool shaded
 Shaded item, affects text colour.
 

Detailed Description

template<SpriteID TSprite = SPR_SQUARE>
class DropDownListColourItem< TSprite >

Colour selection list item, with icon and string components.

Template Parameters
TSpriteRecolourable sprite to draw as icon.

Definition at line 591 of file company_gui.cpp.

Constructor & Destructor Documentation

◆ DropDownListColourItem()

template<SpriteID TSprite = SPR_SQUARE>
DropDownListColourItem< TSprite >::DropDownListColourItem ( int  colour,
bool  masked 
)
inline

Definition at line 593 of file company_gui.cpp.


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