$${\color{green}Open\color{gold}Term}$$
$${\color{lightblue}Description}$$
$${\color{green}Open\color{gold}Term}$$ is an open source teminal for Cosmos that uses C#'s default Console commands
$${\color{lightblue}ExapleCode}$$
public class Kernel : Sys. Kernel
{
Canvas canv ;
Terminal term ;
protected override void BeforeRun ( )
{
canv = FullScreenCanvas. GetFullScreenCanvas ( new Mode( 1280 , 720 , ColorDepth. ColorDepth32) ) ;
term = new Terminal( canv. Mode. Width, canv. Mode. Height) ;
Console. SetOut ( term) ;
Console. WriteLine ( " §4Hello, §2World!" ) ;
}
protected override void Run ( )
{
canv. Clear ( ) ;
Console. Write ( " Input: " ) ;
var input = term. NonBlockingReadline ( ) ;
Console. Write ( " Text typed: " ) ;
Console. WriteLine ( input) ;
canv. DrawImage ( term. Draw ( Color. Black) , 0 , 0 ) ;
canv. Display ( ) ;
Heap. Collect ( ) ;
}
}
$${\color{lightblue}ColorTable}$$
Color
Name
Code
$${\color{Black}Black}$$
$${\color{black}§0}$$
$${\color{DarkBlue}DarkBlue}$$
$${\color{darkblue}§1}$$
$${\color{DarkGreen}DarkGreen}$$
$${\color{DarkGreen}§2}$$
$${\color{DarkCyan}DarkCyan}$$
$${\color{DarkCyan}§3}$$
$${\color{DarkRed}DarkRed}$$
$${\color{DarkRed}§4}$$
$${\color{DarkMagenta}DarkMagenta}$$
$${\color{DarkMagenta}§5}$$
$${\color{Gold}Gold}$$
$${\color{Gold}§6}$$
$${\color{Gray}Gray}$$
$${\color{Gray}§7}$$
$${\color{DarkGray}DarkGray}$$
$${\color{DarkGray}§8}$$
$${\color{Blue}Blue}$$
$${\color{Blue}§9}$$
$${\color{Green}Green}$$
$${\color{Green}§a}$$
$${\color{Cyan}Cyan}$$
$${\color{Cyan}§b}$$
$${\color{Red}Red}$$
$${\color{Red}§c}$$
$${\color{Magenta}Magenta}$$
$${\color{Magenta}§d}$$
$${\color{Yellow}Yellow}$$
$${\color{Yellow}§e}$$
$${\color{White}White}$$
$${\color{White}§f}$$