'Compileroption -s console

'Beispiel für alternative Menü-Abfrage

#include "sGUI\sGUI.bas"
#include "sGUI\Menu.bas"

screen 19,32

InitGFX

dim as EventHandle ptr event
event=CreateEventHandle


dim as integer entrya,entryb
Menu (event,1,0,1,"Menue A")
entrya=Menu (event,1,1,1,"Eintrag A")
entryb=Menu (event,1,2,1,"Eintrag B")


MenuOn(event)

dim as integer ff=freefile
open cons for output as ff

do
  event->xSleep(1)
  if event->MENUMESSAGE then   'Wenn ein MenüEintrag angewählt wurde dann...

    select case event->MENUMESSAGE
      case entrya
        print #ff,"Eintrag A angewaehlt"
      case entryb
        print #ff,"Eintrag B angewaehlt"
    end select

  end if
loop until event->EXITEVENT

close ff

DestroyEventHandle (event)
end
