Skip to content

Commit

Permalink
The desktop app settings feel broken.
Browse files Browse the repository at this point in the history
Drag release doesn't seem to trigger a redraw.

See: vladbat00/bevy_egui#292
  • Loading branch information
yrns committed Aug 1, 2024
1 parent 7f5bec5 commit 54fc103
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions examples/ex1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ struct Runic {

fn main() {
App::new()
.insert_resource(WinitSettings::desktop_app())
.insert_resource(WinitSettings::default())
.add_plugins(DefaultPlugins)
.add_plugins(EguiPlugin)
// .insert_resource(Runic::new())
.add_systems(Startup, setup)
.add_systems(Update, update)
.add_systems(
Last,
redraw
//.run_if(on_event::<AssetEvent<Image>>())
.after(Assets::<Image>::asset_events),
)
// .add_systems(
// Last,
// redraw
// //.run_if(on_event::<AssetEvent<Image>>())
// .after(Assets::<Image>::asset_events),
// )
.run();
}

Expand All @@ -37,7 +37,8 @@ fn setup(
commands.insert_resource(Runic::new(&*asset_server, &mut *textures));
}

// This isn't actually reliable, but it helps.
// This isn't actually reliable.
#[allow(unused)]
fn redraw(mut events: EventReader<AssetEvent<Image>>, mut redraw: EventWriter<RequestRedraw>) {
for _e in events.read() {
// dbg!(e);
Expand Down

0 comments on commit 54fc103

Please sign in to comment.