Skip to content

Commit

Permalink
Merge pull request #13 from laundmo/main
Browse files Browse the repository at this point in the history
fix jumping on egui click, extend egui example
  • Loading branch information
johanhelsing authored Aug 27, 2022
2 parents d360372 + 286b53d commit fe82d05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/egui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ fn egui_setup(mut egui_context: ResMut<EguiContext>) {
.resizable(false)
.show(egui_context.ctx_mut(), |ui| {
ScrollArea::vertical().show(ui, |ui| {
ui.add_space(100.);
ui.color_edit_button_rgb(&mut [0., 0., 0.]);
ui.add(egui::Slider::new(&mut 0.0, 0.0..=1.0).step_by(0.001));
ui.checkbox(&mut true, "Test");
ui.vertical(|ui| {
for i in 0..50 {
ui.label(format!("list entry number {i}"));
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ fn camera_movement(
#[cfg(feature = "bevy_egui")]
if let Some(mut egui_ctx) = egui_ctx {
if egui_ctx.ctx_mut().wants_pointer_input() || egui_ctx.ctx_mut().wants_keyboard_input() {
*last_pos = None;
return;
}
}
Expand Down

0 comments on commit fe82d05

Please sign in to comment.