Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide ability to use GIT egui #91

Closed
justacec opened this issue Apr 18, 2022 · 6 comments
Closed

Provide ability to use GIT egui #91

justacec opened this issue Apr 18, 2022 · 6 comments

Comments

@justacec
Copy link

justacec commented Apr 18, 2022

I have a situation where I would like to use a Table widget. This is not built into the released version of egui right now, but seems as though a recent merge to master has provided some basic functionality. Is there a way (without forking bevy_egui) that I can get bevy_egui to use the GIT version of egui? Right now it seems as though it is hard coded.

See discussion at emilk/egui#296 and emilk/egui#963 for more details.

Possibly adding a feature flag for a specific git branch of egui would be nice.

@vladbat00
Copy link
Owner

vladbat00 commented Apr 18, 2022

Hi @justacec! I haven't looked into the most recent Egui changes in git yet, but there's a chance that the current version of bevy_egui is compatible with it. To make your project use the git version, you can put the following into your Cargo.toml:

[patch.crates-io]
egui = { git = "https://github.com/emilk/egui.git" }

Let me know if that works!

@justacec
Copy link
Author

justacec commented Apr 19, 2022

Humm. Looks like it did not work:

bash-3.2$ cargo build
    Updating git repository `https://github.com/emilk/egui.git`
error: failed to select a version for `egui`.
    ... required by package `bevy_egui v0.13.0`
    ... which satisfies dependency `bevy_egui = "^0.13"` (locked to 0.13.0) of package `FirmwareClient v0.1.0 (/Users/justaceclutter/Desktop/Topics/RocketTracker/FirmwareClient)`
versions that meet the requirements `^0.17` (locked to 0.17.0) are: 0.17.0

the package `bevy_egui` depends on `egui`, with features: `convert_bytemuck` but `egui` does not have these features.

Seems that the egui author refactored the crates features and changed convert_bytemuck to just bytemuck. The commit is at emilk/egui@cf0338d.

@vladbat00
Copy link
Owner

I tried to make a quick upgrade to the git version but stumbled upon some other breaking changes and new features that aren't quite trivial to implement. Unfortunately, I don't have enough time to work on that at the moment. But I'll try my best to release a new version of bevy_egui as soon as the new version of Egui lands on crates.io.

@justacec
Copy link
Author

justacec commented Apr 26, 2022

:). Thanks for looking into it. It's ok. I have things working as of now. But not with GIT bevy.

I went ahead and made a mock table with Grid and will switch it ip as soon as there is a release.

No need to change up your flow for me. :)

@vladbat00
Copy link
Owner

vladbat00 commented Apr 27, 2022

Ok, I figured I won't include PaintCallback (that untrivial thing I mentioned) support in the release, as I have no idea how to make it work with Bevy. Here's the branch supporting the new version: #99

@justacec
Copy link
Author

Just got done making the adjustments in my Cargo.toml file:

bevy_egui = { git = "https://github.com/mvlabat/bevy_egui.git", branch = "egui-0.18"}

[patch.crates-io]
egui = { git = "https://github.com/emilk/egui.git" }

Worked like a charm. Now to go play with the newer table stuff in egui.

Closing this issue. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants