mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 21:48:36 +00:00
Simplify window size accessing
This commit is contained in:
parent
3548542ca5
commit
e57df7173a
@ -76,10 +76,9 @@ impl Support {
|
||||
target.clear_color(clear_color.0, clear_color.1,
|
||||
clear_color.2, clear_color.3);
|
||||
|
||||
// Early return if the window closes before we get the sizes
|
||||
let window = match self.display.get_window() { Some(x) => x, None => return };
|
||||
let size_points = match window.get_inner_size_points() { Some(x) => x, None => return };
|
||||
let size_pixels = match window.get_inner_size_pixels() { Some(x) => x, None => return };
|
||||
let window = self.display.get_window().unwrap();
|
||||
let size_points = window.get_inner_size_points().unwrap();
|
||||
let size_pixels = window.get_inner_size_pixels().unwrap();
|
||||
|
||||
let ui = self.imgui.frame(size_points, size_pixels, delta_f);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user