|
|
|
|
|
by seanmcdirmid
4445 days ago
|
|
Compare with the control flow heavy managed time [1] version: on widget.Mouse.Down:
| var pw = widget.position
| var pm = widget.Mouse.Position
after:
| widget.Mouse.Capture()
| widget.position = pw + (widget.Mouse.Position - pm)
| on widget.Mouse.Up:
| | widget.position = widget.position # freeze widget position
| | break # stop the after block so capture/dragging stops
[1] http://research.microsoft.com/pubs/211297/managedtime.pdf |
|