Remove SDL2 integration

It's too simple and not worth having in this library
This commit is contained in:
Joonas Javanainen 2015-09-27 15:58:04 +03:00
parent 91eec219f6
commit 05b3067aba
2 changed files with 0 additions and 24 deletions

View File

@ -23,10 +23,6 @@ optional = true
path = "imgui-sys"
version = "0.0.3"
[dependencies.sdl2]
version = "0.7"
optional = true
[build-dependencies]
gcc = "0.3"

View File

@ -6,9 +6,6 @@ extern crate imgui_sys;
extern crate libc;
#[cfg(feature = "sdl2")]
extern crate sdl2;
use libc::{c_char, c_float, c_int, c_uchar};
use std::borrow::Cow;
use std::convert::From;
@ -256,23 +253,6 @@ impl Drop for ImGui {
static mut CURRENT_UI: Option<Ui<'static>> = None;
#[cfg(feature = "sdl2")]
impl ImGui {
pub fn update_mouse(&mut self, mouse: &::sdl2::mouse::MouseUtil) {
let (mouse_state, mouse_x, mouse_y) = mouse.get_mouse_state();
let io = self.io_mut();
io.mouse_pos.x = mouse_x as f32;
io.mouse_pos.y = mouse_y as f32;
io.mouse_down = [
mouse_state.left(),
mouse_state.right(),
mouse_state.middle(),
mouse_state.x1(),
mouse_state.x2()
];
}
}
pub struct DrawList<'a> {
pub cmd_buffer: &'a [imgui_sys::ImDrawCmd],
pub idx_buffer: &'a [imgui_sys::ImDrawIdx],