more mobile tweaks.
This commit is contained in:
@@ -182,6 +182,10 @@
|
|||||||
(do (screen! hud :on-return-item {})
|
(do (screen! hud :on-return-item {})
|
||||||
entities)
|
entities)
|
||||||
|
|
||||||
|
(and (get-in entities [:cam :pinching])
|
||||||
|
(not (input! :is-touched)))
|
||||||
|
(update-in entities [:cam] dissoc :start-zoom :pinching)
|
||||||
|
|
||||||
(and (get-in entities [:state :active?])
|
(and (get-in entities [:state :active?])
|
||||||
(or (not (get-in entities [:state :hud-active?]))
|
(or (not (get-in entities [:state :hud-active?]))
|
||||||
(get-in entities [:fg-actions :script-running?]))
|
(get-in entities [:fg-actions :script-running?]))
|
||||||
@@ -1229,8 +1233,7 @@
|
|||||||
(fn [screen entities options]
|
(fn [screen entities options]
|
||||||
(when (get-in entities [:state :active?])
|
(when (get-in entities [:state :active?])
|
||||||
(-> entities
|
(-> entities
|
||||||
(remove-cam-tweens)
|
(remove-cam-tweens))))
|
||||||
(update-in [:cam] dissoc :start-zoom :pinching) )))
|
|
||||||
|
|
||||||
:on-pinch
|
:on-pinch
|
||||||
(fn [screen entities {:keys [initial-pointer-1 initial-pointer-2 pointer-1 pointer-2]}]
|
(fn [screen entities {:keys [initial-pointer-1 initial-pointer-2 pointer-1 pointer-2]}]
|
||||||
@@ -1414,6 +1417,9 @@
|
|||||||
(assoc-in [:cursor :down-target] (or (:id interacting-entity ) (:id interaction) nil)))))))
|
(assoc-in [:cursor :down-target] (or (:id interacting-entity ) (:id interaction) nil)))))))
|
||||||
|
|
||||||
:on-touch-up (fn [screen entities options]
|
:on-touch-up (fn [screen entities options]
|
||||||
|
(println (input! :is-touched))
|
||||||
|
(println "touch up")
|
||||||
|
(log/info "touch up")
|
||||||
(handle-touch-up screen entities options))
|
(handle-touch-up screen entities options))
|
||||||
|
|
||||||
:on-tap (fn [screen entities options]
|
:on-tap (fn [screen entities options]
|
||||||
|
|||||||
@@ -175,6 +175,7 @@
|
|||||||
([msg col]
|
([msg col]
|
||||||
(make-label msg col utils/title-label-scale))
|
(make-label msg col utils/title-label-scale))
|
||||||
([msg col scale]
|
([msg col scale]
|
||||||
|
(println msg scale)
|
||||||
(let [font (utils/get-font "ego/font.fnt")
|
(let [font (utils/get-font "ego/font.fnt")
|
||||||
|
|
||||||
p (NinePatchEntity. (skin! (skin "ui/ui.json") :get-patch "ui-bg"))
|
p (NinePatchEntity. (skin! (skin "ui/ui.json") :get-patch "ui-bg"))
|
||||||
@@ -182,9 +183,9 @@
|
|||||||
bg (drawable :nine-patch ^NinePatch (:object p))
|
bg (drawable :nine-patch ^NinePatch (:object p))
|
||||||
style (style :label font (or col (color 1.0 0.3 0.3 1.0)))
|
style (style :label font (or col (color 1.0 0.3 0.3 1.0)))
|
||||||
#_#__ (set! (.background style) bg)]
|
#_#__ (set! (.background style) bg)]
|
||||||
(-> style .font .getData (.setScale scale))
|
(-> style .font .getData (.setScale scale scale))
|
||||||
(-> msg
|
(-> msg
|
||||||
(label style)
|
(label style :set-font-scale scale)
|
||||||
(assoc :x 0 :y 0 :height 40 :origin-x 0 :origin-y 0 :z 8)
|
(assoc :x 0 :y 0 :height 40 :origin-x 0 :origin-y 0 :z 8)
|
||||||
(doto (label! :set-alignment Align/bottom)
|
(doto (label! :set-alignment Align/bottom)
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>102</string>
|
<string>116</string>
|
||||||
<key>MinimumOSVersion</key>
|
<key>MinimumOSVersion</key>
|
||||||
<string>8.0</string>
|
<string>8.0</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user