summary refs log tree commit diff
path: root/lib/transition.fnl
diff options
context:
space:
mode:
authorequa <equaa@protonmail.com>2021-04-22 13:42:54 -0500
committerequa <equaa@protonmail.com>2021-04-22 13:42:54 -0500
commit3c98f936af7754e9deb4912e54ec12a3df9b5938 (patch)
treee0d4299665116de3def40bb57e3d3fcb044c0af0 /lib/transition.fnl
parentac0c1a1a6289998ed6f18a1f01772053d0b28d30 (diff)
bad scaling
Diffstat (limited to 'lib/transition.fnl')
-rw-r--r--lib/transition.fnl21
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/transition.fnl b/lib/transition.fnl
index 376f123..096de9e 100644
--- a/lib/transition.fnl
+++ b/lib/transition.fnl
@@ -7,22 +7,27 @@
   (state.draw self.present-state)
   ;; TODO: translation
   (love.graphics.reset)
+  (love.graphics.translate (/ width 2) (/ height 2))
+  ;; TODO: this scaling is pretty limited and should probably get bigger!
+  (local scale (if (> height 600)
+                   2
+                   1))
   (love.graphics.setColor 0.8 0.8 0.8 (/ (math.max 0 (- self.age 30)) 10))
-  (love.graphics.setFont font.big)
+  (love.graphics.setFont (. font (* 48 scale)))
   (love.graphics.printf (string.format
                           (. translation.text self.type 1)
                           (and self.level (translation.text.number self.level)))
-                        (- (/ width 2) 500)
-                        (- (/ height 2) 64)
-                        1000
+                        (* scale -500)
+                        (* scale -64)
+                        (* scale 1000)
                         :center)
-  (love.graphics.setFont font.small)
+  (love.graphics.setFont (. font (* 12 scale)))
   (love.graphics.printf (string.format
                           (. translation.text self.type 2)
                           (and self.level (translation.text.number self.level)))
-                        (- (/ width 2) 500)
-                        (+ (/ height 2))
-                        1000
+                        (* scale -500)
+                        0
+                        (* scale 1000)
                         :center))
 
 (fn update [self]