Skip to content

Commit

Permalink
bumping git dep
Browse files Browse the repository at this point in the history
  • Loading branch information
sanbox-irl committed Oct 2, 2024
1 parent d83cf36 commit 0a918d3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ imgui = { version = "0.12.0", git = "https://github.com/imgui-rs/imgui-rs" }
sdl2 = "0.37"

[dev-dependencies]
imgui-glow-renderer = "0.12.0"
imgui-glow-renderer = { version = "0.13.0", git = "https://github.com/imgui-rs/imgui-glow-renderer" }
sdl2 = { version = "0.37", features = ["bundled", "static-link"] }
2 changes: 1 addition & 1 deletion examples/sdl2_01_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn main() {

/* create platform and renderer */
let mut platform = SdlPlatform::new(&mut imgui);
let mut renderer = AutoRenderer::initialize(gl, &mut imgui).unwrap();
let mut renderer = AutoRenderer::new(gl, &mut imgui).unwrap();

/* start main loop */
let mut event_pump = sdl.event_pump().unwrap();
Expand Down
24 changes: 8 additions & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,22 +350,14 @@ fn handle_key(io: &mut Io, key: &Scancode, pressed: bool) {

/// Handle changes in the key modifier states.
fn handle_key_modifier(io: &mut Io, keymod: &Mod) {
io.add_key_event(
imgui::Key::ModShift,
keymod.intersects(Mod::LSHIFTMOD | Mod::RSHIFTMOD),
);
io.add_key_event(
imgui::Key::ModCtrl,
keymod.intersects(Mod::LCTRLMOD | Mod::RCTRLMOD),
);
io.add_key_event(
imgui::Key::ModAlt,
keymod.intersects(Mod::LALTMOD | Mod::RALTMOD),
);
io.add_key_event(
imgui::Key::ModSuper,
keymod.intersects(Mod::LGUIMOD | Mod::RGUIMOD),
);
io.add_key_event(imgui::Key::LeftShift, keymod.intersects(Mod::LSHIFTMOD));
io.add_key_event(imgui::Key::RightShift, keymod.intersects(Mod::RSHIFTMOD));
io.add_key_event(imgui::Key::LeftCtrl, keymod.intersects(Mod::LCTRLMOD));
io.add_key_event(imgui::Key::RightCtrl, keymod.intersects(Mod::RCTRLMOD));
io.add_key_event(imgui::Key::LeftAlt, keymod.intersects(Mod::LALTMOD));
io.add_key_event(imgui::Key::RightAlt, keymod.intersects(Mod::RALTMOD));
io.add_key_event(imgui::Key::LeftSuper, keymod.intersects(Mod::LGUIMOD));
io.add_key_event(imgui::Key::RightSuper, keymod.intersects(Mod::RGUIMOD));
}

/// Map an imgui::MouseCursor to an equivalent sdl2::mouse::SystemCursor.
Expand Down

0 comments on commit 0a918d3

Please sign in to comment.