SG_DrawGadgets

Syntax:

SG_DrawGadgets([StartGadget_L.l, StopGadget_L.l])

Parameters:

StartGadget_L

=

The number of the first gadget to draw, or -1 for all

StopGadget_L

=

the last number of the gadget to draw. Works only, if StartGadget_L > -1

if no parameter is set, all gadgets are drawn

=


Description:

draws the gadgets to the current screen. These function must be called every time the screen is cleared.

You can draw all gadgets currently available or only some of them.


Example:

    Repeat ; Start of the event loop
      ClearScreen(0, 0, 0)

      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

      SG_DrawAllGadgets()
      FlipBuffers()
    Forever

Remarks:



Supported OS:   Windows