Skip to content

Commit bb20710

Browse files
committed
update readme
1 parent ccc5609 commit bb20710

File tree

1 file changed

+62
-2
lines changed

1 file changed

+62
-2
lines changed

ConsoleHero/README.md

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,65 @@
11
# ConsoleHero
2+
<img src="https://github.com/DerekGooding/ConsoleHero/blob/main/ConsoleHero/icon.png" width=15%>
23

3-
A light-weight library to help quickly and fluently develop Console application UI.
4+
[![NuGet](https://img.shields.io/nuget/v/ConsoleHero.svg)](https://www.nuget.org/packages/ConsoleHero/)
5+
[![.NET 7](https://img.shields.io/badge/.NET-7-blue)](https://www.nuget.org/packages/ConsoleHero/)
6+
[![.NET 8](https://img.shields.io/badge/.NET-8-blue)](https://www.nuget.org/packages/ConsoleHero/)
7+
[![.NET 9](https://img.shields.io/badge/.NET-9-blue)](https://www.nuget.org/packages/ConsoleHero/)
48

5-
*Warning, this is currently in heavy development and changes will be aggressive. Use at your own descresion*
9+
[![GitHub license](https://img.shields.io/github/license/DerekGooding/ConsoleHero?color=blue)](https://github.com/DerekGooding/ConsoleHero/blob/main/LICENSE)
10+
[![GitHub issues](https://img.shields.io/github/issues/DerekGooding/ConsoleHero?logo=github)](https://github.com/DerekGooding/ConsoleHero/issues)
11+
[![GitHub build](https://img.shields.io/github/actions/workflow/status/DerekGooding/ConsoleHero/build-test.yml?branch=main&logo=github)](https://github.com/DerekGooding/ConsoleHero/actions)
12+
[![Coverage Status](https://coveralls.io/repos/github/DerekGooding/ConsoleHero/badge.svg?refresh)](https://coveralls.io/github/DerekGooding/ConsoleHero)
13+
<!---[![GitHub stars](https://img.shields.io/github/stars/DerekGooding/ConsoleHero?logo=github&style=flat)](https://github.com/modernuo/ModernUO/stargazers)-->
14+
15+
16+
# Major Updates
17+
18+
This project started as a lightweight Menu organizer. It's turned into a static data, architecture engine. It still makes menus easily but it also allows you to quickly spin up and mock architecture for any project.
19+
20+
## DI and Source Gen
21+
22+
You get basic DI without any additonal lines of Code. Label a class with the [Singleton] attribute and it becomes a single, globally seen object. Any other [Singleton] class can accept a Singleton in it's constructor and everything fits together.
23+
[Injection Example Project](https://github.com/DerekGooding/ConsoleHero/tree/main/ConsoleHero.InjectionExample)
24+
25+
Additionally, using the new IContent<T> interface along it's companion INamed interface, gives you a simple way to have global access to all your static data.
26+
[Example Creatures.cs](https://github.com/DerekGooding/ConsoleHero/blob/main/ConsoleHero.InjectionExample/Creatures.cs)
27+
28+
Allowing you to do something like this from anywhere in your code:
29+
```
30+
Creature goblin = GlobalSettings.Get<Creatures>().Goblin;
31+
```
32+
Ideally you'd use the DI feature to pass the Creatures Singleton to other Singletons at runtime, but GlobalSettings.Get works as a less performant alternative that won't crash with circular dependancies.
33+
34+
## Start with ConsoleHero
35+
To install the ConsoleHero package, use the following NuGet command:
36+
37+
```bash
38+
dotnet add package ConsoleHero
39+
```
40+
Or via the NuGet Package Manager:
41+
42+
```bash
43+
Install-Package ConsoleHero
44+
```
45+
## Video Examples Coming SOON!
46+
Star or Watch this repo to stay up to date. I'll be creating example videos and additional content soon. It's honestly quite amazing how simple you can quickly mock up architecture. Or even convert existing projects to use ConsoleHero.
47+
48+
## Menu Node System
49+
50+
# Turn
51+
![Before](https://github.com/DerekGooding/ConsoleHero/blob/main/ReadmeImages/Before.png)
52+
53+
# Into
54+
55+
![After](https://github.com/DerekGooding/ConsoleHero/blob/main/ReadmeImages/After.png)
56+
57+
# Types of Nodes
58+
## Menu
59+
The backbone of the library. Menus take a fluent approach to options and do all the heavy lifting with console printing and handling for you. Invalid inputs, numbering the options, coloring the text and formalizing everything into a neat, fluent builder.
60+
## Paragraph
61+
A simple way to store text information. No more Console.Writeline peppering your codebase. Create a few paragraphs and call them intuitively from another Node.
62+
## Request
63+
The obvious input requirement. Menus only get you so far. Eventually you need to request a string from the user like their name or a date. Or how many iterations to loop. This is where requests come in. Quickly create an intuitive user end-point with a few lines of fluent code.
64+
## Tune
65+
Who doesn't like a beep or audio queue in their menus? Uses enums and a builder to make note generation intuitive. You can still include custom frequencies but more often then not, you're using a quick Quarter B note or a Half D.

0 commit comments

Comments
 (0)