Skip to content

Commit ded95b9

Browse files
ollejnot-fl3
authored andcommitted
Fix text glitch in arkanoid example
Fixes not-fl3#117
1 parent efe7883 commit ded95b9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

examples/arkanoid.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,18 @@ async fn main() {
4242
ball_x += dx * delta;
4343
ball_y += dy * delta;
4444
} else {
45-
draw_text(
45+
let (font_size, font_scale, font_aspect) = camera_font_scale(1.);
46+
let text_params = TextParams {
47+
font_size,
48+
font_scale,
49+
font_scale_aspect: font_aspect,
50+
..Default::default()
51+
};
52+
draw_text_ex(
4653
"Press space to start",
4754
SCR_W / 2. - 5.,
4855
SCR_H / 2.,
49-
1.,
50-
BLACK,
56+
text_params,
5157
);
5258

5359
ball_x = platform_x;

0 commit comments

Comments
 (0)