Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tacosoncontributing/dotmenu

 
 

Repository files navigation

License: MIT GitHub Actions Workflow Status

About Dotmenu

A straightforward console menu library designed to streamline user interactions in console applications. Works on every terminal that supports ANSI escape codes.

Installation

Dotmenu can be added to your project with:

dotnet add package Natesworks.Dotmenu

Usage

Creating a menu is similar to creating a host for modern .NET applications:

Menu.CreateDefaultBuilder()
    .SetTitle("Sample")
    .SetPrefix("")
    .SetSelector(">")
    .AddOption<PlayOption>()
    .AddOption<CreditsOption>()
    .AddOption(text: "Exit", static () => Environment.Exit(0))
    .Build()
    .Run();

Builders

Currently, there are a few builders available to help you create menus:

  • Menu.CreateDefaultBuilder()
  • Menu.CreateCenteredBuilder()

Menu Samples

Hangman Hangman Screenshot

Special thanks

Special thanks to tacosontitan for adding unit tests, making hangman sample and making new API Surface. And thanks to samwise for fixing text flickering on windows and adding inheritance.

Documentation

For more documentation on how to create and configure menus please read the wiki at dotmenu.natesworks.com

About

A straightforward console menu library designed to streamline user interactions in console applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 100.0%