local root = SandboxNode.New('UIRoot', game.WorkSpace)
root.Name = 'uiroot'
local image1 = SandboxNode.New('UIImage', game.WorkSpace.uiroot)
image1.Name = 'image'
image1.Visible = true
image1.Icon = 'ui\\mobile\\texture0\\common\\board_activity_box_white.png'
image1.Size = Vector2.New(500, 200)
image1.Pivot= Vector2.New(0, 0)
image1.LayoutHRelation = Enum.LayoutHRelation.Left
image1.LayoutVRelation= Enum.LayoutVRelation.Top
image1.LayoutSizeRelation= Enum.LayoutSizeRelation.Both
image1.RollOver:Connect(function(node,issuccess,mousepos)
print('you RollOver me')
print('RollOver pos:'..mousepos.x..' '..mousepos.y)
end)
image1.RollOut:Connect(function(node,issuccess,mousepos)
print('you RollOut me')
print('RollOut pos:'..mousepos.x..' '..mousepos.y)
end)
image1.TouchBegin:Connect(function(node,issuccess,mousepos)
print('you TouchBegin me')
print('TouchBegin pos:'..mousepos.x..' '..mousepos.y)
end)
image1.TouchMove:Connect(function(node,issuccess,mousepos)
print('you TouchMove me')
print('TouchMove pos:'..mousepos.x..' '..mousepos.y)
end)
image1.TouchEnd:Connect(function(node,issuccess,mousepos)
print('you TouchEnd me')
print('TouchEnd pos:'..mousepos.x..' '..mousepos.y)
end)
image1.Click:Connect(function(node,issuccess,mousepos)
print('you Clickme')
print('Clickme pos:'..mousepos.x..' '..mousepos.y)
end)