抽卡界面 选中位置修改提交
parent
61a2da78cd
commit
a8523745fb
|
@ -183,7 +183,7 @@ function RecruitMainPanel:BindEvent()
|
||||||
self.lastPage = self.curPage - 1 > 0 and self.curPage - 1 or #self.dicData
|
self.lastPage = self.curPage - 1 > 0 and self.curPage - 1 or #self.dicData
|
||||||
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
|
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
|
||||||
this:SetIndex()
|
this:SetIndex()
|
||||||
this:PageOnChange()
|
this:PageOnChange(true)
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.jiantouzuo , function()
|
Util.AddClick(this.jiantouzuo , function()
|
||||||
this.mask:SetActive(true)
|
this.mask:SetActive(true)
|
||||||
|
@ -200,7 +200,7 @@ function RecruitMainPanel:BindEvent()
|
||||||
self.lastPage = self.curPage - 1 > 0 and self.curPage - 1 or #self.dicData
|
self.lastPage = self.curPage - 1 > 0 and self.curPage - 1 or #self.dicData
|
||||||
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
|
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
|
||||||
this:SetIndex()
|
this:SetIndex()
|
||||||
this:PageOnChange()
|
this:PageOnChange(true)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ function RecruitMainPanel:OnShow()
|
||||||
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
|
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
|
||||||
lastIndex = self.curPage
|
lastIndex = self.curPage
|
||||||
this:SetIndex(self.curPage)
|
this:SetIndex(self.curPage)
|
||||||
this:PageOnChange()
|
this:PageOnChange(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:RefreshTabData()
|
function this:RefreshTabData()
|
||||||
|
@ -361,11 +361,8 @@ function this:SetIndex()
|
||||||
coroutine.wait(0.01)
|
coroutine.wait(0.01)
|
||||||
end
|
end
|
||||||
this.mask:SetActive(false)
|
this.mask:SetActive(false)
|
||||||
this.select.transform:SetParent(this.itemList[2].go.transform)
|
|
||||||
this.select.transform:GetComponent("RectTransform").anchoredPosition = Vector3.zero
|
|
||||||
this.select.gameObject:SetActive(true)
|
|
||||||
this.selectIma.sprite = this.spLoader:LoadSprite(self.dicData[self.curPage].Icon[2])
|
|
||||||
this:RefreshJianTou()
|
this:RefreshJianTou()
|
||||||
|
this:PageOnChange(true)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
|
@ -373,7 +370,13 @@ function this:SetIndex()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:PageOnChange()
|
function this:PageOnChange(isShow)
|
||||||
|
if isShow then
|
||||||
|
this.select.transform:SetParent(this.itemList[2].go.transform)
|
||||||
|
this.select.transform:GetComponent("RectTransform").anchoredPosition = Vector3.zero
|
||||||
|
this.select.gameObject:SetActive(true)
|
||||||
|
this.selectIma.sprite = this.spLoader:LoadSprite(self.dicData[self.curPage].Icon[2])
|
||||||
|
end
|
||||||
RecruitManager.CurRecruitId = self.CurRecruitId
|
RecruitManager.CurRecruitId = self.CurRecruitId
|
||||||
if subViewList[lastIndex] and subViewList[lastIndex].config and subViewList[lastIndex].sub then
|
if subViewList[lastIndex] and subViewList[lastIndex].config and subViewList[lastIndex].sub then
|
||||||
subViewList[lastIndex].sub:OnClose()
|
subViewList[lastIndex].sub:OnClose()
|
||||||
|
@ -402,13 +405,8 @@ function this:LeftAction()
|
||||||
self.lastPage = self.curPage
|
self.lastPage = self.curPage
|
||||||
self.curPage = self.nextPage
|
self.curPage = self.nextPage
|
||||||
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
|
self.nextPage = self.curPage + 1 > #self.dicData and 1 or self.curPage + 1
|
||||||
this.select.transform:SetParent(this.itemList[2].go.transform)
|
|
||||||
this.select.transform:GetComponent("RectTransform").anchoredPosition = Vector3.zero
|
|
||||||
this.select.gameObject:SetActive(true)
|
|
||||||
this.selectIma.sprite = this.spLoader:LoadSprite(self.dicData[self.curPage].Icon[2])
|
|
||||||
this:RefreshJianTou()
|
this:RefreshJianTou()
|
||||||
this:PageOnChange()
|
this:PageOnChange(true)
|
||||||
--this:RefreshTabData()
|
|
||||||
end
|
end
|
||||||
function this:RightAction()
|
function this:RightAction()
|
||||||
lastIndex = self.curPage
|
lastIndex = self.curPage
|
||||||
|
@ -416,13 +414,8 @@ function this:RightAction()
|
||||||
self.nextPage = self.curPage
|
self.nextPage = self.curPage
|
||||||
self.curPage = self.lastPage
|
self.curPage = self.lastPage
|
||||||
self.lastPage = self.curPage - 1 > 0 and self.curPage - 1 or #self.dicData
|
self.lastPage = self.curPage - 1 > 0 and self.curPage - 1 or #self.dicData
|
||||||
this.select.transform:SetParent(this.itemList[2].go.transform)
|
|
||||||
this.select.transform:GetComponent("RectTransform").anchoredPosition = Vector3.zero
|
|
||||||
this.select.gameObject:SetActive(true)
|
|
||||||
this.selectIma.sprite = this.spLoader:LoadSprite(self.dicData[self.curPage].Icon[2])
|
|
||||||
this:RefreshJianTou()
|
this:RefreshJianTou()
|
||||||
this:PageOnChange()
|
this:PageOnChange(true)
|
||||||
--this:RefreshTabData()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:OnSortingOrderChange()
|
function this:OnSortingOrderChange()
|
||||||
|
|
Loading…
Reference in New Issue