Demo entry 6357101

lua

   

Submitted by anonymous on Apr 21, 2017 at 05:29
Language: Lua. Code size: 651 Bytes.

MailItem = _G.Comm.ScrollViewItem:class()
MailItem.selRang = nil
MailItem.localPos = nil
function MailItem:InView(scrollView)
    Comm.ScrollViewItem.InView(self, scrollView)

    self.viewInfo = scrollView:GetScrollItem()
    self.viewInfo.v.gameObject:SetActive(true)
    --self.viewInfo.v.name = "Item"..tostring(self.data.mail_index)
    scrollView.view:SetMailItem(self.data,self.data.mail_index,self.viewInfo.v)
    self.localPos = _G.Vector3.New(self.x, self.y, 0)
    self.viewInfo.v.transform.localPosition = self.localPos
    
    --if scrollView.curSelIndex == self.index then
    --    self:Select(scrollView)
    --end
end

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).