Comments (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
from egui_node_graph.
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.
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.
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)
- Add topological iterator to Graph class HOT 1
- Easy way to create pre-existing graph state? HOT 1
- The node finder should use `button_released(MouseButton::Secondary)` when available
- Zoom in/out supported by default (like in blackjack)? HOT 2
- Port Snapping doesn't take InputParamKind::ConstantOnly into account HOT 4
- Bump egui version to 0.19.0 HOT 2
- Change UserState to outside of GraphEditorState HOT 6
- Cannot use more than one node_graph in an egui app HOT 2
- Please add minimalistic example using bevy_egui HOT 11
- Buttons drawn on (after) the graph doesn't working. HOT 4
- The example doesn't work with version 0.3.0 HOT 3
- Would be nice with an example using Bevy and bevy-egui together with this project HOT 1
- Right click output - create node and connect HOT 1
- Incorrect draw order HOT 1
- Hide close button of node widget HOT 3
- New crates.io release HOT 1
- Cant Compile to web HOT 1
- Remove Widget on input connection HOT 1
- Cannot use because Color32 is not in epaint::color::Color32 HOT 4
- Feature request - allow labeling of edges HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egui_node_graph.