Mercurial > games > semicongine
diff tests/test_font.nim @ 371:f054b8bacab8
fix: tests, test_materials and test_mesh still needs to be done
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 22 Nov 2023 23:24:47 +0700 |
parents | b83b3a1ccb05 |
children | e50c57423567 |
line wrap: on
line diff
--- a/tests/test_font.nim Wed Nov 22 23:24:07 2023 +0700 +++ b/tests/test_font.nim Wed Nov 22 23:24:47 2023 +0700 @@ -3,15 +3,17 @@ import semicongine proc main() = + # setup engine + var engine = initEngine("Test fonts") + engine.initRenderer([]) + + # build scene + var scene = Scene(name: "main") var font = loadFont("DejaVuSans.ttf", color=newVec4f(1, 0.5, 0.5, 1), resolution=20) - var textbox = initTextbox(32, font, "") - var scene = Scene(name: "main") scene.add textbox textbox.mesh.transform = scale(0.01, 0.01) - var engine = initEngine("Test fonts") - engine.initRenderer([]) - engine.addScene(scene) + engine.loadScene(scene) while engine.updateInputs() == Running and not engine.keyIsDown(Escape): if engine.windowWasResized():