AsciiPanelView / writeStringWithColor

writeStringWithColor

fun writeStringWithColor(string: String, charColor: Int, bgColor: Int): AsciiPanelView

Write a string to the cursor's 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

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