Comments (11)
I don't have time to add a bevy example right now 😅 but if anyone wants to contribute one, it's more than welcome!
In the meantime, perhaps you can share your attempt @trsh? I may be able to help, but I can't think of anything where bevy_egui would make things different than the official example.
from egui_node_graph.
error[E0053]: method `value_widget` has an incompatible type for trait
--> src\node_graph.rs:89:54
|
89 | fn value_widget(&mut self, param_name: &str, ui: &mut egui::Ui) -> Vec<MyResponse> {
| ^^^^^^^^^^^^^
| |
| expected struct `egui::ui::Ui`, found struct `Ui`
| help: change the parameter type to match the trait: `&mut egui::ui::Ui`
|
= note: expected fn pointer `fn(&mut MyValueType, &str, &mut egui::ui::Ui) -> std::vec::Vec<_>`
found fn pointer `fn(&mut MyValueType, &str, &mut Ui) -> std::vec::Vec<_>`
I think it expects the Ui from eframe
from egui_node_graph.
I think you are missing a bit from line 89. It should look like:
fn value_widget(&mut self, param_name: &str, ui: &mut egui::ui::Ui) -> Vec<MyResponse> {
Do you have a link to the project on github or a way we could see more details on what you are trying to do beyond the small error quoted?
from egui_node_graph.
error[E0053]: method `value_widget` has an incompatible type for trait
--> src\node_graph.rs:88:54
|
88 | fn value_widget(&mut self, param_name: &str, ui: &mut egui::ui::Ui) -> Vec<MyResponse> {
| ^^^^^^^^^^^^^^^^^
| |
| expected struct `egui::ui::Ui`, found struct `Ui`
| help: change the parameter type to match the trait: `&mut egui::ui::Ui`
|
= note: expected fn pointer `fn(&mut MyValueType, &str, &mut egui::ui::Ui) -> std::vec::Vec<_>`
found fn pointer `fn(&mut MyValueType, &str, &mut Ui) -> std::vec::Vec<_>`
Imports
use egui::{self, DragValue, TextStyle};
use egui_node_graph::*;
I dont get it. I feed exactly the type it asks. I do not have a repo.
from egui_node_graph.
Bevy_egui uses it's own egui crate as seen in this example code:
use bevy::prelude::*;
use bevy_egui::{egui, EguiContext, EguiPlugin};
https://github.com/mvlabat/bevy_egui
Were you able to get a minimum bevy_egui example to run?
from egui_node_graph.
Yes. It works. So maybe these egui versions are clashing?
beavy_egui has depency
egui = { version = "0.19.0", default-features = false, features = ["bytemuck"] }
So I think it just exposes it
from egui_node_graph.
Tried to use like this
use bevy_egui::{
egui::{self, DragValue, TextStyle},
EguiContext, EguiPlugin,
};
and removed egui dep from my project. Same issue.
from egui_node_graph.
egui_node_graph has "egui 0.18.1" depency, bevy_egui "egui 0.19.0". Thats what I see in cargo.lock
from egui_node_graph.
You can try getting a specific commit of egui_node_graph, like: b1deb59 so that they are both using egui 0.19.
You would have to update your egui_node_graph dependency in cargo.toml:
egui_node_graph= { git = "https://github.com/setzer22/egui_node_graph.git", rev = "b1deb59" }
from egui_node_graph.
Yeah. Already took latest from git and now it works. Different versions of egui was the issue
from egui_node_graph.
Glad you figured it out! 🎉 Ending up with different versions of a crate on the same project is always a headache
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
- Performance concerns HOT 1
- give example the ability to zoom in/out and scroll side to side HOT 1
- missing input on Connection Only and then Connection/Constant node
- Handling disconnection events on node deletion is a bit cumbersome
- Persistence HOT 1
- Suggestion: Read-only mode
- 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.