OpenTTD Source: LegendAndColour Struct Reference

OpenTTD Source 15.0-beta1

Data Fields
LegendAndColour Struct Reference

Structure for holding relevant data for legends in small map. More...

## Data Fields
uint8_t | colour
| Colour of the item on the map.
StringID | legend
| String corresponding to the coloured item.
IndustryType | type
| Type of industry. Only valid for industry entries.
uint8_t | height
| Height in tiles. Only valid for height legend entries.
CompanyID | company
| Company to display. Only valid for company entries of the owner legend.
bool | show_on_map
| For filtering industries, if `true`, industry is shown on the map in colour.
bool | end
| This is the end of the list.
bool | col_break
| Perform a column break and go further at the next column.

## Detailed Description

Structure for holding relevant data for legends in small map.

Definition at line 46 of file smallmap_gui.cpp.

## Field Documentation

## ◆ col_break

bool LegendAndColour::col_break

Perform a column break and go further at the next column.

Definition at line 54 of file smallmap_gui.cpp.

Referenced by BuildIndustriesLegend(), BuildLandLegend(), BuildLinkStatsLegend(), and BuildOwnerLegend().

## ◆ colour

uint8_t LegendAndColour::colour

Colour of the item on the map.

Definition at line 47 of file smallmap_gui.cpp.

Referenced by BuildIndustriesLegend(), BuildLandLegend(), BuildLinkStatsLegend(), and BuildOwnerLegend().

## ◆ company

CompanyID LegendAndColour::company

Company to display. Only valid for company entries of the owner legend.

Definition at line 51 of file smallmap_gui.cpp.

Referenced by BuildOwnerLegend().

## ◆ end

bool LegendAndColour::end

This is the end of the list.

Definition at line 53 of file smallmap_gui.cpp.

Referenced by BuildIndustriesLegend(), BuildLandLegend(), BuildLinkStatsLegend(), BuildOwnerLegend(), SmallMapWindow::DrawWidget(), SmallMapWindow::OnClick(), SmallMapWindow::OnInit(), and SmallMapWindow::OnPaint().

## ◆ height

uint8_t LegendAndColour::height

Height in tiles. Only valid for height legend entries.

Definition at line 50 of file smallmap_gui.cpp.

Referenced by BuildLandLegend().

## ◆ legend

StringID LegendAndColour::legend

String corresponding to the coloured item.

Definition at line 48 of file smallmap_gui.cpp.

Referenced by BuildIndustriesLegend(), BuildLinkStatsLegend(), SmallMapWindow::DrawIndustryNames(), and SmallMapWindow::OnClick().

## ◆ show_on_map

bool LegendAndColour::show_on_map

For filtering industries, if `true`, industry is shown on the map in colour.

Definition at line 52 of file smallmap_gui.cpp.

Referenced by BuildIndustriesLegend(), BuildLinkStatsLegend(), BuildOwnerLegend(), SmallMapWindow::DrawIndustryNames(), SmallMapWindow::OnClick(), SmallMapWindow::OnInvalidateData(), and SmallMapWindow::SelectLegendItem().

## ◆ type

IndustryType LegendAndColour::type

Type of industry. Only valid for industry entries.

Definition at line 49 of file smallmap_gui.cpp.

Referenced by BuildIndustriesLegend(), BuildLinkStatsLegend(), SmallMapWindow::DrawIndustryNames(), and SmallMapWindow::OnMouseOver().

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

- src/smallmap_gui.cpp