Emulator romlist,favlist bug fix

This commit is contained in:
cuu 2018-12-18 20:45:39 +08:00
parent c73e08eb69
commit 6776a8f686
2 changed files with 5 additions and 0 deletions

View File

@ -298,13 +298,16 @@ func (self *FavListPage) SyncScroll() {
if self.Scrolled > 0 {
if y < 0 {
for i,_ := range self.MyList{
x,y = self.MyList[i].Coord()
_,h = self.MyList[i].Size()
self.MyList[i].NewCoord(x, y + self.Scrolled*h)
}
}
}else if self.Scrolled < 0 {
if y + h > self.Height {
for i,_ := range self.MyList {
x,y = self.MyList[i].Coord()
_,h = self.MyList[i].Size()
self.MyList[i].NewCoord(x,y + self.Scrolled*h)
}

View File

@ -325,6 +325,7 @@ func (self *RomListPage) SyncScroll() {
if self.Scrolled > 0 {
if y < 0 {
for i,_ := range self.MyList{
x,y = self.MyList[i].Coord()
_, h = self.MyList[i].Size()
self.MyList[i].NewCoord(x, y + self.Scrolled*h)
}
@ -332,6 +333,7 @@ func (self *RomListPage) SyncScroll() {
}else if self.Scrolled < 0 {
if y + h > self.Height{
for i,_ := range self.MyList{
x,y = self.MyList[i].Coord()
_, h = self.MyList[i].Size()
self.MyList[i].NewCoord(x, y + self.Scrolled*h)
}