From 8695a8e4088b69a34c74fc0360c1dd12df5e52a6 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Tue, 2 May 2017 19:46:46 -0700 Subject: [PATCH] more mobile tweaks. --- desktop/src-common/advent/screens/scene.clj | 10 ++++++++-- desktop/src-common/advent/screens/title.clj | 5 +++-- ios/Info.plist.xml | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index acd6cfb1..a9c3a9fc 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -182,6 +182,10 @@ (do (screen! hud :on-return-item {}) 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?]) (or (not (get-in entities [:state :hud-active?])) (get-in entities [:fg-actions :script-running?])) @@ -1229,8 +1233,7 @@ (fn [screen entities options] (when (get-in entities [:state :active?]) (-> entities - (remove-cam-tweens) - (update-in [:cam] dissoc :start-zoom :pinching) ))) + (remove-cam-tweens)))) :on-pinch (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))))))) :on-touch-up (fn [screen entities options] + (println (input! :is-touched)) + (println "touch up") + (log/info "touch up") (handle-touch-up screen entities options)) :on-tap (fn [screen entities options] diff --git a/desktop/src-common/advent/screens/title.clj b/desktop/src-common/advent/screens/title.clj index 11137b71..0adca784 100644 --- a/desktop/src-common/advent/screens/title.clj +++ b/desktop/src-common/advent/screens/title.clj @@ -175,6 +175,7 @@ ([msg col] (make-label msg col utils/title-label-scale)) ([msg col scale] + (println msg scale) (let [font (utils/get-font "ego/font.fnt") p (NinePatchEntity. (skin! (skin "ui/ui.json") :get-patch "ui-bg")) @@ -182,9 +183,9 @@ bg (drawable :nine-patch ^NinePatch (:object p)) style (style :label font (or col (color 1.0 0.3 0.3 1.0))) #_#__ (set! (.background style) bg)] - (-> style .font .getData (.setScale scale)) + (-> style .font .getData (.setScale scale scale)) (-> msg - (label style) + (label style :set-font-scale scale) (assoc :x 0 :y 0 :height 40 :origin-x 0 :origin-y 0 :z 8) (doto (label! :set-alignment Align/bottom) diff --git a/ios/Info.plist.xml b/ios/Info.plist.xml index 3a8a91de..307cc6d5 100644 --- a/ios/Info.plist.xml +++ b/ios/Info.plist.xml @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 102 + 116 MinimumOSVersion 8.0 LSRequiresIPhoneOS