Twitch SDK (Internal)
Public Member Functions | Public Attributes | List of all members
ttv::chat::BadgeSet Struct Reference

#include <chattypes.h>

Public Member Functions

TTV_ErrorCode FindBadge (const MessageBadge &badge, BadgeVersion &result) const
 
TTV_ErrorCode FindBadgeImage (const MessageBadge &badge, float scale, BadgeImage &result) const
 

Public Attributes

std::string language
 The language of the badge details. More...
 
std::map< std::string, Badgebadges
 The badges in the badge set, keyed by badge name. More...
 

Detailed Description

BadgeSet - A collection of badges that apply to a context.

Member Function Documentation

◆ FindBadge()

TTV_ErrorCode ttv::chat::BadgeSet::FindBadge ( const MessageBadge badge,
BadgeVersion result 
) const

Finds the corresponding BadgeVersion for the corresponding badge. Returns: TTV_EC_SUCCESS if found and copies into result. TTV_EC_NOT_AVAILABLE if not found in this badge set.

◆ FindBadgeImage()

TTV_ErrorCode ttv::chat::BadgeSet::FindBadgeImage ( const MessageBadge badge,
float  scale,
BadgeImage result 
) const

Finds the closest matching badge image for the given scale, if the badge exists in the given badge set. Returns: TTV_EC_SUCCESS if found and copies into result. TTV_EC_NOT_AVAILABLE if not found in this badge set.

Member Data Documentation

◆ badges

std::map<std::string, Badge> ttv::chat::BadgeSet::badges

The badges in the badge set, keyed by badge name.

◆ language

std::string ttv::chat::BadgeSet::language

The language of the badge details.


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