sort of works.

This commit is contained in:
Bryce Covert
2016-08-10 09:06:35 -07:00
parent ee59cbbbe8
commit 507e146877

View File

@@ -134,6 +134,7 @@
(defn button-style [] (defn button-style []
(let [^TextButton$TextButtonStyle style (skin! (skin "ui/ui.json") :get TextButton$TextButtonStyle) (let [^TextButton$TextButtonStyle style (skin! (skin "ui/ui.json") :get TextButton$TextButtonStyle)
tx (-> style .font .getRegion .getTexture)] tx (-> style .font .getRegion .getTexture)]
(-> style .font .getData (.setScale 0.5))
(call! ^Texture tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear) (call! ^Texture tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
style)) style))
@@ -160,6 +161,7 @@
(defn make-checkbox (defn make-checkbox
([msg checked & rest] ([msg checked & rest]
(let [s (skin! (skin "ui/ui.json") :get CheckBox$CheckBoxStyle)] (let [s (skin! (skin "ui/ui.json") :get CheckBox$CheckBoxStyle)]
(-> s .font .getData (.setScale 0.25))
(doto (merge (check-box msg s) (doto (merge (check-box msg s)
(apply hash-map rest)) (apply hash-map rest))
(set-checkbox-state checked) (set-checkbox-state checked)
@@ -176,11 +178,12 @@
bg (drawable :nine-patch ^NinePatch (:object p)) bg (drawable :nine-patch ^NinePatch (:object p))
style (style :label font (or col (color 1.0 0.3 0.3 1.0))) style (style :label font (or col (color 1.0 0.3 0.3 1.0)))
#_#__ (set! (.background style) bg)] #_#__ (set! (.background style) bg)]
(-> style .font .getData (.setScale 0.25))
(-> msg (-> msg
(label style) (label style)
(assoc :x 0 :y 0 :height 40 :origin-x 0 :origin-y 0 :z 8) (assoc :x 0 :y 0 :height 40 :origin-x 0 :origin-y 0 :z 8)
(doto (label! :set-alignment Align/bottom) (doto (label! :set-alignment Align/bottom)
(label! :set-font-scale 0.25)
#_(#(label! % :set-width (/ (label! % :get-width) 2)))) #_(#(label! % :set-width (/ (label! % :get-width) 2))))
center)))) center))))