Giter Club home page Giter Club logo

Comments (4)

setzer22 avatar setzer22 commented on July 23, 2024 4

Hi @philpax! Thanks for the kind words 😄

Indeed, I feel the right-click behavior should be customizable, and allowing customization for the NodeFinder menu also sounds like a good idea.

I think a good solution for this is to separate the two use cases. For node finder customization we can use the same event mechanism that is used in other parts of the code: Drawing the graph already returns a list of responses that are inspectable by the user. This could include a couple of NodeFinderShow and NodeFinderHide events which then the user can handle as they see fit (even ignore). The library will also provide a default handler that looks at these events and spawns the default node finder. The challenge here is that, unlike other event handlers, this requires drawing additional UI inside the graph. I need to think about the best mechanism for doing this.

As for the right click itself, this library needs a way to customize all input. Middle mouse click to pan is also another hard-coded choice that not all users may agree with. I think I have a good idea for creating a completely configurable input system with sane defaults.

I don't have a lot of time for open source stuff lately (hopefully this is going to improve soon 👍), but I'll keep this in mind, I've been meaning to take care of this for a while. In the meantime, anyone interested feel free to work on this! I'd be happy to elaborate more about the solutions I outlined above.

from egui_node_graph.

setzer22 avatar setzer22 commented on July 23, 2024

I think separating the right click menu from the core is reasonable 👍

But I'm also thinking we still want to be "batteries included" to some extent. I think a good compromise here would be to provide things like this as opt-in. The menu right now is a bit bare-bones, but I'm planning to keep improving it with a smarter search, categories and other features that may be appealing to other users, and are not so trivial to reimplement on each user's code.

from egui_node_graph.

francesco-cattoglio avatar francesco-cattoglio commented on July 23, 2024

Maybe we can provide a "util" or "extras" namespace for all the batteries that we might want to include. I will keep this in mind when tinkering around.

from egui_node_graph.

philpax avatar philpax commented on July 23, 2024

Hey there! Not sure if I should open a new issue for this or not, but I figured this would be a good place to mention it: I'm using egui_node_graph on the web, and while disabling right-clicking on the rendering element is fine, it'd still be nice to be able to customise the behaviour.

My immediate suggestion is to allow for changing/turning off the trigger condition for the NodeFinder. I believe it should be possible to design things such that NodeFinder opens up on right-click by default, but you should be able to change that entirely, including using your own finder menu.

I've not looked at the current implementation in any great detail, but my feeling is that it should be possible to offer the current experience as a default set of "application systems" atop the node-graph core, and let users build their own systems if necessary. I'm thinking about how, for example, you can compose behaviours using the same components and different systems in Bevy.

Anyway, not particularly pressing - disabling web right click works - but this library's already fantastic, it'd be great to make it even more versatile 😄

from egui_node_graph.

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.