things are almost working right.
This commit is contained in:
@@ -299,7 +299,11 @@
|
||||
utils/mobile? (update-in [:label] assoc :x (* 20 4) :y 12)
|
||||
|
||||
(and utils/mobile? (or item-cursor action-cursor)
|
||||
#_(not= :main action-cursor))
|
||||
(= :main action-cursor))
|
||||
(assoc :action-icon nil)
|
||||
|
||||
(and utils/mobile? (or item-cursor action-cursor)
|
||||
(not= :main action-cursor))
|
||||
(assoc-in [:action-icon]
|
||||
(assoc
|
||||
(texture (aget all-icons 0 (.indexOf utils/+all-cursors+ (or item-cursor action-cursor))))
|
||||
|
||||
@@ -1124,6 +1124,7 @@ void main ()
|
||||
(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)
|
||||
@@ -1318,6 +1319,7 @@ void main ()
|
||||
(let [ideal-x (+ (get-in entities [:cam :x]) (- (/ delta-x 4)))
|
||||
ideal-y (+ (get-in entities [:cam :y]) (/ delta-y 4))]
|
||||
(-> entities
|
||||
(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])) )
|
||||
@@ -1332,6 +1334,7 @@ void main ()
|
||||
(let [[pointer-1-x pointer-1-y] (utils/unproject screen nil [(.x initial-pointer-1) (.y initial-pointer-1)])
|
||||
[pointer-2-x pointer-2-y] (utils/unproject screen nil [(.x initial-pointer-2) (.y initial-pointer-2)])]
|
||||
(-> entities
|
||||
(assoc-in [:cursor :last-pos] [0 0])
|
||||
(assoc-in [:cam :ideal-x] (* 0.5 (+ pointer-1-x pointer-2-x)))
|
||||
(assoc-in [:cam :ideal-y] (* 0.5 (+ pointer-1-y pointer-2-y))))))
|
||||
|
||||
@@ -1454,7 +1457,7 @@ void main ()
|
||||
(set! (.. camera position x) (:x (:cam entities) 160.0))
|
||||
(set! (.. camera position y) (:y (:cam entities) 120.0)))
|
||||
(let [entities (if utils/mobile?
|
||||
entities
|
||||
(utils/update-override screen entities options)
|
||||
(utils/update-override screen entities options))
|
||||
entities (play-key-sounds screen entities)
|
||||
entities (update-current-sound-vols! entities)
|
||||
|
||||
Reference in New Issue
Block a user