Skip to content
aaronhancePublic

About

A Text User Interface for c#, that directly manipulates the console buffer.

Resources

Stars

7 stars

Watchers

2 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SharpTUI

A Text User Interface for c#.

If you want to start using the framework right now then follow these steps:

  1. open Visual studio.

  2. Create a new console application

  3. File -> add -> exsisting project -> add the STUI project(download it if you havn't already)

  4. Add a reference to it. Open solution explorer right click references on your console project -> add referance find SharpTUI under solution.

Example:

    ScreenDriver.BorderPreset bp = new ScreenDriver.BorderPreset();
        
    public void method(){
    
        borderPreset();
    
        ScreenDriver.init();
        ScreenDriver.newScreen("my screen");
        ScreenDriver.setScreen("my screen");
        ScreenDriver.addComponent("my screen", new CTextBox(10, 5, 5, bp));
        ScreenDriver.render(); //Should be called from a loop running about 20 - 50 times a second
    }
        //Define the border preset
        public void borderPreset() {
            bp.horizontal.Char.UnicodeChar = Convert.ToChar(196);
            bp.horizontal.Attributes = 1;
            bp.vertical.Char.UnicodeChar = Convert.ToChar(179);
            bp.vertical.Attributes = 1;
            bp.topLeft.Char.UnicodeChar = Convert.ToChar(218);
            bp.topLeft.Attributes = 1;
            bp.topRight.Char.UnicodeChar = Convert.ToChar(191);
            bp.topRight.Attributes = 1;
            bp.bottomLeft.Char.UnicodeChar = Convert.ToChar(192);
            bp.bottomLeft.Attributes = 1;
            bp.bottomRight.Char.UnicodeChar = Convert.ToChar(217);
            bp.bottomRight.Attributes = 1;
        }
    

View the wiki for more information!

About

A Text User Interface for c#, that directly manipulates the console buffer.

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages