testing out alternative font.

This commit is contained in:
Bryce Covert
2016-02-22 21:21:45 -08:00
parent 42bcdbc423
commit 3f88c8cd74
12 changed files with 453 additions and 212 deletions

View File

@@ -67,7 +67,7 @@
[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)
talk (assoc (label text style :set-font-scale scale :set-alignment Align/bottom)
:source-x source-x :source-y source-y
)
x (- x (/ (label! talk :get-width) 2))
@@ -98,7 +98,7 @@
:on-resize (fn [{:keys [viewport width height]} entities]
(.update viewport width height)))
(def choice-height 30)
(def choice-height 40)
@@ -146,8 +146,8 @@
font (get-in entities [:state :font])]
(-> entities
(into (for [[[text] i] (map vector choices (range))
:let [e (label text (style :label font (color 0.6 1.0 1.0 1.0)))
e (assoc e :height 30 :x 30 :y (+ 30 (* choice-height (- choice-count i 1))) :index i)
:let [e (label text (style :label font (color 0.6 1.0 1.0 1.0)) :set-alignment Align/bottom)
e (assoc e :height choice-height :x 30 :y (+ 25 (* choice-height (- choice-count i 1))) :index i)
e (style-label e font (get-in entities [:state :last-pos]))]]
[i (doto e
(label! :set-x (:x e))
@@ -155,7 +155,7 @@
(label! :set-height (:height e)))]))
(assoc-in [:state :choices] choices)
(assoc-in [:state :callback] callback)
(assoc-in [:state :np :height] (* 30 (inc choice-count))))))
(assoc-in [:state :np :height] (* choice-height (inc choice-count))))))
:on-touch-up (fn [screen [entities]]
(let [[x y] (utils/unproject screen)]