a = Shapes.AddEllipse(100,100)
b = Shapes.AddRectangle(100,100)
GraphicsWindow.MouseMove = mousemove
Sub mousemove
If GraphicsWindow.MouseX >= Shapes.GetLeft(b) then
If GraphicsWindow.MouseX <= Shapes.GetLeft(b) + 100 then
If GraphicsWindow.MouseY >= Shapes.GetTop(b) Then
If GraphicsWindow.MouseY <= Shapes.GetTop(b) + 100 then
While Mouse.IsLeftButtonDown
Shapes.move(b, GraphicsWindow.MouseX - 50, GraphicsWindow.MouseY - 50)
Endwhile
EndIf
EndIf
EndIf
endif
endsub
b = Shapes.AddRectangle(100,100)
GraphicsWindow.MouseMove = mousemove
Sub mousemove
If GraphicsWindow.MouseX >= Shapes.GetLeft(b) then
If GraphicsWindow.MouseX <= Shapes.GetLeft(b) + 100 then
If GraphicsWindow.MouseY >= Shapes.GetTop(b) Then
If GraphicsWindow.MouseY <= Shapes.GetTop(b) + 100 then
While Mouse.IsLeftButtonDown
Shapes.move(b, GraphicsWindow.MouseX - 50, GraphicsWindow.MouseY - 50)
Endwhile
EndIf
EndIf
EndIf
endif
endsub
No comments:
Post a Comment