Giter Site home page Giter Site logo

tui's Introduction

Tui

What is it?

Tui is a text rendering engine designed to look like a terminal or text-mode screen.

How do I use it?

What better way to find out than by saying hello to this wonderful world of ours?

using Tui;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Screen screen = new Screen();
            screen.WriteString("Hello, World!", 0, 0);
            screen.Run();
        }
    }
}

Hello, World!

What else can I do?

Colorful text!

Screen screen = new Screen();
screen.WriteString("Hello, World!", 0, 0);
screen.FillForeground(TextColor.Red, new Rectangle(0, 0, 5, 1));
screen.FillForeground(TextColor.Yellow, new Rectangle(7, 0, 5, 1));
screen.Run();

Hello, World!

Fancy art!

Screen screen = new Screen();
screen.WriteString("╒═══════════════════╕", 0, 0);
screen.WriteString("│ ♥ Hello, World! ♥ │", 0, 1);
screen.WriteString("╘═══════════════════╛", 0, 2);
screen.FillColors(TextColor.White, TextColor.DarkBlue, new Rectangle(0, 0, 21, 3));
screen.FillForeground(TextColor.Magenta, new Rectangle(2, 1, 17, 1));
screen.FillForeground(TextColor.Yellow, new Rectangle(4, 1, 13, 1));
screen.Run();

Hello, World!

Eye-catching animations!

Screen screen = new Screen();
screen.WriteString("╒═══════════════════╕", 0, 0);
screen.WriteString("│ ♥ Hello, World! ♥ │", 0, 1);
screen.WriteString("╘═══════════════════╛", 0, 2);
screen.FillColors(TextColor.White, TextColor.DarkBlue, new Rectangle(0, 0, 21, 3));
screen.FillForeground(TextColor.Magenta, new Rectangle(2, 1, 17, 1));
screen.FillForeground(TextColor.Yellow, new Rectangle(4, 1, 13, 1));
Timer timer = new Timer(TimeSpan.FromSeconds(0.5), screen);
bool blink = false;
timer.Tick += (s, e) =>
    {
        screen.FillForeground(blink ? TextColor.Yellow : TextColor.Red, new Rectangle(4, 1, 13, 1));
        blink = !blink;
    };
screen.Run();
timer.Dispose();

Hello, World!

Using these tools, and more, you can create text-mode applications that do all kinds of crazy things!

But how do I reference it in a project?

The first thing to do is clone or download the project to disk. You can do this from the main page of the repository.

Next, create a new console application in Visual Studio, and in the project properties, change the output type to "Windows Application".

Then, add the Tui project into the solution with Add > Existing Project... and browsing to the location of Tui.csproj.

Finally, open the Add Reference dialog for your new project and select Tui in the Projects section.

You are now ready to use Tui!

tui's People

Contributors

kendfrey avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.