Giter Club home page Giter Club logo

Comments (5)

Lecrapouille avatar Lecrapouille commented on May 23, 2024

@kcfresh53 hi ! Are you with Windows or Linux ? Can you share your project as zip in this ticket or share a link (or send it to my email if you want to keep it private) I'll investigate (you shared me CEF logs but my code also make logs (probably not displayed with Windows)) but seems to me the "scene" is not the root cause because in our project https://github.com/stigmee/stigmee the CEF node was on a scene. Maybe in your script you are closing the scene and reopening it and CEF was closed.

from gdcef.

Lecrapouille avatar Lecrapouille commented on May 23, 2024

@kcfresh53 I may have understood what you have made wrong: you only need one instance of CEF for the whole project. No more :) You should let consider it as the "engine" and be singleton i.e. the Godot update function is implicitly "pumping" CEF internal messages between CEF forked processes:

godot::register_method("_process", &GDCef::_process);

void GDCef::_process(float /*delta*/)

Therefore, do not confuse CEF with its browser views (aka tabs ... I do not know to name things, I hope the name is correct) that you are allowed to create as many as you want. My code is probably detecting that you are trying to create 2 CEF instances ...

GDCEF_ERROR("Already initialized");

... and an error message is displayed (readable in the Godot console ?) ...

push_error($CEF.get_error())

... and abort.

get_tree().quit()

Why do you need one CEF for each of your "Navigat" (ion panel ?) ? When you create a new browser view, it will be created as Godot node as a child of the CEF node. Contrary to Unity, Godot does not display them in the scene graph. Let these "private" nodes in peace : the creation function will return you their node reference, and you can store them as variables in your "Navigat" nodes.

var browser = $CEF.create_browser("https://github.com/Lecrapouille/gdcef", browser1, S.x, S.y, {"javascript":true})

var browser = $CEF.get_node(browser1)

Note : For the moment, I never tried to delete browser views there is maybe a crash because CEF and Godot both reference them.

from gdcef.

kcfresh53 avatar kcfresh53 commented on May 23, 2024

Thanks for the response, I am on windows and CEF is only used once in the project. The other pages do not hold a web view, the project is an app development base framework with customizable mobile components, multi database support (e.g superbase, firebase, SQL, etc.) and I planned on using the WebView to view native JavaScript components, local html pages, Leaflet JS maps and faster integration of other payment providers in Godot. I plan on the project being open source but its not ready yet so I will just send a project invite.

from gdcef.

Lecrapouille avatar Lecrapouille commented on May 23, 2024

Beware CEF is not supported on Android and IOs https://magpcss.org/ceforum/viewtopic.php?f=6&t=18268

from gdcef.

Lecrapouille avatar Lecrapouille commented on May 23, 2024

@kcfresh53 I have created a dev-cef branch in your project and added CEF node and 2 texture rectangles inside the 1st and 2nd panel. I added a Main.gd to your main node for the logic. Only the second browser reacts to mouse inputs, you have to add the logic to enable the good browser. You can follow my demos to add more features for your CEF.

It works nicely on my side so we can close this ticket I guess. We can continue talking about your project by email if you want :)

from gdcef.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.