SCROLLY deltay
Scrolls the vertical scrollbar of the "Screen" window.
The deltay
input is the number of pixels to scroll vertically.
A positive number scrolls down and a negative number scrolls up.
If deltay
is 0, then the scroller is reset to the center position.
The following procedure scrolls the screen window to put the turtle in view. It first resets the scrolling position to the center, so that it can scroll to a known absolute location.
TO FINDTURTLE
ZOOM 1 ; zoom such that 1 turtle step = 1 pixel
SCROLLX 0 ; center the horizontal scrollbar
SCROLLY 0 ; center the vertical scrollbar
SCROLLX XCOR ; scroll the distance from the center to turtle's x coordinate
SCROLLY -YCOR ; scroll the distance from the center to turtle's y coordinate
END