Update winit to 0.25 (#168)
- Update winit - Update egui_winit_platform - Update imgui_winit_support - Fix hyperlink and resize in `egui-winit` example
This commit is contained in:
parent
355448a7f1
commit
b76ae1f7bc
|
@ -27,7 +27,7 @@ wgpu = "0.8.1"
|
|||
|
||||
[dev-dependencies]
|
||||
pixels-mocks = { path = "internals/pixels-mocks" }
|
||||
winit = "0.24"
|
||||
winit = "0.25"
|
||||
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
|
|
|
@ -17,5 +17,5 @@ line_drawing = "0.8"
|
|||
log = "0.4"
|
||||
pixels = { path = "../.." }
|
||||
randomize = "3.0"
|
||||
winit = "0.24"
|
||||
winit_input_helper = "0.9"
|
||||
winit = "0.25"
|
||||
winit_input_helper = "0.10"
|
||||
|
|
|
@ -13,5 +13,5 @@ default = ["optimize"]
|
|||
env_logger = "0.8"
|
||||
log = "0.4"
|
||||
pixels = { path = "../.." }
|
||||
winit = "0.24"
|
||||
winit_input_helper = "0.9"
|
||||
winit = "0.25"
|
||||
winit_input_helper = "0.10"
|
||||
|
|
|
@ -12,9 +12,13 @@ default = ["optimize"]
|
|||
[dependencies]
|
||||
egui = "0.12"
|
||||
egui_wgpu_backend = "0.8"
|
||||
egui_winit_platform = "0.7"
|
||||
env_logger = "0.8"
|
||||
log = "0.4"
|
||||
pixels = { path = "../.." }
|
||||
winit = "0.24"
|
||||
winit_input_helper = "0.9"
|
||||
winit = "0.25"
|
||||
winit_input_helper = "0.10"
|
||||
|
||||
[dependencies.egui_winit_platform]
|
||||
git = "https://github.com/hasenbanck/egui_winit_platform.git"
|
||||
rev = "9fd92782d8de22d7882168d7b5ae7a2eb02448d9"
|
||||
features = ["webbrowser"]
|
||||
|
|
|
@ -46,13 +46,29 @@ impl Gui {
|
|||
|
||||
/// Handle input events from the window manager.
|
||||
pub(crate) fn handle_event(&mut self, event: &winit::event::Event<'_, ()>) {
|
||||
self.platform.handle_event(event);
|
||||
use winit::dpi::PhysicalSize;
|
||||
use winit::event::Event::WindowEvent;
|
||||
use winit::event::WindowEvent::Resized;
|
||||
|
||||
match &event {
|
||||
WindowEvent {
|
||||
event:
|
||||
Resized(PhysicalSize {
|
||||
width: 0,
|
||||
height: 0,
|
||||
}),
|
||||
..
|
||||
} => (),
|
||||
_ => self.platform.handle_event(event),
|
||||
}
|
||||
}
|
||||
|
||||
/// Resize egui.
|
||||
pub(crate) fn resize(&mut self, width: u32, height: u32) {
|
||||
self.screen_descriptor.physical_width = width;
|
||||
self.screen_descriptor.physical_height = height;
|
||||
if width > 0 && height > 0 {
|
||||
self.screen_descriptor.physical_width = width;
|
||||
self.screen_descriptor.physical_height = height;
|
||||
}
|
||||
}
|
||||
|
||||
/// Update scaling factor.
|
||||
|
|
|
@ -13,8 +13,8 @@ default = ["optimize"]
|
|||
env_logger = "0.8"
|
||||
imgui = "0.7"
|
||||
imgui-wgpu = "0.15.1"
|
||||
imgui-winit-support = "0.7"
|
||||
imgui-winit-support = { version = "0.7.1", default-features = false, features = ["winit-25"] }
|
||||
log = "0.4"
|
||||
pixels = { path = "../.." }
|
||||
winit = "0.24"
|
||||
winit_input_helper = "0.9"
|
||||
winit = "0.25"
|
||||
winit_input_helper = "0.10"
|
||||
|
|
|
@ -18,5 +18,5 @@ log = "0.4"
|
|||
pixels = { path = "../.." }
|
||||
randomize = "3.0"
|
||||
simple-invaders = { path = "simple-invaders" }
|
||||
winit = "0.24"
|
||||
winit_input_helper = "0.9"
|
||||
winit = "0.25"
|
||||
winit_input_helper = "0.10"
|
||||
|
|
|
@ -13,5 +13,5 @@ default = ["optimize"]
|
|||
env_logger = "0.8"
|
||||
log = "0.4"
|
||||
pixels = { path = "../.." }
|
||||
winit = "0.24"
|
||||
winit_input_helper = "0.9"
|
||||
winit = "0.25"
|
||||
winit_input_helper = "0.10"
|
||||
|
|
|
@ -15,5 +15,5 @@ euclid = "0.22"
|
|||
log = "0.4"
|
||||
pixels = { path = "../.." }
|
||||
raqote = { git = "https://github.com/jrmuizel/raqote.git", rev = "74f0afa2be54561c1a9928e885ab95e8a4c5322d", default-features = false }
|
||||
winit = "0.24"
|
||||
winit_input_helper = "0.9"
|
||||
winit = "0.25"
|
||||
winit_input_helper = "0.10"
|
||||
|
|
Loading…
Reference in a new issue