realigning certain components.

This commit is contained in:
Bryce Covert
2017-03-11 20:50:32 -08:00
parent 16fe82d2a4
commit 406eb76467
3 changed files with 22 additions and 22 deletions

View File

@@ -215,23 +215,22 @@
(defn main-menu [screen]
(let [start-playing-label (quest-label)
is-starting? (= "Begin Quest" start-playing-label)]
(make-table [[(make-button start-playing-label :key :continue-or-start) :height (* utils/ui-scale 56) :pad-bottom 4 :width (* utils/ui-scale 250)]
:row
[(doto (make-button "Load" :key :load)
(text-button! :set-disabled (not (seq (utils/snapshot-list))))) :height (* utils/ui-scale 56) :pad-bottom 4 :width (* utils/ui-scale 250)]
:row
[(doto (make-button "Chapters" :key :chapters)
(text-button! :set-disabled (not (->> (utils/get-chapters)
(vals)
(filter identity)
seq)))) :height (* utils/ui-scale 56) :pad-bottom 4 :width (* utils/ui-scale 250)]
:row
[(make-button "Settings" :key :settings) :height (* utils/ui-scale 56) :pad-bottom 4 :width (* utils/ui-scale 250)]
:row
[(make-button "End Quest" :key :end-quest) :height (* utils/ui-scale 56) :width (* utils/ui-scale 250)]
])))
(make-table (concat [[(make-button start-playing-label :key :continue-or-start) :height (* utils/ui-scale 56) :pad-bottom 4 :width (* utils/ui-scale 250)]
:row
[(doto (make-button "Load" :key :load)
(text-button! :set-disabled (not (seq (utils/snapshot-list))))) :height (* utils/ui-scale 56) :pad-bottom 4 :width (* utils/ui-scale 250)]
:row
[(doto (make-button "Chapters" :key :chapters)
(text-button! :set-disabled (not (->> (utils/get-chapters)
(vals)
(filter identity)
seq)))) :height (* utils/ui-scale 56) :pad-bottom 4 :width (* utils/ui-scale 250)]]
(when-not utils/mobile?
[:row
[(make-button "Settings" :key :settings) :height (* utils/ui-scale 56) :pad-bottom 4 :width (* utils/ui-scale 250)]
:row
[(make-button "End Quest" :key :end-quest) :height (* utils/ui-scale 56) :width (* utils/ui-scale 250)]])))))
(defn chapters-menu []
(let [chapters (utils/get-chapters)
@@ -353,7 +352,7 @@
(let [entities {:background (assoc (utils/get-texture "title/background.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 0)
:cloud-background (assoc (utils/get-texture "title/clouds.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 2)
:banner-back (assoc (animation->texture (assoc screen :total-time 0.0) banner-back) :x 580 :y 400 :scale-x 4 :scale-y 4
:banner-back (assoc (animation->texture (assoc screen :total-time 0.0) banner-back) :origin-x 85 :origin-y 150 :x 640 :y 960 :scale-x (/ 4 utils/ui-scale) :scale-y (/ 4 utils/ui-scale)
:anim banner-back
:z 3)
:quill (doto (assoc (image-button (BaseDrawable.)) :x 1150 :y 4 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 10 :key :quill)
@@ -364,7 +363,7 @@
save-object
(#(utils/add-actor-to-stage screen %)))
:logo (assoc (utils/get-texture "title/logo.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 6)
:logo (assoc (utils/get-texture "title/logo.png" ) :x 640 :y 960 :scale-x (/ 4 utils/ui-scale) :scale-y (/ 4 utils/ui-scale) :origin-x 160 :origin-y 240 :z 6)
:fade (assoc (utils/get-texture "black.png")
:scale-x 80
:scale-y 80