AsciiPanelView / writeString

writeString

fun writeString(string: String): AsciiPanelView

Write a string to the cursor's position. This updates the cursor's position.

Parameters

string - the string to write

Return
this for convenient chaining of method calls

fun writeString(string: String, charColor: Int): AsciiPanelView

Write a string to the cursor's position with the specified foreground color. This updates the cursor's position but not the default foreground color.

Parameters

string - the string to write

charColor - the foreground color or null to use the default

Return
this for convenient chaining of method calls

fun writeString(string: String, x: Int, y: Int, charColor: Int): AsciiPanelView

Write a string to the specified position with the specified foreground color. This updates the cursor's position but not the default foreground color.

Parameters

string - the string to write

x - the distance from the left to begin writing from

y - the distance from the top to begin writing from

charColor - the foreground color or null to use the default

Return
this for convenient chaining of method calls

fun writeString(string: String, x: Int, y: Int, charColor: Int?, bgColor: Int?): AsciiPanelView

Write a string to the specified position with the specified foreground and background colors. This updates the cursor's position but not the default foreground or background colors.

Parameters

string - the string to write

x - the distance from the left to begin writing from

y - the distance from the top to begin writing from

charColor - the foreground color or null to use the default

bgColor - the background color or null to use the default

Return
this for convenient chaining of method calls