Du kannst es einfach so machen wie in einer der dort gepostet Lösungen oder kannst mein Quiz benutzen , habe ich später selber gemacht , gibt sicher was einfacheres aber funktioniert. Die Abfrage welcher Button gedrückt wurde kannst aber auch mit Select machen.
Code: Alles auswählen
Procedure Falsch()
MessageRequester("Falsch","Diese Antwort war leider Falsch." +Chr(10)+ "Bitte versuchen sie es erneut.")
Quit=1
EndProcedure
;Schriftarten
Global FontID1
FontID1 = LoadFont(1, "Comic Sans MS", 14)
Global FontID2
FontID2 = LoadFont(2, "Comic Sans MS", 11)
Global FontID3
FontID3 = LoadFont(3, "Comic Sans MS", 13, #PB_Font_Bold)
Global FontID4
FontID4 = LoadFont(4, "Comic Sans MS", 10, #PB_Font_Bold)
If OpenWindow(0, 394, 177, 351, 300, "Quiz", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar ) And CreateGadgetList(WindowID(0))
TextGadget(1, 15, 15, 315, 45, "Was ist die Hauptstadt von Deutschland?", #PB_Text_Center)
SetGadgetFont(1, FontID3)
ButtonGadget(2, 45, 75, 255, 30, "Bonn")
SetGadgetFont(2, FontID4)
ButtonGadget(3, 45, 120, 255, 30, "München")
SetGadgetFont(3, FontID4)
ButtonGadget(4, 45, 165, 255, 30, "Berlin")
SetGadgetFont(4, FontID4)
ButtonGadget(5, 45, 210, 255, 30, "Hamburg")
SetGadgetFont(5, FontID4)
TextGadget(6, 60, 255, 210, 45, "Copyright by DarkSkillu (c) 2007", #PB_Text_Center)
SetGadgetFont(6, FontID4)
EndIf
Repeat
EventID=WaitWindowEvent()
If EventID=#PB_Event_CloseWindow
Quit=1
EndIf
If EventID = #PB_Event_Gadget
GadgetID= 1
If EventGadget()=2
Falsch()
EndIf
If EventGadget()=3
Falsch()
EndIf
If EventGadget()=4
MessageRequester("Richtig","Diese Antwort ist Richtig!")
If OpenWindow(0, 394, 177, 351, 300, "Quiz", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar ) And CreateGadgetList(WindowID(0))
TextGadget(7, 15, 15, 315, 45, "Was ist die Hauptstadt von England?", #PB_Text_Center)
SetGadgetFont(7, FontID3)
ButtonGadget(8, 45, 75, 255, 30, "London")
SetGadgetFont(8, FontID4)
ButtonGadget(9, 45, 120, 255, 30, "Manchester")
SetGadgetFont(9, FontID4)
ButtonGadget(10, 45, 165, 255, 30, "Liverpool")
SetGadgetFont(10, FontID4)
ButtonGadget(11, 45, 210, 255, 30, "Sheffield")
SetGadgetFont(11, FontID4)
TextGadget(12, 60, 255, 210, 45, "Copyright by DarkSkillu (c) 2007", #PB_Text_Center)
SetGadgetFont(12, FontID4)
EndIf
Repeat
EventID=WaitWindowEvent()
If EventID=#PB_Event_CloseWindow
Quit=1
EndIf
If EventID = #PB_Event_Gadget
GadgetID= 1
If EventGadget()=8
MessageRequester("Richtig","Diese Antwort ist Richtig!." +Chr(10)+ "Mein Quiz ist leider hier schon zu Ende :( ")
Quit=1
EndIf
If EventGadget()=9
Falsch()
EndIf
If EventGadget()=10
Falsch()
EndIf
If EventGadget()=11
Falsch()
EndIf
EndIf
Until Quit=1
EndIf
If EventGadget()=5
Falsch()
EndIf
EndIf
Until Quit=1