SG_EventType

Syntax:

Result=SG_EventType()

Parameters:


Return Values:

Result

=

the eventID, of the event happened


Description:

This function returns the event number, if an event happened

The following events are currently supported:

#SG_EventType_MouseOverGadget ; Mouse over the gadget

#SG_EventType_LeftClick ; click with the left mousebutton

#SG_EventType_RightClick ; click with the right mousebutton

#SG_EventType_LeftRelease ; release of the left mousebutton

#SG_EventType_RightRelease ; release of the right mousebutton

#SG_EventType_Wheel ; returns if the Wheel used


Example:

    Repeat ; Start of the event loop
      Event = SG_ScreenGadgetEvent() ; This line checks if an event happened
      
      GadgetID = SG_EventScreenGadgetID() ; Is it a gadget event?
      
      EventType = SG_EventType() ; The event type
      Debug "----------------"
      Debug "Event: " + Str(Event)
      Debug "GadgetID: " + Str(GadgetID)
      Debug "EventType: " + Str(EventType)
      
      If Event = #PB_EventGadget
        ;You can place code here, and use the result as parameters for the procedures
      endif
    Forever

Remarks:



Supported OS:   Windows