updated libraries to latest version and minor code change
This commit is contained in:
parent
771bd5f192
commit
22a77e5b69
2 changed files with 5 additions and 5 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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<u32> {
|
|||
}
|
||||
|
||||
digits
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue