can pan around only when nothing going on, can pan while zooming and stuff.

This commit is contained in:
Bryce Covert
2016-12-07 18:35:06 -08:00
parent 7c2a949cde
commit a817e55122
2 changed files with 38 additions and 27 deletions

View File

@@ -190,6 +190,7 @@
))))))
:on-touch-up (fn [screen entities options]
(println "touched up!")
(let [[x y] (utils/unproject screen options)]
(when (seq (get-in entities [:state :choices]))
(when-let [choice (first (filter #(utils/intersects? % [x y]) (get-in entities [:state :labels])))]
@@ -286,7 +287,6 @@
:on-hover-start
(fn [screen {:keys [all-icons] :as entities} {:keys [hover-text x y scene-viewport cursor ]}]
(println cursor hover-text)
(let [x (if utils/mobile? x (+ 8 x))
[scene-x scene-y] (scene-world->talk-world scene-viewport [x y])
depressed? (< 0.5 (- (or (:total-time screen) 0) (int (or (:total-time screen) 0))))