Using the mouse in OOT programs =============================== This assignment asks you to write a program which uses the mouse. OOT provides several procedures which makes this quite an easy thing to do. First, let us assume that all we want to do with the mouse is find the location of the mouse pointer on the screen when the user presses any of the mouse buttons. This document will not try to help you do any more than this. If you want to try something different, refer to a source such as the "Turing Reference Manual". There are only two Turing library procedures you need to use: buttonchoose() and buttonwait(). As an initialization step, you need to make a procedure call buttonchoose("onebutton") This will make the mouse act as if it only has one button. Pressing any button on the mouse will now have the same effect as pressing any other button. Next, to wait for the user to click the mouse, make the procedure call var x, y, buttonNum, buttonUpDown : int buttonwait("downup", x, y, buttonNum, buttonUpDown) This procedure will wait for the user to press and release the button on the mouse. The variables x and y will be set to the coordinates of the pointer at the time of the press. You can ignore the other variables. A small sample program which draws crosshairs on the screen at position of the mouse is available for pickup as ``mouse.t''.