Skip to content

Samma2009/Open-Term

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

$${\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
#000000 $${\color{Black}Black}$$ $${\color{black}§0}$$
#00008B $${\color{DarkBlue}DarkBlue}$$ $${\color{darkblue}§1}$$
#006400 $${\color{DarkGreen}DarkGreen}$$ $${\color{DarkGreen}§2}$$
#008B8B $${\color{DarkCyan}DarkCyan}$$ $${\color{DarkCyan}§3}$$
#8B0000 $${\color{DarkRed}DarkRed}$$ $${\color{DarkRed}§4}$$
#8B008B $${\color{DarkMagenta}DarkMagenta}$$ $${\color{DarkMagenta}§5}$$
#FFD700 $${\color{Gold}Gold}$$ $${\color{Gold}§6}$$
#808080 $${\color{Gray}Gray}$$ $${\color{Gray}§7}$$
#A9A9A9 $${\color{DarkGray}DarkGray}$$ $${\color{DarkGray}§8}$$
#0000FF $${\color{Blue}Blue}$$ $${\color{Blue}§9}$$
#008000 $${\color{Green}Green}$$ $${\color{Green}§a}$$
#00FFFF $${\color{Cyan}Cyan}$$ $${\color{Cyan}§b}$$
#FF0000 $${\color{Red}Red}$$ $${\color{Red}§c}$$
#FF00FF $${\color{Magenta}Magenta}$$ $${\color{Magenta}§d}$$
#FFFF00 $${\color{Yellow}Yellow}$$ $${\color{Yellow}§e}$$
#FFFFFF $${\color{White}White}$$ $${\color{White}§f}$$

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages