add infinitely scroll up down in RomListPage

This commit is contained in:
cuu
2019-02-07 19:38:11 +08:00
parent cbb49f5f78
commit 8a205de3ca
6 changed files with 76 additions and 29 deletions

View File

@@ -7,7 +7,7 @@ import (
"log"
//"encoding/json"
"path/filepath"
gotime "time"
"github.com/veandco/go-sdl2/sdl"
"github.com/veandco/go-sdl2/ttf"
@@ -179,6 +179,9 @@ type MainScreen struct {
Closed bool
UIPluginList []*UIPlugin
LastKey string
LastKeyDown gotime.Time
}
@@ -382,6 +385,8 @@ func (self *MainScreen) KeyDown(ev *event.Event) {
}
self.CurrentPage.KeyDown(ev)
self.LastKey = ev.Data["Key"]
}