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) display.FillScreen(colorWhite)
writeLine(topline, getRainbowRGB(200), displayWidth/2, 3*displayHeight/10, displayWidth, true) writeLine(topline, getRainbowRGB(200), displayWidth/2, 3*displayHeight/10, displayWidth, true)
writeLine(middleline, getRainbowRGB(80), displayWidth/2, 55*displayHeight/100, displayWidth, true) writeLine(middleline, getRainbowRGB(80), displayWidth/2, 6*displayHeight/10, displayWidth, true)
writeLine(bottomline, getRainbowRGB(120), displayWidth/2, 8*displayHeight/10, displayWidth, true) writeLine(bottomline, getRainbowRGB(120), displayWidth/2, 9*displayHeight/10, displayWidth, true)
display.SetScrollArea(0, 0) display.SetScrollArea(0, 0)
defer func() { defer func() {

View file

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

View file

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