Wollte mal über eine HTML-Index meine Spiele öffnen im Purebasic. Aber der Callback reagiert nicht!
Code: Alles auswählen
Global html.s = ""
Html.s +"<form method='get' action='file:\\Z:\BUTLER\Book\INFORMENT\games\Solitaire\Solitaire_001.swf'>"
Html.s +" <button type='submit'>Continue</button>"
Html.s +"</form>"
Procedure NavigationCallback(Gadget, Url$)
If Url$= "http://www.purebasic.com/news.php"
MessageRequester("", "No news today!")
ProcedureReturn #False
Else
ProcedureReturn #True
EndIf
EndProcedure
If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 580, 280, "")
SetGadgetItemText(0, #PB_Web_HtmlCode, html)
SetGadgetAttribute(0, #PB_Web_NavigationCallback, @NavigationCallback())
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Gruss ... Velindos