From 089f9954be7ae76c82ecb43b43ac1bd2633b6fad Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Sun, 14 Dec 2014 21:30:06 -0800 Subject: [PATCH] better inventory experience. --- desktop/src-common/advent/screens/inventory.clj | 2 +- desktop/src-common/advent/screens/scene.clj | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop/src-common/advent/screens/inventory.clj b/desktop/src-common/advent/screens/inventory.clj index 2a26437c..6916e4e2 100644 --- a/desktop/src-common/advent/screens/inventory.clj +++ b/desktop/src-common/advent/screens/inventory.clj @@ -85,7 +85,7 @@ (assoc entities :highlighted-item nil)))) :on-touch-up (fn [screen [entities]] - (when (:shown? entities) + (when (and (:shown? entities) (= (button-code :left) (:button screen))) (let [{:keys [highlighted-item]} entities room-entities (-> @(resolve 'advent.screens.scene/scene) :entities diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 8b4c6229..d8aa6f14 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -341,11 +341,11 @@ (assoc-in entities [:cursor :override] nil))))) :on-touch-up (fn [screen [entities]] + (if (= (button-code :right) + (:button screen)) + (assoc-in entities [:cursor :current] :main) (when (get-in entities [:state :active?]) - (if (= (button-code :right) - (:button screen)) - (assoc-in entities [:cursor :current] :main) - (left-click screen entities)))) + (left-click screen entities)))) :on-deactivate (fn [screen [entities]] (assoc-in entities [:state :active?] false))