fonts that don't necessarily suck
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
[play-clj.g2d :refer :all]
|
||||
[clojure.pprint]
|
||||
[advent.pathfind])
|
||||
(:import [com.badlogic.gdx.graphics Pixmap Pixmap$Filter]))
|
||||
(:import [com.badlogic.gdx.graphics Pixmap Pixmap$Filter Texture Texture$TextureFilter]
|
||||
[com.badlogic.gdx.graphics.g2d TextureRegion] ))
|
||||
|
||||
(def scale 2)
|
||||
(def +screen-width+ 320)
|
||||
@@ -160,8 +161,16 @@
|
||||
:click-fn (fn [screen entities [x y]]
|
||||
(assoc-in entities [:ego :actions] (concat (path-to-actions screen entities :ego [262 80])
|
||||
[(fn [screen entities]
|
||||
(let [talk (assoc (label "Knock knock. Anyone home?" (color :white) ) :x 5 :y 100 :baseline 9000)]
|
||||
(label! talk :set-font-scale 0.2)
|
||||
|
||||
(let [font (bitmap-font "mainfont.fnt" )
|
||||
tr (bitmap-font! font :get-region)
|
||||
tx (.getTexture tr)
|
||||
_ (texture! tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
|
||||
|
||||
|
||||
talk (assoc (label "Knock knock. Anyone home?" (style :label font (color :white)) ) :x 5 :y 100 :baseline 9000)]
|
||||
|
||||
(label! talk :set-font-scale 0.25)
|
||||
(-> entities
|
||||
(assoc :talking talk)
|
||||
(update-in [:ego :actions] rest))))])))}]
|
||||
|
||||
Reference in New Issue
Block a user