diff --git a/Cargo.toml b/Cargo.toml index 3dbb27f..fc97518 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,6 @@ path = "src/main.rs" [dependencies] rustc-serialize = "0.3" rand = "0.3.7" -piston_window = "0.52.0" -pistoncore-sdl2_window = "0.34.0" -piston2d-opengl_graphics = "0.32.0" +piston_window = "0.61.0" +pistoncore-sdl2_window = "0.38.0" +piston2d-opengl_graphics = "0.37.0" diff --git a/src/number_renderer.rs b/src/number_renderer.rs index 6f18468..a4cc6f9 100644 --- a/src/number_renderer.rs +++ b/src/number_renderer.rs @@ -33,7 +33,7 @@ impl NumberRenderer { for digit in digits.iter() { Image::new_color([color[0], color[1], color[2], 1.0]) - .src_rect([(*digit * DIGITS_WIDTH as u32) as i32, 0, DIGITS_WIDTH as i32, DIGITS_HEIGHT as i32]) + .src_rect([(*digit * DIGITS_WIDTH as u32) as f64, 0 as f64, DIGITS_WIDTH as f64, DIGITS_HEIGHT as f64]) .rect([x, y, width, height]) .draw(&self.image, &DrawState::default(), @@ -61,4 +61,4 @@ fn number_to_digits(number: u32) -> Vec { } digits -} +} \ No newline at end of file