From 917eeef526535688e4be4ce8b06736690acb8f52 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Wed, 4 Nov 2015 21:49:30 -0800 Subject: [PATCH] disabled when not available. --- desktop/src-common/advent/screens/title.clj | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/desktop/src-common/advent/screens/title.clj b/desktop/src-common/advent/screens/title.clj index bbd899a7..5bc640e8 100644 --- a/desktop/src-common/advent/screens/title.clj +++ b/desktop/src-common/advent/screens/title.clj @@ -181,9 +181,14 @@ is-starting? (= "Begin quest" start-playing-label)] (make-table [[ (make-button start-playing-label :key :continue-or-start) :height 32] :row - [ (make-button "Load" :key :load) :height 32] + [(doto (make-button "Load" :key :load) + (text-button! :set-disabled (not (seq (utils/snapshot-list))))) :height 32] :row - [ (make-button "Chapters" :key :chapters) :height 32] + [(doto (make-button "Chapters" :key :chapters) + (text-button! :set-disabled (not (->> (utils/get-chapters) + (vals) + (filter identity) + seq)))) :height 32] :row [(make-label "Music" (color :white)) :height 32] :row