fb:porticula NoPaste
Fenster erzeugen (CGUI)
Uploader: | raph ael |
Datum/Zeit: | 24.02.2008 18:41:59 |
'' CGUI- Beispiel
#include once "allegro.bi" 'Wird von CGUI gebraucht
#include once "cgui.bi"
declare sub mkwin ()
sub new_window cdecl (byval userdata as any ptr)
mkwin 'Neues Fenster
end sub
sub stop cdecl (byval userdata as any ptr)
end 0
end sub
sub close_window cdecl (byval userdata as any ptr)
StopProcessEvents() 'Events stoppen
CloseWin(NULL) 'Fenster schließen
end sub
sub make_a_window( )
MkDialogue(CGUI_ADAPTIVE, "Hallo Welt!", 0)
AddButton(CGUI_TOPLEFT, "Neues Fenster", @new_window, NULL)
AddTextBox(CGUI_RIGHT, " Hi!", 200, 0, 0)
AddButton(CGUI_DOWNLEFT, "Beenden", @stop_program, NULL)
AddButton(CGUI_RIGHT, "Schließen", @close_window, NULL)
DisplayWin()
ProcessEvents()
end sub
InitCgui(1024, 768, 15)
make_a_window()
END_OF_MAIN()