OpenTTD Source 20250328-master-gc3457cd4c0
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 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(), GetOrCreateBadge(), 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 AppendCopyableBadgeList(), ApplyBadgeFeaturesToClassBadges(), FinaliseBadges(), MarkBadgeSeen(), and UsedBadgeClasses::UsedBadgeClasses().

◆ flags

BadgeFlags Badge::flags = {}

Display flags.

Definition at line 25 of file newgrf_badge.h.

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

◆ grf_prop

VariableGRFFileProps 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(), and BadgeResolverObject::GetDebugID().

◆ label

◆ name

StringID Badge::name = 0

Short name.

Definition at line 26 of file newgrf_badge.h.

Referenced by DrawBadgeNameList(), and NewGRFInspectWindow::DrawMainPanelWidget().


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