clone

fifteen puzzle games for the terminal, with daily puzzles, weekly ladders and xp, built on bubble tea

lowerkey the menu a bit

Dami committed d925a68
commit
d925a68ea742bf6a2a75b2667f60620600769943
parent
c626d154ab134d245953916ddc52e3d969588e18
author
Dami <dami.etoile@gmail.com>
3 files changed, +20 -23
Mstats/stats.go6+++---
Mui/mainmenu.go28+++++++++++-----------------
Mui/style.go9++++++---
M stats/stats.go +3 -3
M ui/mainmenu.go +11 -17
@@ -6,14 +6,7 @@ import (
66 "charm.land/lipgloss/v2"77 )88 9-// logo is the pre-rendered "puzzletea" ASCII art (FIGlet "small" font).10-// Stored as a raw string to avoid a runtime dependency on go-figure.11-const logo = "" +12- " _ _\n" +13- " _ __ _ _ ___ ___ | | ___ | |_ ___ __ _\n" +14- " | '_ \\ | || | |_ / |_ / | | / -_) | _| / -_) / _` |\n" +15- " | .__/ \\_,_| /__| /__| |_| \\___| \\__| \\___| \\__,_|\n" +16- " |_|"9+const logo = "puzzletea"1710 1811 // MainMenu is a custom main menu component with an ASCII art logo1912 // and styled item list. It replaces the generic list.Model for the
@@ -57,17 +50,18 @@ func (m MainMenu) View() string {
5750 5851 var itemLines []string5952 for i, item := range m.items {60- var line string53+ var line, cursor, title string6154 if i == m.cursor {62- cursor := CursorStyle.Render("▸ ")63- title := SelectedItemStyle.Render(item.ItemTitle)64- desc := DimItemStyle.Render(" " + item.Desc)65- line = cursor + title + desc55+ cursor = CursorStyle.Render("⦾ ")56+ title = SelectedItemStyle.Render(item.ItemTitle)57+6658 } else {67- title := NormalItemStyle.Render(item.ItemTitle)68- desc := DimItemStyle.Render(" " + item.Desc)69- line = " " + title + desc59+ cursor = CursorStyle.Render("◦ ")60+ title = NormalItemStyle.Render(item.ItemTitle)61+7062 }63+ desc := DimItemStyle.Render("\n " + item.Desc)64+ line = cursor + title + desc + "\n"7165 itemLines = append(itemLines, line)7266 }7367 items := strings.Join(itemLines, "\n")
@@ -82,5 +76,5 @@ func (m MainMenu) View() string {
8276 footer,8377 )8478 85- return HeavyPanel(inner)79+ return inner8680 }
M ui/style.go +6 -3