n00kii / egui-modal

a simple modal library for egui
MIT License
65 stars 10 forks source link

[suggestion] bevy_egui support #7

Closed robbiemu closed 1 year ago

robbiemu commented 1 year ago

I was hoping I could drop this into a bevy_egui app, which I am building to learn bevy (perhaps I'm the wrong person to get very detailed into what people would want!). But this indicates:

error[E0308]: mismatched types --> src/menu.rs:100:14 100 Modal::new(contexts.ctx_mut(), LOAD_MAP_MODAL_TITLE).show( ui { ---------- ^^^^^^^^^^^^^^^^^^ expected &Context, found &mut Context
arguments to this function are incorrect
= note: `bevy_egui::egui::Context` and `egui::context::Context` have similar names, but are actually distinct types
n00kii commented 1 year ago

what version of bevy_egui are you using? its likely that it is reexporting a different version of egui

n00kii commented 1 year ago

it seems the latest version of bevy_egui uses egui = "0.21.0", but the latest version of this crate uses egui = "0.22.0"

there seems to be an open pull request for updating the dep here though im not sure when/how the bevy_egui team will get to that

in the meantime, perhaps you could specify the updated branch as a git dependancy

n00kii commented 1 year ago

closing to inactivity

calteran commented 1 year ago

PR #184 hasn't been merged yet. I'm having this same error with updated bevy_notify and bevy_inspector_egui. Perhaps this issue should be reopened for visibility?

n00kii commented 1 year ago

seems like its been merged, closing again