start to clone warehouse

This commit is contained in:
cuu
2021-10-20 01:34:36 +08:00
parent 21ae3d9358
commit 23b2f6caf8
12 changed files with 1102 additions and 3 deletions

View File

@@ -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
}