mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-09-06 05:24:36 +02:00
start to clone warehouse
This commit is contained in:
@@ -177,7 +177,8 @@ type PageInterface interface {
|
||||
|
||||
SetIconIndex(idx int)
|
||||
GetIconIndex() int
|
||||
|
||||
RefreshPsIndex()
|
||||
|
||||
Coord() (int, int)
|
||||
NewCoord(x, y int)
|
||||
Size() (int, int)
|
||||
@@ -959,6 +960,15 @@ func (self *Page) GetPsIndex() int {
|
||||
return self.PsIndex
|
||||
}
|
||||
|
||||
func (self *Page) RefreshPsIndex() {
|
||||
if len(self.MyList) == 0 {
|
||||
self.SetPsIndex(0)
|
||||
}
|
||||
if self.GetPsIndex() > len(self.MyList) -1 {
|
||||
self.SetPsIndex( len(self.MyList) - 1)
|
||||
}
|
||||
}
|
||||
|
||||
func (self *Page) SetIconIndex(idx int) {
|
||||
self.IconIndex = idx
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user