•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
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-FileEVNT_BUTTON(clicks,mask,state[,mx,my,button,k_state])

clicks, mask, state: iexp
mx, my, button, k_state: ivar

Waits for one or more mouse clicks, e.g. double-click, triple click, etc.

Returns the number of clicks.

    clicks  - Maximum allowable clicks.
    mask    - Mask for the desired mouse button:
              Bit 0: Left button
              Bit 1: Right button
    state   - Desired status, in order to terminate the event.
              Bit allocation as for 'mask'

    mx      - Returns x-coordinate of mouse pointer when event is terminated.
    my      - Returns y-coordinate of mouse pointer when event is terminated.
    button  - Returns state of mouse buttons when event is terminated.
    k_state - Returns state of keyboard 'shift' keys when event is terminated.
              Bit 0: Right shift key
              Bit 1: Left shift key
              Bit 2: Control key
              Bit 3: Alternate key
              Bit 7: AltGr (Milan)

The parameters mx, my, button, and k_state are optional, these values can also
be found by querying GINTOUT(1) to GINTOUT(4).

Example:

    DO
      SELECT EVNT_BUTTON(2,1,1,mx%,my%,bu%,kb%)
      CASE 1
        TEXT mx%,my%,"1"
      CASE 2
        TEXT mx%,my%,"2"
      CASE 3
        TEXT mx%,my%."3"
      ENDSELECT
    LOOP UNTIL BTST(kb%,2) !until Control key also pressed

--> Waits for mouse clicks with the left mouse button. The number of clicks
    appears on the screen at the mouse position. The program is ended by
    holding down the Control key as well as clicking.

evnt_button()+