Can godot's start menu work along side a browser viewport?

p4prik4p4prik4 Posts: 2Member
edited January 2019 in GUI

Would it not be possible to have 1 mouse essentially operate an invisible layer of buttons that overlap exactly with a browser CSS screen?
and all mouse inputs affect both godot game functions and the website shown behind respectively.
say I want to change my loadout from the start menu before beginning/entering a game, it would change the website (shown behind invisible godot menu) for purely visual purposes and also impact the game.
the godot cursor would also need to be invisible.

I just love how powerfull CSS /javascript etc widgets + effects are.

is this too bold?


  • TwistedTwiglegTwistedTwigleg Posts: 4,793Admin

    I suppose it is doable?

    The biggest issue you are going to face with trying to do something like this is getting the website. Godot has no support for HTML and CSS, nor does Godot support JavaScript (at least, by default). This means it would be almost impossible to actually render the HTML page in Godot.

    However, I suppose what you could do instead is take a picture of the website and then use that as a texture in the background. Then you could add completely transparent buttons and other UI elements in Godot on top of the image, and simulate the workings of the website.

    I think you can make Godot’s game window completely transparent and then I suppose you could position your game window over it. The huge, huge issue would be lining everything up, especially when players can have different resolutions. Another issue is you cannot send the input events through Godot to the browser, at least not that I am aware of.

    So, it is probably doable, but it would be a lot of work to get it working. Honestly, it would probably just be easier to try and implement the widgets and effects you want in GDScript to get the look you want. That said, it is probably doable so long as you do not mind using C++/GDNative and spending a fair amount of time getting it all working.

    Hopefully this helps :smile:

  • p4prik4p4prik4 Posts: 2Member

    think OBS and how it has a preview screen (set to capture browser window).
    "instead is take a picture of the website and then use that as a texture in the background. "
    that wouldn't cut it. what draws me are the cool live effects/animations that cutting edge websites have to offer.

    I'd just want to run a browser (super lightweight) maybe not even inside Godot but rather in parallel with it like literally launching two programs at once that are both closed with the same button. so a browser.

    If it possible to use a different engine for the title screen and have it sync with the godot game before launching the game itself.
    Sorta like adobe air... like how League of Legends have their client window separate from their game window. Although I don't think they use adobe air anymore.
    ^this is probably what I was asking for actually.

    I think a feature like this would put godot in the limelight a lot; drawing web designers to make game U.I.s for it.

    staying with the browser preview behind: As for different resolutions...
    Godot would need intuitive WYSISYG type tools to create invisible windows on the fly. windows that can change with mouse interactions.
    pull up a new scene for each webpages etc.
    you could adjust everything again for each fixed dimensions offered (having like 5 or so different sizes should not be too pain staking).

    keep in mind not everything would be done in the browser. you could have regular godot interfact appear over too and make it seem as though it was in the website.

  • MegalomaniakMegalomaniak Posts: 3,997Admin

    There is no reason why you couldn't take something like webkit to develop your own launcher with it, but it will be more involved than you might expect.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file