Updates to Menu

This commit is contained in:
Starstreak 2025-08-03 13:45:05 +00:00
parent 8f68b1c0a8
commit 8257e806b1
3 changed files with 69 additions and 16 deletions

54
main.go
View file

@ -2,32 +2,54 @@ package main
import ( import (
"fmt" "fmt"
"os"
"bufio"
_ "embed"
"github.com/charmbracelet/lipgloss" "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(). var border = lipgloss.NewStyle().
BorderStyle(lipgloss.NormalBorder()). BorderStyle(lipgloss.NormalBorder()).
BorderForeground(lipgloss.Color("63")) 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() { func main() {
aqua := lipgloss.NewStyle().Foreground(lipgloss.Color("86")).Render officerStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("0000FF"))
pink := lipgloss.NewStyle().Foreground(lipgloss.Color("201")).Render
fmt.Println(border.Render("OPP Wars - Organized Crime Edition")) fmt.Println(border.Render("OPP Wars - Organized Crime Edition"))
t := table.New() fmt.Println(officerStyle.Render(officers))
t.Row(border.Render("MAIN MENU"), border.Render("PLAYER STATS")) MashEnterKey()
t.Row("1. Locker", aqua("Money"))
t.Row("2. Aqcuire Drugs", aqua("")) ClearScreen()
t.Row("3. Buy Condoms", aqua("Condoms"))
t.Row("4. Hit the Streets", aqua("Experience")) fmt.Println(lipgloss.JoinHorizontal(lipgloss.Bottom, border.Render(menu), statsStyle.Render(CheckStats)))
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())
} }

11
menu.txt Normal file
View 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
View file

@ -0,0 +1,20 @@
____ ____ ____
/....\ /....\ /....\
.-. |::::::| .-. |::::::| .-. |::::::|
| | |::::::| | | |::::::| | | |::::::|
| | (`:'':') | | (`:'':') | | (`:'':')
| | _--|__|--__ | |.--|__|--__ | |_--|__|--__
| | | ________|_|_|_ ________|_|_|_ ________|_____
| | / | | | | | |
| |/ / | | | | | |
|_| |/| | | | | | |
(===)| | | O P P | | O P P | | O P P |
`===' |`-| |`-| |`-| |
| | |`-| |`-| |`-| |
|_| | | | | | | |
| | | | | | |
| | | | | | |
|`-| |`-| |`-| |
|__| |__| |__| |
/_ | |_ | |_ | |
|___`-__________-'__`-__________-'__`-__________-'