Search Results for

    Show / Hide Table of Contents

    Struct Badge

    Represents an in-game badge.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Exiled.API.Features
    Assembly: Exiled.API.dll
    Syntax
    public struct Badge

    Constructors

    | Improve this Doc View Source

    Badge(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 Source

    Color

    Gets the badge color.

    Declaration
    public readonly string Color { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    IsGlobal

    Gets a value indicating whether the badge is global or not.

    Declaration
    public readonly bool IsGlobal { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Text

    Gets the badge text.

    Declaration
    public readonly string Text { get; }
    Property Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    GetHexColor(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 #.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    Overrides
    System.ValueType.ToString()

    Extension Methods

    ReflectionExtensions.CopyProperties(Object, Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX