From 1c7884840d1c72e370f7ebe48f0642eef7ce9c98 Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Wed, 29 Apr 2015 18:12:07 -0700 Subject: [PATCH] I don't think start-showing is needed anymore. --- desktop/src-common/advent/screens/inventory.clj | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/desktop/src-common/advent/screens/inventory.clj b/desktop/src-common/advent/screens/inventory.clj index f3de9a24..5ccd1cb3 100644 --- a/desktop/src-common/advent/screens/inventory.clj +++ b/desktop/src-common/advent/screens/inventory.clj @@ -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))