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

@@ -141,6 +141,7 @@
([msg & rest]
(let [button (merge (text-button msg (button-style))
(apply hash-map rest))]
(doto button save-object ))))
(defn make-label
@@ -150,9 +151,9 @@
(let [font (utils/get-font "ego/font.fnt")]
(-> msg
(label (style :label font (or col (color 1.0 0.3 0.3 1.0))))
(assoc :x 0 :y 0 :height 32 :origin-x 0 :origin-y 0 :z 8)
(assoc :x 0 :y 0 :height 40 :origin-x 0 :origin-y 0 :z 8)
center
(doto (label! :set-alignment Align/center))))))
(doto (label! :set-alignment Align/bottom))))))
(defn make-slider [initial-value & rest]
(let [ui-skin (skin "ui/ui.json")
@@ -167,7 +168,7 @@
save-object)))
(defn stack-y [label base index]
(assoc label :y (- base (* 32 index))))
(assoc label :y (- base (* 50 index))))
(defn make-table [children]
(-> children
@@ -221,13 +222,13 @@
(defn settings-menu []
(let [fullscreen-button (make-button "Fullscreen" :key :toggle-fullscreen)]
(assoc (make-table [[(make-label "Settings" label-color) :height 32 :pad-bottom 4]
(assoc (make-table [[(make-label "Settings" label-color) :height 40 :pad-bottom 4]
:row
[(make-label "Music" label-color) :height 32 :pad-bottom 4]
[(make-label "Music" label-color) :height 40 :pad-bottom 4]
:row
[(make-slider (:music-volume @utils/settings) :key :music-volume-slider) :width 240 :pad-bottom 4]
:row
[(make-label "FX" label-color) :height 32 :width 200 :pad-bottom 4]
[(make-label "FX" label-color) :height 40 :width 200 :pad-bottom 4]
:row
[(make-slider (:sound-volume @utils/settings) :key :sound-volume-slider) :width 240 :pad-bottom 4]
:row
@@ -275,7 +276,7 @@
(scroll-pane! :set-fade-scroll-bars false))]
(.setScrollFocus stage (:object scroll-pane))
[scroll-pane
:colspan 3 :height 212 :pad-bottom 4 :width 472]))
:colspan 3 :height 190 :pad-bottom 4 :width 472]))
(defn saves-menu [entities stage]
(let [save-label (make-label "" label-color)
@@ -283,7 +284,7 @@
(text-button! :set-disabled true))
delete-button (doto (make-button "Delete" :key :delete)
(text-button! :set-disabled true))]
(assoc (make-table [[save-label :colspan 3 :height 32]
(assoc (make-table [[save-label :colspan 3 :height 55]
:row
(saves-table entities stage)
:row