Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileON MENU BUTTON clicks,but,state GOSUB proc clicks, but, state: iexp proc: procedure name This sets up the action to be taken when one or more clicks of the mouse are received. With a subsequent ON MENU command, the named procedure will be branched to if the conditions imposed by the parameters are met: clicks - Sets the maximum number of clicks which generates a responce. but - The expected button combination as follows: 0: None 1: Left 2: Right 3: Both state - Specifies which button state (up or down) will cause the Event. With state=0, the Event will be prompted by the button(s) being up, and with state=1, the button(s) being down will cause the Event. proc - The name of the procedure to which the program will branch if the above conditions are met. Example: ON MENU BUTTON 1,1,0 GOSUB box GRAPHMODE 3 REPEAT ON MENU UNTIL MOUSEK=2 ' PROCEDURE box ADD i%,7 IF i%>200 i%=3 ENDIF BOX 320-i%,200-i%,320+i%,200+i% RETURN --> Boxes increasing in size are drawn on the screen so long as the left mouse button is not pressed. The program will terminate if the right mouse button is pressed. Memo: If the procedure used with ON MENU BUTTON is undefined the compiler will not issue and error message. Instead the compiler writes a bad binary where ON MENU BUTTON is translated into JSR 0.l! evnt_button()+