removed pan.
This commit is contained in:
@@ -150,10 +150,7 @@
|
||||
entities)]
|
||||
|
||||
|
||||
(when (and (not (get-in entities [:fg-actions :script-running?]))
|
||||
(or (= (get-in entities [:cursor :down-target])
|
||||
(or (:id interacting-entity) (:id interaction) nil))
|
||||
(get-in entities [:cursor :came-from-inventory?])))
|
||||
(when (and (not (get-in entities [:fg-actions :script-running?])))
|
||||
((or (when (and (not (:override-cursor interaction))
|
||||
interacting-entity)
|
||||
(do (screen! hud :on-start-script {})
|
||||
@@ -1016,8 +1013,7 @@
|
||||
e)))
|
||||
|
||||
(defn mouse-moved [screen entities {:keys [input-x input-y] :as options}]
|
||||
(when (or (not utils/mobile?) (get-in entities [:cursor :came-from-inventory?]))
|
||||
(utils/update-override screen (assoc-in entities [:cursor :last-pos] [input-x input-y]) options)))
|
||||
(utils/update-override screen (assoc-in entities [:cursor :last-pos] [input-x input-y]) options))
|
||||
|
||||
(defn grab-layers [entities]
|
||||
(update-in entities [:room]
|
||||
@@ -1220,25 +1216,6 @@
|
||||
:else
|
||||
nil))
|
||||
|
||||
:on-pan
|
||||
(fn [screen entities {:keys [input-x input-y delta-x delta-y]}]
|
||||
(when (and utils/mobile?
|
||||
(get-in entities [:state :active?])
|
||||
(not (get-in entities [:cursor :came-from-inventory?])))
|
||||
(let [ideal-x (+ (get-in entities [:cam :x]) (- (/ delta-x 4)))
|
||||
ideal-y (+ (get-in entities [:cam :y]) (/ delta-y 4))]
|
||||
(-> entities
|
||||
(remove-cam-tweens)
|
||||
(assoc-in [:cursor :last-pos] [0 0])
|
||||
(assoc-in [:cursor :last] [:main nil])
|
||||
(assoc-in [:cursor :override] nil)
|
||||
(assoc-in [:cursor :down-target] nil)
|
||||
(assoc-in [:label :text] "")
|
||||
(assoc-in [:cursor :last-pos] [0 0])
|
||||
(assoc-in [:cam :ideal-x] ideal-x)
|
||||
(assoc-in [:cam :ideal-y] ideal-y)
|
||||
(assoc-in [:cam :x] (utils/bound-to-camera ideal-x 320 (get-in entities [:cam :zoom])) )
|
||||
(assoc-in [:cam :y] (utils/bound-to-camera ideal-y 240 (get-in entities [:cam :zoom])) )))))
|
||||
|
||||
:pinch-stop
|
||||
(fn [screen entities options]
|
||||
@@ -1432,9 +1409,7 @@
|
||||
(assoc-in [:cursor :down-target] (or (:id interacting-entity ) (:id interaction) nil)))))))
|
||||
|
||||
:on-touch-up (fn [screen entities options]
|
||||
(when (or (not utils/mobile?)
|
||||
(get-in entities [:cursor :came-from-inventory?]))
|
||||
(handle-touch-up screen entities options)))
|
||||
(handle-touch-up screen entities options))
|
||||
|
||||
:on-tap (fn [screen entities options]
|
||||
(when utils/mobile?
|
||||
|
||||
Reference in New Issue
Block a user