Struct Badge
Represents an in-game badge.
Inherited Members
Namespace: Exiled.API.Features
Assembly: Exiled.API.dll
Syntax
public struct Badge
Constructors
| Improve this Doc View SourceBadge(String, String, Boolean)
Initializes a new instance of the Badge struct.
Declaration
public Badge(string text, string color, bool isGlobal = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The badge text. |
System.String | color | The badge color. |
System.Boolean | isGlobal | Indicates whether the badge is global or not. |
Properties
| Improve this Doc View SourceColor
Gets the badge color.
Declaration
public readonly string Color { get; }
Property Value
Type | Description |
---|---|
System.String |
IsGlobal
Gets a value indicating whether the badge is global or not.
Declaration
public readonly bool IsGlobal { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Text
Gets the badge text.
Declaration
public readonly string Text { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceGetHexColor(Misc.PlayerInfoColorTypes)
Gets the hex color code of the provided Misc.PlayerInfoColorTypes.
Declaration
public static string GetHexColor(Misc.PlayerInfoColorTypes colorType)
Parameters
Type | Name | Description |
---|---|---|
Misc.PlayerInfoColorTypes | colorType | The Misc.PlayerInfoColorTypes to get the hex color code of. |
Returns
Type | Description |
---|---|
System.String | The hex color code, including the |
IsValidColor(String, out Nullable<Misc.PlayerInfoColorTypes>)
Gets whether or not the provided hex color code can be used in badges.
Declaration
public static bool IsValidColor(string hex, out Misc.PlayerInfoColorTypes? colorType)
Parameters
Type | Name | Description |
---|---|---|
System.String | hex | The hex color code, including the |
System.Nullable<Misc.PlayerInfoColorTypes> | colorType | If the method returns true, this will be an enum representing the hex code. If the method returns false, this will be null. |
Returns
Type | Description |
---|---|
System.Boolean | Whether or not the provided hex color code can be used in badges. |
ToString()
Returns the Badge in a human-readable format.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string containing Badge-related data. |