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)