Skip to content

Commit 6eb8005

Browse files
committed
use a hack to allow drawing a single string on top of everything else
hack was necessary because `Drop` tyes are currently not allowed in statics. see rust-lang/rust#33156 Signed-off-by: Ryan1729 <Ryan1729@gmail.com>
1 parent 1c66cb4 commit 6eb8005

File tree

3 files changed

+430
-196
lines changed

3 files changed

+430
-196
lines changed

common/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ extern crate rand;
22

33
use rand::{StdRng, Rng};
44

5-
pub fn random_string(rng : &mut StdRng) -> String {
6-
rng.gen_ascii_chars()
7-
.take(6).collect()
5+
pub fn random_string(rng: &mut StdRng) -> String {
6+
rng.gen_ascii_chars().take(6).collect()
87
}
98

109
pub struct Platform {
1110
pub draw_poly: fn(f32, f32, usize),
1211
pub draw_poly_with_matrix: fn([f32; 16], usize),
1312
pub draw_textured_poly: fn(f32, f32, usize, i32),
1413
pub draw_textured_poly_with_matrix: fn([f32; 16], usize, i32),
14+
pub draw_text: fn(&str, (f32, f32), f32, f32),
1515
pub set_verts: fn(Vec<Vec<f32>>),
1616
}
1717

0 commit comments

Comments
 (0)