This commit is contained in:
Daniel Esteban 2026-04-15 23:18:25 +02:00
parent 3117316332
commit 8a746c30d5
3 changed files with 9 additions and 14 deletions

View file

@ -176,8 +176,8 @@ func scroll(topline, middleline, bottomline string) {
display.FillScreen(colorWhite)
writeLine(topline, getRainbowRGB(200), displayWidth/2, 3*displayHeight/10, displayWidth, true)
writeLine(middleline, getRainbowRGB(80), displayWidth/2, 55*displayHeight/100, displayWidth, true)
writeLine(bottomline, getRainbowRGB(120), displayWidth/2, 8*displayHeight/10, displayWidth, true)
writeLine(middleline, getRainbowRGB(80), displayWidth/2, 6*displayHeight/10, displayWidth, true)
writeLine(bottomline, getRainbowRGB(120), displayWidth/2, 9*displayHeight/10, displayWidth, true)
display.SetScrollArea(0, 0)
defer func() {

View file

@ -66,14 +66,9 @@ func Info() {
for {
time.Sleep(100 * time.Millisecond)
getInput()
for b := 0; b < 9; b++ {
if !buttonsOldState[b] && buttonsState[b] {
if goBack() {
quit = true
break
}
}
if quit {
break
return
}
}
}

View file

@ -5,7 +5,6 @@ package main
import (
"image/color"
"machine"
"time"
"tinygo.org/x/tinyfont"
@ -42,9 +41,10 @@ func Info() {
for {
time.Sleep(100 * time.Millisecond)
pressed, _ := buttons.Read8Input()
if pressed&machine.BUTTON_SELECT_MASK > 0 || pressed&machine.BUTTON_START_MASK > 0 {
break
getInput()
if goBack() {
quit = true
return
}
}
}