预设调整,左右红点切换界面调整

dev_chengFeng
DESKTOP-98AVA47\Administrator 2021-07-16 10:12:41 +08:00
parent b8afca215b
commit e7187d75c4
2 changed files with 22 additions and 21 deletions

View File

@ -175,7 +175,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 215.96004, y: -75.000015} m_AnchoredPosition: {x: -6008, y: -293.68}
m_SizeDelta: {x: 149.09, y: 168.76} m_SizeDelta: {x: 149.09, y: 168.76}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2681571101409504731 --- !u!222 &2681571101409504731
@ -760,14 +760,14 @@ MonoBehaviour:
m_Padding: m_Padding:
m_Left: 0 m_Left: 0
m_Right: 0 m_Right: 0
m_Top: 0 m_Top: 5
m_Bottom: 0 m_Bottom: 0
m_ChildAlignment: 4 m_ChildAlignment: 4
m_Spacing: 0 m_Spacing: 0
m_ChildForceExpandWidth: 1 m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0 m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1 m_ChildControlWidth: 1
m_ChildControlHeight: 1 m_ChildControlHeight: 0
--- !u!114 &2008590253617637414 --- !u!114 &2008590253617637414
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -10483,7 +10483,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 48}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4687723341069919988 --- !u!222 &4687723341069919988
CanvasRenderer: CanvasRenderer:
@ -10833,7 +10833,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 48}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8645143170377919315 --- !u!222 &8645143170377919315
CanvasRenderer: CanvasRenderer:
@ -21323,7 +21323,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 60}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6309598155653890617 --- !u!222 &6309598155653890617
CanvasRenderer: CanvasRenderer:
@ -36715,7 +36715,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 48}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7181820448058790241 --- !u!222 &7181820448058790241
CanvasRenderer: CanvasRenderer:
@ -41873,7 +41873,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 60}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4549573736204197124 --- !u!222 &4549573736204197124
CanvasRenderer: CanvasRenderer:
@ -42494,14 +42494,14 @@ MonoBehaviour:
m_Padding: m_Padding:
m_Left: 0 m_Left: 0
m_Right: 0 m_Right: 0
m_Top: 0 m_Top: 5
m_Bottom: 0 m_Bottom: 0
m_ChildAlignment: 4 m_ChildAlignment: 4
m_Spacing: 0 m_Spacing: 0
m_ChildForceExpandWidth: 1 m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0 m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1 m_ChildControlWidth: 1
m_ChildControlHeight: 1 m_ChildControlHeight: 0
--- !u!114 &1315221689413838254 --- !u!114 &1315221689413838254
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -57225,7 +57225,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 48}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9065055156303989069 --- !u!222 &9065055156303989069
CanvasRenderer: CanvasRenderer:

View File

@ -169,33 +169,35 @@ function RecruitMainPanel:BindEvent()
Util.AddClick(this.jiantouyou , function() Util.AddClick(this.jiantouyou , function()
this.mask:SetActive(true) this.mask:SetActive(true)
for i = self.curPage - 2,1,-1 do for i = self.curPage - 1,1,-1 do
if self.dicData[i].RpType and self.dicData[i].RpType > 0 then if self.dicData[i].RpType and self.dicData[i].RpType > 0 then
if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then
lastIndex = self.curPage
self.curPage = i self.curPage = i
break break
end end
end end
end end
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
lastIndex = self.curPage
this:SetIndex() this:SetIndex()
this:PageOnChange() this:PageOnChange()
end) end)
Util.AddClick(this.jiantouzuo , function() Util.AddClick(this.jiantouzuo , function()
this.mask:SetActive(true) this.mask:SetActive(true)
for i = self.curPage + 2,#self.dicData,1 do for i = self.curPage + 1,#self.dicData,1 do
if self.dicData[i].RpType and self.dicData[i].RpType > 0 then if self.dicData[i].RpType and self.dicData[i].RpType > 0 then
if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then
lastIndex = self.curPage
self.curPage = i self.curPage = i
break break
end end
end end
end end
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
lastIndex = self.curPage
this:SetIndex() this:SetIndex()
this:PageOnChange() this:PageOnChange()
end) end)
@ -203,7 +205,7 @@ end
function RecruitMainPanel:RefreshJianTou() function RecruitMainPanel:RefreshJianTou()
local index = 0 local index = 0
for i = self.curPage - 2,1,-1 do for i = self.curPage - 1,1,-1 do
if self.dicData[i].RpType and self.dicData[i].RpType > 0 then if self.dicData[i].RpType and self.dicData[i].RpType > 0 then
if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then
index = i index = i
@ -217,7 +219,7 @@ function RecruitMainPanel:RefreshJianTou()
this.jiantouyou.gameObject:SetActive(true) this.jiantouyou.gameObject:SetActive(true)
end end
index = 0 index = 0
for i = self.curPage + 2,#self.dicData,1 do for i = self.curPage + 1,#self.dicData,1 do
if self.dicData[i].RpType and self.dicData[i].RpType > 0 then if self.dicData[i].RpType and self.dicData[i].RpType > 0 then
if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then if RecruitManager.GetAllRecruitBtnRedpoint(self.dicData[i].RpType) then
index = i index = i
@ -225,7 +227,6 @@ function RecruitMainPanel:RefreshJianTou()
end end
end end
end end
LogGreen("index2:"..index)
if index == 0 then if index == 0 then
this.jiantouzuo.gameObject:SetActive(false) this.jiantouzuo.gameObject:SetActive(false)
else else
@ -358,7 +359,7 @@ function this:SetIndex()
end end
end end
function this:PageOnChange() function this:PageOnChange()
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()