improving font.

This commit is contained in:
2015-03-16 12:51:52 -07:00
parent fbec0dc46d
commit c0521ac45b
16 changed files with 196 additions and 189 deletions

View File

@@ -56,15 +56,16 @@
tr (bitmap-font! font :get-region)
scale (or (min (max scale 0.75) 1) 1)
tx (.getTexture tr)
_ (texture! tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
_ (texture! tx :set-filter Texture$TextureFilter/Nearest Texture$TextureFilter/Nearest)
style (style :label font color)
#__ #_(set! (.background style) bg)
[source-x source-y] [x y]
[x y] (scene-world->talk-world scene-viewport [source-x
source-y])
talk (assoc (label text style :set-font-scale scale :set-alignment Align/center)
:source-x source-x :source-y source-y)
talk (assoc (label text style :set-font-scale 1.0 :set-alignment Align/center)
:source-x source-x :source-y source-y
)
x (- x (/ (label! talk :get-width) 2))
talk (assoc talk :x x :y y)
talk (ensure-on-screen talk)]
@@ -79,7 +80,8 @@
(-> entities
(assoc-in [:dialogue :x] (- x (/ (label! dialogue :get-width) 2)))
(assoc-in [:dialogue :y] y)
(update-in [:dialogue] ensure-on-screen)))))
(update-in [:dialogue] ensure-on-screen)
))))
:stop-talk
(fn [{:keys [target-id] } [entities]]