-
Notifications
You must be signed in to change notification settings - Fork 0
/
tui.go
138 lines (116 loc) · 3.19 KB
/
tui.go
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
package rogue
import "fmt"
const (
Escape = "\033["
Suffix = "m"
ResetCode = "0"
BoldCode = "1"
EndBoldCode = "21"
DimCode = "2"
EndDimCode = "22"
UnderlineCode = "4"
EndUnderlineCode = "24"
ItalicCode = "3"
EndItalicCode = "23"
BlackCode = "30"
DarkBlueCode = "90"
WhiteCode = "97"
RedCode = "31"
OrangeCode = "91"
GreenYellowCode = "32"
GreenCode = "33"
DarkGrayCode = "92"
YellowCode = "33"
GrayCode = "93"
BlueCode = "34"
LightGrayCode = "94"
PurpleCode = "35"
LightPurpleCode = "95"
CyanCode = "36"
OffWhiteCode = "96"
ResetColorCode = "39"
)
const (
RESET = Escape + ResetCode + Suffix
BOLD = Escape + BoldCode + Suffix
DIM = Escape + DimCode + Suffix
UNDERLINE = Escape + UnderlineCode + Suffix
ITALIC = Escape + ItalicCode + Suffix
BLACK = Escape + BlackCode + Suffix
DARKBLUE = Escape + DarkBlueCode + Suffix
WHITE = Escape + WhiteCode + Suffix
RED = Escape + RedCode + Suffix
ORANGE = Escape + OrangeCode + Suffix
GREENYELLOW = Escape + GreenYellowCode + Suffix
GREEN = Escape + GreenCode + Suffix
DARKGRAY = Escape + DarkGrayCode + Suffix
YELLOW = Escape + YellowCode + Suffix
LIGHTGRAY = Escape + LightGrayCode + Suffix
BLUE = Escape + BlueCode + Suffix
GRAY = Escape + GrayCode + Suffix
PURPLE = Escape + PurpleCode + Suffix
LIGHTPURPLE = Escape + LightPurpleCode + Suffix
CYAN = Escape + CyanCode + Suffix
OFFWHITE = Escape + OffWhiteCode + Suffix
)
func Bold(text string) string {
return BOLD + text + RESET
}
func Dim(text string) string {
return BOLD + text + RESET
}
func Underline(text string) string {
return UNDERLINE + text + RESET
}
func Italic(text string) string {
return ITALIC + text + RESET
}
func Black(text string) string {
return BLACK + text + RESET
}
func DarkBlue(text string) string {
return DARKBLUE + text + RESET
}
func White(text string) string {
return WHITE + text + RESET
}
func Red(text string) string {
return RED + text + RESET
}
func Orange(text string) string {
return ORANGE + text + RESET
}
func GreenYellow(text string) string {
return GREENYELLOW + text + RESET
}
func Green(text string) string {
return GREEN + text + RESET
}
func DarkGray(text string) string {
return DARKGRAY + text + RESET
}
func Yellow(text string) string {
return YELLOW + text + RESET
}
func Gray(text string) string {
return GRAY + text + RESET
}
func Blue(text string) string {
return BLUE + text + RESET
}
func LightGray(text string) string {
return LIGHTGRAY + text + RESET
}
func Purple(text string) string {
return PURPLE + text + RESET
}
func Cyan(text string) string {
return CYAN + text + RESET
}
func OffWhite(text string) string {
return OFFWHITE + text + RESET
}
func PrintBanner() {
fmt.Println(Blue("Rogue") + White(":") + Bold(OffWhite("GO")) + OffWhite(Bold(" v")) + White("0.1.0") + " -" + OffWhite(" an open-source") + White(" counter-strike:go") + OffWhite(" hack-engine"))
fmt.Println(OffWhite(Bold("==============================================================")))
}