C# 클래스 fCraft.Color

Static class with definitions of Minecraft color codes, parsers/converters, and utilities.
파일 보기 프로젝트 열기: GlennMR/800craft

공개 프로퍼티들

프로퍼티 타입 설명
ColorNames string>.SortedList
Sys string

공개 메소드들

메소드 설명
EscapeAmpersands ( [ input ) : string
IrcToMinecraftColors ( [ sb ) : void

Replaces IRC color codes with equivalent Minecraft color codes, in the given StringBuilder. Opposite of MinecraftToIrcColors method.

IsValidColorCode ( char code ) : bool

Checks whether a color code is valid (checks if it's hexadecimal char).

MinecraftToIrcColors ( [ sb ) : void

Replaces Minecraft color codes with equivalent IRC color codes, in the given StringBuilder. Opposite of IrcToMinecraftColors method.

ParseToIndex ( [ color ) : int
ReplacePercentCodes ( [ message ) : string
ReplacePercentCodes ( [ sb ) : void
StripColors ( [ input ) : string

Strips all ampersand color codes, and unescapes doubled-up ampersands.

SubstituteSpecialColors ( [ input ) : string
SubstituteSpecialColors ( [ sb ) : void

Substitutes all fCraft-specific ampersand color codes (like &S/Color.Sys) with the assigned Minecraft colors (like &E/Color.Yellow). Strips any unrecognized sequences. Does not replace percent-codes. Note that LineWrapper itself does this substitution internally.

비공개 메소드들

메소드 설명
GetName ( char code ) : string
GetName ( int index ) : string
GetName ( string color ) : string
IrcToMinecraftColors ( [ input ) : string
MinecraftToIrcColors ( [ input ) : string
Parse ( char code ) : string
Parse ( int index ) : string
Parse ( string color ) : string

메소드 상세

EscapeAmpersands() 공개 정적인 메소드

public static EscapeAmpersands ( [ input ) : string
input [
리턴 string

IrcToMinecraftColors() 공개 정적인 메소드

Replaces IRC color codes with equivalent Minecraft color codes, in the given StringBuilder. Opposite of MinecraftToIrcColors method.
sb is null.
public static IrcToMinecraftColors ( [ sb ) : void
sb [ StringBuilder objects, the contents of which will be processed.
리턴 void

IsValidColorCode() 공개 정적인 메소드

Checks whether a color code is valid (checks if it's hexadecimal char).
public static IsValidColorCode ( char code ) : bool
code char
리턴 bool

MinecraftToIrcColors() 공개 정적인 메소드

Replaces Minecraft color codes with equivalent IRC color codes, in the given StringBuilder. Opposite of IrcToMinecraftColors method.
sb is null.
public static MinecraftToIrcColors ( [ sb ) : void
sb [ StringBuilder objects, the contents of which will be processed.
리턴 void

ParseToIndex() 공개 정적인 메소드

public static ParseToIndex ( [ color ) : int
color [
리턴 int

ReplacePercentCodes() 공개 정적인 메소드

public static ReplacePercentCodes ( [ message ) : string
message [
리턴 string

ReplacePercentCodes() 공개 정적인 메소드

public static ReplacePercentCodes ( [ sb ) : void
sb [
리턴 void

StripColors() 공개 정적인 메소드

Strips all ampersand color codes, and unescapes doubled-up ampersands.
public static StripColors ( [ input ) : string
input [
리턴 string

SubstituteSpecialColors() 공개 정적인 메소드

public static SubstituteSpecialColors ( [ input ) : string
input [
리턴 string

SubstituteSpecialColors() 공개 정적인 메소드

Substitutes all fCraft-specific ampersand color codes (like &S/Color.Sys) with the assigned Minecraft colors (like &E/Color.Yellow). Strips any unrecognized sequences. Does not replace percent-codes. Note that LineWrapper itself does this substitution internally.
sb is null.
public static SubstituteSpecialColors ( [ sb ) : void
sb [ StringBuilder, contents of which will be processed.
리턴 void

프로퍼티 상세

ColorNames 공개적으로 정적으로 프로퍼티

public static SortedList ColorNames
리턴 string>.SortedList

Sys 공개적으로 정적으로 프로퍼티

public static string Sys
리턴 string