improving font.
This commit is contained in:
@@ -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]]
|
||||
|
||||
Reference in New Issue
Block a user