Solved PB 6.10 B1 X64 - WebViewGadget()

Just starting out? Need help? Post your questions and find answers here.
User avatar
J. Baker
Addict
Addict
Posts: 2192
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Solved PB 6.10 B1 X64 - WebViewGadget()

Post by J. Baker »

Shouldn't the WebViewGadget() display HTML5 game?

Code: Select all

If OpenWindow(0, 0, 0, 1280, 720, "WebViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    WebViewGadget(0, 0, 0, 1280, 720)
    SetGadgetText(0, "https://www.posemotion.com/game/index.html")
  Repeat
      
  Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Last edited by J. Baker on Fri Dec 22, 2023 8:02 pm, edited 1 time in total.
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
User avatar
Kiffi
Addict
Addict
Posts: 1509
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: PB 6.10 B1 X64 - WebViewGadget()

Post by Kiffi »

Apparently something got mixed up.

At the moment you can only set the HTML text with SetGadgetText() and not the URL. See also: https://www.purebasic.fr/english/viewto ... 76#p613076

However, this one works (with the WebGadget()):

Code: Select all

If OpenWindow(0, 0, 0, 800, 800, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  WebGadget(0, 0, 0, 800, 800, "", #PB_Web_Edge)
  SetGadgetText(0, "https://www.posemotion.com/game/index.html")
  ; Note: if you want to use a local file, change last parameter to "file://" + path + filename
  Repeat
  Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Hygge
User avatar
J. Baker
Addict
Addict
Posts: 2192
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: PB 6.10 B1 X64 - WebViewGadget()

Post by J. Baker »

Oh, I did not realize. Thanks!
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
Post Reply