diff options
author | Boutade <thegoofist@protonmail.com> | 2019-10-18 08:40:31 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2019-10-18 08:40:31 -0500 |
commit | 6dd194ec453cbd5f8bd750fd38678dc87f42860c (patch) | |
tree | 5e6ec54b2655e5fd2294ae360ec6605594b03081 /the-price-of-a-cup-of-coffee.lisp | |
parent | 54a7f4387ed5fb4eee3e3c51909d2c274b998473 (diff) |
coffee indicator
Diffstat (limited to 'the-price-of-a-cup-of-coffee.lisp')
-rw-r--r-- | the-price-of-a-cup-of-coffee.lisp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/the-price-of-a-cup-of-coffee.lisp b/the-price-of-a-cup-of-coffee.lisp index 012f656..6ddbe3f 100644 --- a/the-price-of-a-cup-of-coffee.lisp +++ b/the-price-of-a-cup-of-coffee.lisp @@ -53,7 +53,7 @@ (setf (sdl2:rect-x *status-meter-decoration-rect*) (+ -32 (sdl2:rect-x shape) (sdl2:rect-width shape))) (setf (sdl2:rect-y *status-meter-decoration-rect*) - (+ -12 (sdl2:rect-y shape))) + (+ -16 (sdl2:rect-y shape))) (sdl2:render-copy renderer *expression-texture* :source-rect (get-expression decoration) :dest-rect *status-meter-decoration-rect*))) @@ -98,6 +98,14 @@ :percent 0.0 :max-width width))) +(defmethod render :after ((cold-meter (eql *cold-meter*)) renderer) + (let ((x (round (* 0.45 (max-width cold-meter))))) + (setf (sdl2:rect-x *status-meter-decoration-rect*) x) + (sdl2:render-copy renderer *expression-texture* + :source-rect (get-expression "coffee") + :dest-rect *status-meter-decoration-rect*))) + + ;; TODO - REIMPLEMENT TO WORK WITH *TWEENS* ;; (defun drink-coffee () ;; (let ((now (sdl2:get-ticks)) |