【邮件】内容显示自适应
parent
0697e8646f
commit
52229c0d94
|
@ -15,6 +15,7 @@ function MainSingleInfoPanel:InitComponent()
|
|||
self.closeBtn = Util.GetGameObject(self.gameObject, "bg/btnBack")
|
||||
self.mialHead = Util.GetGameObject(self.gameObject, "bg/mialHead"):GetComponent("Text")
|
||||
self.mialTimeText = Util.GetGameObject(self.gameObject, "bg/mialTimeText"):GetComponent("Text")
|
||||
self.mialInfoRoot = Util.GetGameObject(self.gameObject, "bg/mialInfo")
|
||||
self.mialInfo = Util.GetGameObject(self.gameObject, "bg/mialInfo/mialInfoText"):GetComponent("Text")
|
||||
self.itemPre=Util.GetGameObject(self.gameObject, "itemPre")
|
||||
self.grid=Util.GetGameObject(self.gameObject, "bg/scroll/grid")
|
||||
|
@ -176,6 +177,18 @@ function MainSingleInfoPanel:OnShowMailData(mailData)
|
|||
self.ScrollView:SetData(rewardStr, function (index, go)
|
||||
self:SingleMailDataShow(go, rewardStr[index])
|
||||
end)
|
||||
|
||||
-- 根据是否有附件动态修改邮件内容显示状态
|
||||
if #rewardStr > 0 then
|
||||
self.root:SetActive(true)
|
||||
self.mialInfoRoot.transform.sizeDelta = Vector2.New(857, 526)
|
||||
self.mialInfoRoot.transform.localPosition = Vector2.New(0, 173)
|
||||
else
|
||||
self.root:SetActive(false)
|
||||
self.mialInfoRoot.transform.sizeDelta = Vector2.New(857, 898)
|
||||
self.mialInfoRoot.transform.localPosition = Vector2.New(0, 0)
|
||||
end
|
||||
|
||||
end
|
||||
local _ItemList = {}
|
||||
function MainSingleInfoPanel:SingleMailDataShow(go, rewardStr)
|
||||
|
|
Loading…
Reference in New Issue