From 3f8e92bc6d044fb695e97fc307890cd394a222f4 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 22 Aug 2024 12:38:42 +0300 Subject: [PATCH] examples: make draw_static_text.v show the font name too, for easier comparisons --- examples/ttf_font/draw_static_text.v | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/ttf_font/draw_static_text.v b/examples/ttf_font/draw_static_text.v index 65db6f4afa..9f0e4a4126 100644 --- a/examples/ttf_font/draw_static_text.v +++ b/examples/ttf_font/draw_static_text.v @@ -34,11 +34,12 @@ pub mut: fn my_init(mut app App_data) { app.init_flag = true - texts := ['Hello', block_txt]! + texts := ['Hello, font: ${os.file_name(custom_font_path)}', block_txt]! + dump(texts[0]) for i in 0 .. 2 { mut txt := unsafe { &app.ttf_render[i] } txt.destroy_texture() - txt.create_text_block(texts[i], 600, 600, 24 + (1 - i) * 24) + txt.create_text_block(texts[i], 600, 600, 24) txt.create_texture() } }