diff tests/test_font.nim @ 890:48e946f9b192

did: small fix with materials & cleanup
author Sam <sam@basx.dev>
date Mon, 05 Feb 2024 00:23:30 +0700
parents cbbb9abe256e
children 2b373a03cf64
line wrap: on
line diff
--- a/tests/test_font.nim	Sun Feb 04 22:07:54 2024 +0700
+++ b/tests/test_font.nim	Mon Feb 05 00:23:30 2024 +0700
@@ -1,3 +1,4 @@
+import std/times
 import std/unicode
 
 import semicongine
@@ -26,13 +27,15 @@
   scene.add help_text
   engine.loadScene(scene)
   mixer[].loadSound("key", "key.ogg")
+  mixer[].setLevel(0.5)
 
   while engine.updateInputs() == Running and not engine.keyIsDown(Escape):
+    var t = cpuTime()
+    main_text.color = newVec4f(sin(t) * 0.5 + 0.5, 0.15, 0.15, 1)
     if engine.windowWasResized():
       var winSize = engine.getWindow().size
       main_text.aspect_ratio = winSize[0] / winSize[1]
       help_text.aspect_ratio = winSize[0] / winSize[1]
-      help_text.position = newVec2f(-0.99, -0.99)
 
     # add character
     if main_text.text.len < main_text.maxLen - 1: