Skip to content

Commit

Permalink
Bump egui crate to 0.28.1
Browse files Browse the repository at this point in the history
  • Loading branch information
johnoneil authored and Nazariglez committed Sep 26, 2024
1 parent 872011e commit d8f545d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 27 deletions.
56 changes: 34 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ features = ["default", "glyph", "egui", "text", "extra", "audio", "links", "drop
lto = true

[dev-dependencies]
egui_demo_lib = "0.27.2"
egui_demo_lib = "0.28.1"
bytemuck = "1.14.0"

[[example]]
Expand Down
2 changes: 1 addition & 1 deletion crates/notan_egui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ notan_macro.workspace = true
log.workspace = true
bytemuck.workspace = true

egui = { version = "0.27.2", features = ["bytemuck"] }
egui = { version = "0.28.1", features = ["bytemuck"] }

[features]
links = []
Expand Down
8 changes: 5 additions & 3 deletions crates/notan_egui/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ impl Plugin for EguiPlugin {
if modifiers.ctrl || modifiers.command {
let factor = (delta_y / 200.0).exp();
self.add_event(egui::Event::Zoom(factor));
} else if cfg!(target_os = "macos") && modifiers.shift {
self.add_event(egui::Event::Scroll(egui::vec2(delta_x + delta_y, 0.0)));
} else {
self.add_event(egui::Event::Scroll(egui::vec2(*delta_x, *delta_y)));
self.add_event(egui::Event::MouseWheel {
unit: egui::MouseWheelUnit::Point,
delta: egui::vec2(*delta_x, *delta_y),
modifiers,
});
}
}
Event::MouseEnter { .. } => {}
Expand Down

0 comments on commit d8f545d

Please sign in to comment.