mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
examples: make draw_static_text.v show the font name too, for easier comparisons
This commit is contained in:
parent
e6b8162bfa
commit
3f8e92bc6d
1 changed files with 3 additions and 2 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue