should start with scroll focus.

This commit is contained in:
Bryce Covert
2015-11-05 08:43:46 -08:00
parent fd3bfd691a
commit b6613a5106

View File

@@ -227,7 +227,7 @@
(every-pred :save #(utils/intersects? % [x y]))
(vals entities))))
(defn saves-table [entities]
(defn saves-table [entities stage]
(let [group (doto (ButtonGroup.)
(.setMaxCheckCount 1)
(.setMinCheckCount 0)
@@ -253,19 +253,21 @@
save-screenshots (map make-save-screenshot (:saves-list entities))
grouped-screenshots (->> (partition-all 2 save-screenshots)
(mapcat (fn [group]
(conj (map make-cell group) :row))))]
[(doto (scroll-pane (table grouped-screenshots)
(conj (map make-cell group) :row))))
scroll-pane (doto (scroll-pane (table grouped-screenshots)
(skin "ui/ui.json"))
(scroll-pane! :set-fade-scroll-bars false))
(scroll-pane! :set-fade-scroll-bars false))]
(.setScrollFocus stage (:object scroll-pane))
[scroll-pane
:colspan 2 :height 224 :width 476]))
(defn saves-menu [entities]
(defn saves-menu [entities stage]
(let [save-label (make-label "")
continue-button (doto (make-button "Continue" :key :continue)
(text-button! :set-disabled true))]
(assoc (make-table [[save-label :colspan 2 :height 32]
:row
(saves-table entities)
(saves-table entities stage)
:row
[(make-button "Back" :key :back) :width 150]
[continue-button :width 150]])
@@ -393,7 +395,7 @@
(= :load actor-key)
(-> entities
(dissoc :main-menu)
(assoc :save-menu (saves-menu entities)))
(assoc :save-menu (saves-menu entities (:renderer screen))))
(= :chapters actor-key)
(-> entities