I don't think start-showing is needed anymore.

This commit is contained in:
2015-04-29 18:12:07 -07:00
parent 176c9d7ede
commit 1c7884840d

View File

@@ -18,7 +18,6 @@
(defn close [screen entities]
(screen! @(resolve 'advent.screens.scene/scene) :on-reactivate)
(-> entities
(assoc :start-showing? false)
(assoc-in [:tweens :fade-out] (tween/tween :fade-out screen [:opacity] 1.0 0.0 0.2 :ease tween/ease-out-cubic
:finish #(assoc % :shown? false)))))
@@ -40,7 +39,6 @@
:all-items (texture! (texture (pixmap "cursor.png")) :split 16 16)
:items []
:shown? false
:start-showing? false
:highlighted-item nil
:opacity 0.0
:tweens {}
@@ -48,11 +46,7 @@
:on-render
(fn [screen [entities]]
(let [entities (if (:start-showing? entities)
(-> entities
(assoc :start-showing? false)
(assoc :shown? true))
entities)
(let [
entities (utils/apply-tweens screen entities (:tweens entities))
opacity (get-in entities [:opacity])
entities (-> entities
@@ -77,7 +71,7 @@
entities
(-> entities
(assoc :start-showing? true
(assoc :shown? true
:opacity 0.0
:items (for [[item index] (map vector items (range))
:let [row (int (/ index 8))