-
Notifications
You must be signed in to change notification settings - Fork 1
/
State.cs
42 lines (34 loc) · 810 Bytes
/
State.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System.Collections.Generic;
namespace MUI;
public class State
{
public string Header = "";
public string Info = "";
public List<NavOption> Options = new ();
public Action Update = ()=>{};
public class NavOption{
public string Text = "";
public Action Function = ()=>{};
public NavOption(string text = "")
{
Text = text;
Function = ()=>{};
}
public NavOption(string text,Action function)
{
Text = text;
Function = function;
}
}
public void Draw(){
Console.Clear();
TUI.Message($" [{Core.Title}] [{Header}] {Core.Info}",4,true);
TUI.Message(Info, 4);
TUI.Message();
foreach(NavOption n in Options)
{
TUI.Message(Options.IndexOf(n)+1+"| "+n.Text, 4, Options.IndexOf(n)==(Input.Selection%Options.Count));
}
TUI.Message();
}
}