fixing a number of issues.
This commit is contained in:
@@ -1125,13 +1125,7 @@ void main ()
|
||||
e)))
|
||||
|
||||
(defn mouse-moved [screen entities {:keys [input-x input-y] :as options}]
|
||||
(if utils/mobile?
|
||||
(-> entities
|
||||
(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] ""))
|
||||
(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)))
|
||||
|
||||
(defn grab-layers [entities]
|
||||
@@ -1322,17 +1316,22 @@ void main ()
|
||||
: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?])))
|
||||
(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 [: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])) )))))
|
||||
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]
|
||||
@@ -1557,7 +1556,7 @@ void main ()
|
||||
|
||||
:on-save (fn [screen entities options]
|
||||
(when-not (get-in entities [:fg-actions :script-running?])
|
||||
(let [date (.format (java.text.SimpleDateFormat. "MM/dd/YY") (java.util.Date.))
|
||||
(let [date (.format (java.text.SimpleDateFormat. "MM/dd/yy") (java.util.Date.))
|
||||
save-name (str (-> entities :room :name) " - " date)]
|
||||
(utils/save entities
|
||||
(str (.getTime (java.util.Date.)))
|
||||
@@ -1938,7 +1937,7 @@ void main ()
|
||||
:anim-start 0
|
||||
:opacity 0.8)
|
||||
:all-items (texture! (texture (pixmap "cursor.png")) :split 18 16)
|
||||
#_#_:fps (->> (assoc (label "" (color :white) ) :x 5 :baseline 0 :opacity 0.1)
|
||||
#_:fps #_(->> (assoc (label "" (color :white) ) :x 5 :baseline 0 :opacity 0.1)
|
||||
(utils/add-actor-to-stage screen))}))
|
||||
|
||||
:on-render
|
||||
|
||||
Reference in New Issue
Block a user