not looking SO janky.
This commit is contained in:
@@ -9,10 +9,10 @@
|
|||||||
|
|
||||||
|
|
||||||
(def chapter-name
|
(def chapter-name
|
||||||
{:chapter-1 "Chapter 1: Our tale's beginning"
|
{:chapter-1 "Part 1: Our tale's beginning"
|
||||||
:chapter-2 "Chapter 2: To be a knight"
|
:chapter-2 "Part 2: To be a knight"
|
||||||
:chapter-3 "Chapter 3: In the slammer"
|
:chapter-3 "Part 3: In the slammer"
|
||||||
:chapter-4 "Chapter 4: Prisoner on the loose"
|
:chapter-4 "Part 4: Tick the ex-con"
|
||||||
:chapter-5 "Chapter 5: Slingshot stew"})
|
:chapter-5 "Part 5: Slingshot stew"})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -206,18 +206,22 @@
|
|||||||
])))
|
])))
|
||||||
|
|
||||||
(defn chapters-menu []
|
(defn chapters-menu []
|
||||||
(let [chapters (utils/get-chapters)]
|
(let [chapters (utils/get-chapters)
|
||||||
(make-table
|
chapter-table (table
|
||||||
(concat (mapcat identity
|
(mapcat identity
|
||||||
(for [chapter [:chapter-1 :chapter-2 :chapter-3 :chapter-4 :chapter-5]]
|
(for [chapter [:chapter-1 :chapter-2 :chapter-3 :chapter-4 :chapter-5]]
|
||||||
[[(doto (make-button (if (chapter chapters)
|
[[(doto (make-button (if (chapter chapters)
|
||||||
(saves/chapter-name chapter)
|
(saves/chapter-name chapter)
|
||||||
"---")
|
"---")
|
||||||
:chapter (chapter chapters))
|
:chapter (chapter chapters))
|
||||||
(text-button! :set-disabled (nil? (chapter chapters)))) :height 56 :pad-bottom 4]
|
(text-button! :set-disabled (nil? (chapter chapters)))) :height 56 :pad-bottom 4 :width 400]
|
||||||
:row]))
|
:row])))]
|
||||||
[
|
|
||||||
[ (make-button "Back" :key :back) :height 56]]))))
|
(make-table [[(doto (scroll-pane chapter-table
|
||||||
|
(skin "ui/ui.json"))
|
||||||
|
(scroll-pane! :set-fade-scroll-bars false)) :height 240 :width 476]
|
||||||
|
:row
|
||||||
|
[ (make-button "Back" :key :back) :height 56]])))
|
||||||
|
|
||||||
(defn get-selected-save [entities [x y]]
|
(defn get-selected-save [entities [x y]]
|
||||||
(first (filter
|
(first (filter
|
||||||
@@ -253,11 +257,11 @@
|
|||||||
(mapcat (fn [group]
|
(mapcat (fn [group]
|
||||||
(conj (map make-cell group) :row))))
|
(conj (map make-cell group) :row))))
|
||||||
scroll-pane (doto (scroll-pane (table grouped-screenshots)
|
scroll-pane (doto (scroll-pane (table grouped-screenshots)
|
||||||
(skin "ui/ui.json"))
|
(skin "ui/ui.json"))
|
||||||
(scroll-pane! :set-fade-scroll-bars false))]
|
(scroll-pane! :set-fade-scroll-bars false))]
|
||||||
(.setScrollFocus stage (:object scroll-pane))
|
(.setScrollFocus stage (:object scroll-pane))
|
||||||
[scroll-pane
|
[scroll-pane
|
||||||
:colspan 3 :height 224 :width 476]))
|
:colspan 3 :height 212 :pad-bottom 4 :width 476]))
|
||||||
|
|
||||||
(defn saves-menu [entities stage]
|
(defn saves-menu [entities stage]
|
||||||
(let [save-label (make-label "" label-color)
|
(let [save-label (make-label "" label-color)
|
||||||
@@ -269,9 +273,9 @@
|
|||||||
:row
|
:row
|
||||||
(saves-table entities stage)
|
(saves-table entities stage)
|
||||||
:row
|
:row
|
||||||
[delete-button :width 100 :height 56]
|
[delete-button :width 150 :height 56]
|
||||||
[(make-button "Back" :key :back) :width 100 :height 56]
|
[(make-button "Back" :key :back) :width 150 :height 56]
|
||||||
[continue-button :width 100 :height 56]])
|
[continue-button :width 150 :height 56]])
|
||||||
:save-label save-label
|
:save-label save-label
|
||||||
:delete-button delete-button
|
:delete-button delete-button
|
||||||
:continue-button continue-button)))
|
:continue-button continue-button)))
|
||||||
@@ -281,10 +285,10 @@
|
|||||||
:row
|
:row
|
||||||
[(make-label "to delete the save" label-color) :height 32 :colspan 2]
|
[(make-label "to delete the save" label-color) :height 32 :colspan 2]
|
||||||
:row
|
:row
|
||||||
[(make-label (str "\"" (-> entities :selected-save :name) "\"?") label-color) :height 32 :colspan 2]
|
[(make-label (str "\"" (-> entities :selected-save :name) "\"?") label-color) :height 32 :colspan 2 :pad-bottom 4]
|
||||||
:row
|
:row
|
||||||
[(make-button "Keep" :key :dont-delete-button) :width 100]
|
[(make-button "Keep" :key :dont-delete-button) :width 120 :height 56]
|
||||||
[(make-button "Delete" :key :confirm-delete-button) :width 100]]))
|
[(make-button "Delete" :key :confirm-delete-button) :width 120 :height 56]]))
|
||||||
|
|
||||||
(defscreen title-screen
|
(defscreen title-screen
|
||||||
:on-show
|
:on-show
|
||||||
|
|||||||
Reference in New Issue
Block a user