From 6776a8f686d612651b25fab65437f71cd0bc8feb Mon Sep 17 00:00:00 2001 From: cuu Date: Tue, 18 Dec 2018 20:45:39 +0800 Subject: [PATCH] Emulator romlist,favlist bug fix --- sysgo/UI/Emulator/fav_list_page.go | 3 +++ sysgo/UI/Emulator/rom_list_page.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/sysgo/UI/Emulator/fav_list_page.go b/sysgo/UI/Emulator/fav_list_page.go index 27297c7..23d579c 100644 --- a/sysgo/UI/Emulator/fav_list_page.go +++ b/sysgo/UI/Emulator/fav_list_page.go @@ -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) } diff --git a/sysgo/UI/Emulator/rom_list_page.go b/sysgo/UI/Emulator/rom_list_page.go index 915ef33..21e4b2c 100644 --- a/sysgo/UI/Emulator/rom_list_page.go +++ b/sysgo/UI/Emulator/rom_list_page.go @@ -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) }