From 3c98f936af7754e9deb4912e54ec12a3df9b5938 Mon Sep 17 00:00:00 2001 From: equa Date: Thu, 22 Apr 2021 13:42:54 -0500 Subject: bad scaling --- lib/transition.fnl | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'lib/transition.fnl') 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] -- cgit 1.3.0-6-gf8a5