Mercurial > games > semicongine
comparison tests/test_font.nim @ 979:6406766a222d
fix: tests
author | sam <sam@basx.dev> |
---|---|
date | Sat, 06 Apr 2024 15:27:09 +0700 |
parents | 7629f85823a4 |
children | 73b572f82a1f |
comparison
equal
deleted
inserted
replaced
978:d01d318c90f0 | 979:6406766a222d |
---|---|
10 engine.initRenderer([]) | 10 engine.initRenderer([]) |
11 | 11 |
12 # build scene | 12 # build scene |
13 var scene = Scene(name: "main") | 13 var scene = Scene(name: "main") |
14 var font = loadFont("DejaVuSans.ttf", lineHeightPixels = 210'f32) | 14 var font = loadFont("DejaVuSans.ttf", lineHeightPixels = 210'f32) |
15 var origin = initPanel(size = newVec2f(0.01, 0.01)) | 15 var origin = initPanel(transform = scale(0.01, 0.01)) |
16 var main_text = font.initText("".toRunes, maxLen = 255, color = newVec4f(1, 0.15, 0.15, 1), maxWidth = 1.0, transform = scale(0.0005, 0.0005)) | 16 var main_text = font.initText("".toRunes, maxLen = 255, color = newVec4f(1, 0.15, 0.15, 1), maxWidth = 1.0, transform = scale(0.0005, 0.0005)) |
17 var help_text = font.initText("""Controls | 17 var help_text = font.initText("""Controls |
18 | 18 |
19 Horizontal alignment: | 19 Horizontal alignment: |
20 F1: Left | 20 F1: Left |