From 1b54f404d261c1b360a37ffd54305c0d1b624e19 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 3 Sep 2014 17:06:26 -0700 Subject: [PATCH] removing hotspots because cursor capturing sucks. --- desktop/src-common/advent/core.clj | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/desktop/src-common/advent/core.clj b/desktop/src-common/advent/core.clj index 326d751f..fce96fc4 100644 --- a/desktop/src-common/advent/core.clj +++ b/desktop/src-common/advent/core.clj @@ -27,7 +27,7 @@ resized )) (defn right-click [screen entities] - (let [entities (update-in entities [:cursor] #(assoc % :cursor-index (+next-cursor+ (:cursor-index %)) :hotspot [0 0 ]))] + (let [entities (update-in entities [:cursor] #(assoc % :cursor-index (+next-cursor+ (:cursor-index %))))] (input! :set-cursor-image (cursor "cursor.png" (get-in entities [:cursor :cursor-index])) 0 0) entities)) @@ -103,7 +103,7 @@ music (sound "outside-house.mp3") _ (sound! music :loop)] { - :cursor {:id "cursor" :cursor-index 0 :hotspot [63 63]} + :cursor {:id "cursor" :cursor-index 0 } :background (assoc background :id "background" :x 0 :y 0 :collision (advent.pathfind/map-from-resource "pathfind-test-big.png") @@ -130,12 +130,9 @@ :on-touch-down (fn [screen [entities]] - (let [screen (-> screen - (update-in [:input-x] #(+ % (first (:hotspot (:cursor entities))))) - (update-in [:input-y] #(+ % (second (:hotspot (:cursor entities))))))] - (if (= (button-code :right) (:button screen)) - (right-click screen entities) - (left-click screen entities))))) + (if (= (button-code :right) (:button screen)) + (right-click screen entities) + (left-click screen entities)))) (defgame advent :on-create