OpenTTD Source: Badge Class Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Data Fields
Badge Class Reference

## Public Member Functions
| Badge (std::string_view label, BadgeID index, BadgeClassID class_index)

## Data Fields
std::string | label
| Label of badge.
BadgeID | index
| Index assigned to badge.
BadgeClassID | class_index
| Index of class this badge belongs to.
BadgeFlags | flags = {}
| Display flags.
StringID | name = 0
| Short name.
GrfSpecFeatures | features {}
| Bitmask of which features use this badge.
VariableGRFFileProps< GrfSpecFeature > | grf_prop
| Sprite information.

## Detailed Description

Definition at line 20 of file newgrf_badge.h.

## Constructor & Destructor Documentation

## ◆ Badge()

Badge::Badge | ( | std::string_view | label,
|  | BadgeID | index,
|  | BadgeClassID | class_index
| ) |  |
| inline

Definition at line 30 of file newgrf_badge.h.

## Field Documentation

## ◆ class_index

BadgeClassID Badge::class_index

Index of class this badge belongs to.

Definition at line 24 of file newgrf_badge.h.

Referenced by DrawBadgeColumn(), DrawBadgeNameList(), NWidgetBadgeFilter::GetDropDownList(), GetOrCreateBadge(), SetBadgeFilter(), and UsedBadgeClasses::UsedBadgeClasses().

## ◆ features

GrfSpecFeatures Badge::features {}

Bitmask of which features use this badge.

Definition at line 27 of file newgrf_badge.h.

Referenced by AddBadgeClassesToConfiguration(), AppendCopyableBadgeList(), ApplyBadgeFeaturesToClassBadges(), FinaliseBadges(), NWidgetBadgeFilter::GetDropDownList(), MarkBadgeSeen(), and UsedBadgeClasses::UsedBadgeClasses().

## ◆ flags

BadgeFlags Badge::flags = {}

Display flags.

Definition at line 25 of file newgrf_badge.h.

Referenced by AppendCopyableBadgeList(), ApplyBadgeFeaturesToClassBadges(), DrawBadgeNameList(), and GetBadgeSprite().

## ◆ grf_prop

VariableGRFFileProps<GrfSpecFeature> Badge::grf_prop

Sprite information.

Definition at line 28 of file newgrf_badge.h.

Referenced by BadgeResolverObject::BadgeResolverObject().

## ◆ index

BadgeID Badge::index

Index assigned to badge.

Definition at line 23 of file newgrf_badge.h.

Referenced by FinaliseBadges(), BadgeResolverObject::GetDebugID(), and NWidgetBadgeFilter::GetDropDownList().

## ◆ label

std::string Badge::label

Label of badge.

Definition at line 22 of file newgrf_badge.h.

Referenced by AddBadgeClassesToConfiguration(), NewGRFInspectWindow::DrawMainPanelWidget(), GetBadgeByLabel(), GetOrCreateBadge(), GUIBadgeClasses::GUIBadgeClasses(), ResetBadgeClassConfiguration(), and UsedBadgeClasses::UsedBadgeClasses().

## ◆ name

StringID Badge::name = 0

Short name.

Definition at line 26 of file newgrf_badge.h.

Referenced by AddBadgeClassesToConfiguration(), DrawBadgeNameList(), NewGRFInspectWindow::DrawMainPanelWidget(), NWidgetBadgeFilter::GetDropDownList(), GUIBadgeClasses::GUIBadgeClasses(), and ResetBadgeClassConfiguration().

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

- src/newgrf_badge.h