Compatibility with `bevy_egui`.
Closed this issue · 1 comments
Oglo12 commented
I tried using this crate with bevy_egui
, but it doesn't like it. The code is just incompatible. Won't even compile. It is because you require the standard Egui context.
Barugon commented
It works.
use bevy::prelude::*;
use bevy_egui::{EguiContexts, EguiPlugin};
use egui_file::FileDialog;
fn main() {
let mut dialog = FileDialog::open_file(None);
dialog.open();
let ui_example_system = move |mut contexts: EguiContexts| {
dialog.show(contexts.ctx_mut());
};
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(EguiPlugin)
.add_systems(Update, ui_example_system)
.run();
}