Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ license = "MIT OR Apache-2.0"
categories = ["gui"]

[dependencies]
imgui = { git = "https://github.com/imgui-rs/imgui-rs", version = "0.12" }
imgui = "0.12"
winit = { version = "0.30", default-features = false }
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ impl WinitPlatform {
_ => (),
}
}
fn handle_window_event(&mut self, io: &mut Io, window: &Window, event: &WindowEvent) {

/// Handles a winit window event.
///
/// This function performs the following actions (depends on the event):
///
/// * window size / dpi factor changes are applied
/// * keyboard state is updated
/// * mouse state is updated
pub fn handle_window_event(&mut self, io: &mut Io, window: &Window, event: &WindowEvent) {
match *event {
WindowEvent::Resized(physical_size) => {
let logical_size = physical_size.to_logical(window.scale_factor());
Expand Down