x-backend #2
@ -38,10 +38,14 @@ func main () {
|
||||
os.Exit(0)
|
||||
|
||||
case stone.EventPress:
|
||||
event := event.(stone.EventPress)
|
||||
if stone.event.Printable() {
|
||||
application.SetRune(caret, 0, rune(stone.event))
|
||||
button := stone.Button(event.(stone.EventPress))
|
||||
if button.Printable() {
|
||||
application.SetRune(caret, 0, rune(button))
|
||||
caret ++
|
||||
width, _ := application.Size()
|
||||
if caret >= width {
|
||||
caret = 0
|
||||
}
|
||||
application.Draw()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user