clone

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

more style channges

Dami committed cd468a6
commit
cd468a65d38dc0df5a9c36ed44852671816a57da
parent
8e2e77682eed7fffd2176477771f59df53185626
author
Dami <dami.etoile@gmail.com>
3 files changed, +28 -11
Mnonogram/style.go25++++++++++++++++---------
Msudoku/Model.go2+-
Msudoku/style.go12+++++++++++-
M nonogram/style.go +16 -9
@@ -28,8 +28,9 @@ var (
2828 Foreground(lipgloss.AdaptiveColor{Light: "255", Dark: "235"}).2929 Background(lipgloss.AdaptiveColor{Light: "130", Dark: "214"})3030 31- crosshairBG = lipgloss.AdaptiveColor{Light: "254", Dark: "237"}32- solvedBG = lipgloss.AdaptiveColor{Light: "151", Dark: "22"}31+ crosshairBG = lipgloss.AdaptiveColor{Light: "254", Dark: "237"}32+ crosshairFilledBG = lipgloss.AdaptiveColor{Light: "223", Dark: "100"}33+ solvedBG = lipgloss.AdaptiveColor{Light: "151", Dark: "22"}3334 3435 hintStyle = baseStyle.3536 Foreground(lipgloss.AdaptiveColor{Light: "137", Dark: "137"})
@@ -127,10 +128,12 @@ func colHintView(c TomographyDefinition, height int, current ...TomographyDefini
127128 128129 if needsSpacer(i, n) {129130 sepStyle := baseStyle.Foreground(separatorFG)130- col := lipgloss.JoinVertical(lipgloss.Left,131- strings.Split(strings.Repeat("│\n", height), "\n")[:height]...,132- )133- renderedCols = append(renderedCols, sepStyle.Render(col))131+ var lines []string132+ for range height - 1 {133+ lines = append(lines, " ")134+ }135+ lines = append(lines, sepStyle.Render("│"))136+ renderedCols = append(renderedCols, lipgloss.JoinVertical(lipgloss.Left, lines...))134137 }135138 }136139 return lipgloss.JoinHorizontal(lipgloss.Top, renderedCols...)
@@ -168,7 +171,7 @@ func rowHintView(r TomographyDefinition, width int, current ...TomographyDefinit
168171 sep := baseStyle.Foreground(separatorFG).169172 Width(width).170173 Align(lipgloss.Right).171- Render(strings.Repeat("─", width))174+ Render("─")172175 renderedRows = append(renderedRows, sep)173176 }174177 }
@@ -234,8 +237,12 @@ func tileView(val rune, isCursor, inCursorRow, inCursorCol, solved bool) string
234237 if isCursor && !solved {235238 s = cursorStyle236239 } else if !solved && (inCursorRow || inCursorCol) {237- // Apply crosshair background tint238- s = s.Background(crosshairBG)240+ // Apply crosshair background tint — filled cells get a more active color241+ if val == filledTile {242+ s = s.Background(crosshairFilledBG)243+ } else {244+ s = s.Background(crosshairBG)245+ }239246 }240247 241248 if solved {
M sudoku/Model.go +1 -1
M sudoku/style.go +11 -1