1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 15:22:53 +02:00

- Documented

This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-19 16:14:09 +02:00
parent 2e5ff166a6
commit 6aa314603c

View File

@ -51,9 +51,20 @@ public enum SimpleColor: string
DEFAULT = "99" // NOT UNIVERSALLY SUPPORTED DEFAULT = "99" // NOT UNIVERSALLY SUPPORTED
} }
// Return the hex control character if color is a hexadecimal color code, the ASCII control character if color is two ASCII digits, and throw an exception if it's neither /**
// This function might be useless now that set_fg and set_fg_bg have been changed, but I'll keep it in case it's needed later. * Return the hex control character if color is a hexadecimal color code,
char generate_color_control_char(string color) * the ASCII control character if color is two ASCII digits, and throw an
* exception if it's neither.
*
* This function might be useless now that set_fg and set_fg_bg have been
* changed, but I'll keep it in case it's needed later.
*
* Params:
* color = the color to check for
*
* Returns: the color control type
*/
private char generate_color_control_char(string color)
{ {
if(color.length == 6) if(color.length == 6)
{ {
@ -148,7 +159,6 @@ public string setForeground(SimpleColor color)
return ControlCode.AsciiColor~color; return ControlCode.AsciiColor~color;
} }
/** /**
* Generate a string that sets the foreground and background color (except enum) * Generate a string that sets the foreground and background color (except enum)
* *