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]
|
[dev-dependencies]
|
||||||
pixels-mocks = { path = "internals/pixels-mocks" }
|
pixels-mocks = { path = "internals/pixels-mocks" }
|
||||||
winit = "0.24"
|
winit = "0.25"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
|
@ -17,5 +17,5 @@ line_drawing = "0.8"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
pixels = { path = "../.." }
|
pixels = { path = "../.." }
|
||||||
randomize = "3.0"
|
randomize = "3.0"
|
||||||
winit = "0.24"
|
winit = "0.25"
|
||||||
winit_input_helper = "0.9"
|
winit_input_helper = "0.10"
|
||||||
|
|
|
@ -13,5 +13,5 @@ default = ["optimize"]
|
||||||
env_logger = "0.8"
|
env_logger = "0.8"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
pixels = { path = "../.." }
|
pixels = { path = "../.." }
|
||||||
winit = "0.24"
|
winit = "0.25"
|
||||||
winit_input_helper = "0.9"
|
winit_input_helper = "0.10"
|
||||||
|
|
|
@ -12,9 +12,13 @@ default = ["optimize"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
egui = "0.12"
|
egui = "0.12"
|
||||||
egui_wgpu_backend = "0.8"
|
egui_wgpu_backend = "0.8"
|
||||||
egui_winit_platform = "0.7"
|
|
||||||
env_logger = "0.8"
|
env_logger = "0.8"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
pixels = { path = "../.." }
|
pixels = { path = "../.." }
|
||||||
winit = "0.24"
|
winit = "0.25"
|
||||||
winit_input_helper = "0.9"
|
winit_input_helper = "0.10"
|
||||||
|
|
||||||
|
[dependencies.egui_winit_platform]
|
||||||
|
git = "https://github.com/hasenbanck/egui_winit_platform.git"
|
||||||
|
rev = "9fd92782d8de22d7882168d7b5ae7a2eb02448d9"
|
||||||
|
features = ["webbrowser"]
|
||||||
|
|
|
@ -46,14 +46,30 @@ impl Gui {
|
||||||
|
|
||||||
/// Handle input events from the window manager.
|
/// Handle input events from the window manager.
|
||||||
pub(crate) fn handle_event(&mut self, event: &winit::event::Event<'_, ()>) {
|
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.
|
/// Resize egui.
|
||||||
pub(crate) fn resize(&mut self, width: u32, height: u32) {
|
pub(crate) fn resize(&mut self, width: u32, height: u32) {
|
||||||
|
if width > 0 && height > 0 {
|
||||||
self.screen_descriptor.physical_width = width;
|
self.screen_descriptor.physical_width = width;
|
||||||
self.screen_descriptor.physical_height = height;
|
self.screen_descriptor.physical_height = height;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Update scaling factor.
|
/// Update scaling factor.
|
||||||
pub(crate) fn scale_factor(&mut self, scale_factor: f64) {
|
pub(crate) fn scale_factor(&mut self, scale_factor: f64) {
|
||||||
|
|
|
@ -13,8 +13,8 @@ default = ["optimize"]
|
||||||
env_logger = "0.8"
|
env_logger = "0.8"
|
||||||
imgui = "0.7"
|
imgui = "0.7"
|
||||||
imgui-wgpu = "0.15.1"
|
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"
|
log = "0.4"
|
||||||
pixels = { path = "../.." }
|
pixels = { path = "../.." }
|
||||||
winit = "0.24"
|
winit = "0.25"
|
||||||
winit_input_helper = "0.9"
|
winit_input_helper = "0.10"
|
||||||
|
|
|
@ -18,5 +18,5 @@ log = "0.4"
|
||||||
pixels = { path = "../.." }
|
pixels = { path = "../.." }
|
||||||
randomize = "3.0"
|
randomize = "3.0"
|
||||||
simple-invaders = { path = "simple-invaders" }
|
simple-invaders = { path = "simple-invaders" }
|
||||||
winit = "0.24"
|
winit = "0.25"
|
||||||
winit_input_helper = "0.9"
|
winit_input_helper = "0.10"
|
||||||
|
|
|
@ -13,5 +13,5 @@ default = ["optimize"]
|
||||||
env_logger = "0.8"
|
env_logger = "0.8"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
pixels = { path = "../.." }
|
pixels = { path = "../.." }
|
||||||
winit = "0.24"
|
winit = "0.25"
|
||||||
winit_input_helper = "0.9"
|
winit_input_helper = "0.10"
|
||||||
|
|
|
@ -15,5 +15,5 @@ euclid = "0.22"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
pixels = { path = "../.." }
|
pixels = { path = "../.." }
|
||||||
raqote = { git = "https://github.com/jrmuizel/raqote.git", rev = "74f0afa2be54561c1a9928e885ab95e8a4c5322d", default-features = false }
|
raqote = { git = "https://github.com/jrmuizel/raqote.git", rev = "74f0afa2be54561c1a9928e885ab95e8a4c5322d", default-features = false }
|
||||||
winit = "0.24"
|
winit = "0.25"
|
||||||
winit_input_helper = "0.9"
|
winit_input_helper = "0.10"
|
||||||
|
|
Loading…
Reference in a new issue