Updates to Menu
This commit is contained in:
parent
8f68b1c0a8
commit
8257e806b1
3 changed files with 69 additions and 16 deletions
54
main.go
54
main.go
|
|
@ -2,32 +2,54 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"bufio"
|
||||
_ "embed"
|
||||
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/charmbracelet/lipgloss/table"
|
||||
)
|
||||
|
||||
//go:embed menu.txt
|
||||
var menu string
|
||||
|
||||
//go:embed officers.txt
|
||||
var officers string
|
||||
|
||||
var condoms = 10
|
||||
|
||||
var border = lipgloss.NewStyle().
|
||||
BorderStyle(lipgloss.NormalBorder()).
|
||||
BorderForeground(lipgloss.Color("63"))
|
||||
|
||||
var statsStyle = lipgloss.NewStyle().
|
||||
Foreground(lipgloss.Color("#ffffffff ")).
|
||||
Background(lipgloss.Color("#0000FF"))
|
||||
|
||||
func ClearScreen() {
|
||||
fmt.Print("\033[H\033[2J")
|
||||
}
|
||||
|
||||
func MashEnterKey() {
|
||||
fmt.Println(statsStyle.Render("Mash the 'Enter' key!"))
|
||||
bufio.NewReader(os.Stdin).ReadBytes('\n')
|
||||
}
|
||||
|
||||
func CheckStats() {
|
||||
fmt.Println(border.Render("PLAYER STATS"))
|
||||
fmt.Println("Condoms:", condoms)
|
||||
}
|
||||
|
||||
func main() {
|
||||
aqua := lipgloss.NewStyle().Foreground(lipgloss.Color("86")).Render
|
||||
pink := lipgloss.NewStyle().Foreground(lipgloss.Color("201")).Render
|
||||
officerStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("0000FF"))
|
||||
|
||||
fmt.Println(border.Render("OPP Wars - Organized Crime Edition"))
|
||||
|
||||
t := table.New()
|
||||
t.Row(border.Render("MAIN MENU"), border.Render("PLAYER STATS"))
|
||||
t.Row("1. Locker", aqua("Money"))
|
||||
t.Row("2. Aqcuire Drugs", aqua(""))
|
||||
t.Row("3. Buy Condoms", aqua("Condoms"))
|
||||
t.Row("4. Hit the Streets", aqua("Experience"))
|
||||
t.Row("5. Find Whore", pink("Whores"))
|
||||
t.Row("6. Pay off Judge", aqua("Bribes Rating"))
|
||||
t.Row("7. Union", aqua("Rank"))
|
||||
t.Row("8. Doctor", aqua("Diseases"))
|
||||
t.Row("9. View High Score", aqua("Milky as well"))
|
||||
t.Row("10. Clock Out", aqua("Also milky"))
|
||||
fmt.Println(t.Render())
|
||||
fmt.Println(officerStyle.Render(officers))
|
||||
MashEnterKey()
|
||||
|
||||
ClearScreen()
|
||||
|
||||
fmt.Println(lipgloss.JoinHorizontal(lipgloss.Bottom, border.Render(menu), statsStyle.Render(CheckStats)))
|
||||
|
||||
}
|
||||
|
|
|
|||
11
menu.txt
Normal file
11
menu.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
MAIN MENU
|
||||
|
||||
1. Locker
|
||||
2. Aqcuire Drugs
|
||||
3. Buy Condoms
|
||||
4. Hit the Streets
|
||||
5. Find Whore
|
||||
6. Pay off Judge
|
||||
7. Union
|
||||
8. Doctor
|
||||
9. Clock Out
|
||||
20
officers.txt
Normal file
20
officers.txt
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
____ ____ ____
|
||||
/....\ /....\ /....\
|
||||
.-. |::::::| .-. |::::::| .-. |::::::|
|
||||
| | |::::::| | | |::::::| | | |::::::|
|
||||
| | (`:'':') | | (`:'':') | | (`:'':')
|
||||
| | _--|__|--__ | |.--|__|--__ | |_--|__|--__
|
||||
| | | ________|_|_|_ ________|_|_|_ ________|_____
|
||||
| | / | | | | | |
|
||||
| |/ / | | | | | |
|
||||
|_| |/| | | | | | |
|
||||
(===)| | | O P P | | O P P | | O P P |
|
||||
`===' |`-| |`-| |`-| |
|
||||
| | |`-| |`-| |`-| |
|
||||
|_| | | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
|`-| |`-| |`-| |
|
||||
|__| |__| |__| |
|
||||
/_ | |_ | |_ | |
|
||||
|___`-__________-'__`-__________-'__`-__________-'
|
||||
Loading…
Add table
Add a link
Reference in a new issue