syncing
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 28 Nov 2021 22:28:20 +0000 (16:28 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 28 Nov 2021 22:28:20 +0000 (16:28 -0600)
tests/breakout.onyx

index ef4c34307b9af437d9d7f816fc217e7b53d53610..e074c8cde0e6e0b2608604e95389c40db61f5116 100644 (file)
@@ -2,8 +2,13 @@
 
 use package core
 
-load :: () {
+assets : struct {
+    ["./assets/fonts/mononoki-Regular Nerd Font Complete Mono.ttf", 72]
+    big_font: hb.graphics.Font;
+}
 
+load :: () {
+    hb.utils.load_assets(^assets);
 }
 
 update :: (dt: f32) {
@@ -11,5 +16,6 @@ update :: (dt: f32) {
 }
 
 draw :: () {
+    hb.graphics.setFont(assets.big_font);
     hb.graphics.print("Hello, breakout!", 100, 100);
 }
\ No newline at end of file