normal mode still styled correctly.
This commit is contained in:
@@ -1309,9 +1309,18 @@ void main ()
|
|||||||
|
|
||||||
:on-key-up
|
:on-key-up
|
||||||
(fn [screen entities options]
|
(fn [screen entities options]
|
||||||
(when (= (key-code :escape) (:key options))
|
(cond
|
||||||
(utils/toggle-fullscreen!))
|
(= (key-code :escape) (:key options))
|
||||||
nil)
|
(utils/toggle-fullscreen!)
|
||||||
|
|
||||||
|
(and utils/mobile?
|
||||||
|
(= (key-code :m) (:key options)))
|
||||||
|
(-> entities
|
||||||
|
(remove-cam-tweens)
|
||||||
|
(assoc-in [:cam :zoom] utils/max-zoom #_(max utils/max-zoom (min utils/min-zoom (* (or start-zoom zoom) (/ initial-distance distance))))))
|
||||||
|
|
||||||
|
:else
|
||||||
|
nil))
|
||||||
|
|
||||||
:on-pan
|
:on-pan
|
||||||
(fn [screen entities {:keys [input-x input-y delta-x delta-y]}]
|
(fn [screen entities {:keys [input-x input-y delta-x delta-y]}]
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
(defn button-style []
|
(defn button-style []
|
||||||
(let [^TextButton$TextButtonStyle style (skin! (skin "ui/ui.json") :get TextButton$TextButtonStyle)
|
(let [^TextButton$TextButtonStyle style (skin! (skin "ui/ui.json") :get TextButton$TextButtonStyle)
|
||||||
tx (-> style .font .getRegion .getTexture)]
|
tx (-> style .font .getRegion .getTexture)]
|
||||||
(-> style .font .getData (.setScale 1.0))
|
(-> style .font .getData (.setScale utils/button-font-scale))
|
||||||
|
|
||||||
(call! ^Texture tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
|
(call! ^Texture tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
|
||||||
style))
|
style))
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
(defn make-checkbox
|
(defn make-checkbox
|
||||||
([msg checked & rest]
|
([msg checked & rest]
|
||||||
(let [s (skin! (skin "ui/ui.json") :get CheckBox$CheckBoxStyle)]
|
(let [s (skin! (skin "ui/ui.json") :get CheckBox$CheckBoxStyle)]
|
||||||
(-> s .font .getData (.setScale 0.5))
|
(-> s .font .getData (.setScale utils/title-label-scale))
|
||||||
(doto (merge (check-box msg s)
|
(doto (merge (check-box msg s)
|
||||||
(apply hash-map rest))
|
(apply hash-map rest))
|
||||||
(set-checkbox-state checked)
|
(set-checkbox-state checked)
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
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 0.5))
|
(-> style .font .getData (.setScale utils/title-label-scale))
|
||||||
(-> msg
|
(-> msg
|
||||||
(label style)
|
(label style)
|
||||||
(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)
|
||||||
|
|||||||
@@ -30,10 +30,12 @@
|
|||||||
entity)
|
entity)
|
||||||
|
|
||||||
|
|
||||||
(def ui-scale 1.5)
|
(def ui-scale 1.0)
|
||||||
(def mobile? (= 1.5 ui-scale))
|
(def mobile? (= 1.5 ui-scale))
|
||||||
(def max-zoom (if mobile? 0.5 0.75))
|
(def max-zoom (if mobile? 0.5 0.75))
|
||||||
(def min-zoom 0.95)
|
(def min-zoom 0.95)
|
||||||
|
(def button-font-scale (if mobile? 1.0 0.5))
|
||||||
|
(def title-label-scale (if mobile? 0.5 0.25))
|
||||||
|
|
||||||
(defn clear-stage [{:keys [^Stage renderer]}]
|
(defn clear-stage [{:keys [^Stage renderer]}]
|
||||||
(.clear renderer))
|
(.clear renderer))
|
||||||
@@ -244,7 +246,7 @@
|
|||||||
|
|
||||||
(defn get-font [filename]
|
(defn get-font [filename]
|
||||||
(let [font (-> (bitmap-font filename)
|
(let [font (-> (bitmap-font filename)
|
||||||
#_(doto (bitmap-font! :set-scale 0.5 0.5)))
|
#_(doto (bitmap-font! :set-font-scale 0.5 0.5)))
|
||||||
tr (bitmap-font! font :get-region)
|
tr (bitmap-font! font :get-region)
|
||||||
tx (.getTexture tr)]
|
tx (.getTexture tr)]
|
||||||
(call! ^Texture tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
|
(call! ^Texture tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<executableName>tickstales</executableName>
|
<executableName>tickstales</executableName>
|
||||||
<mainClass>${app.mainclass}</mainClass>
|
<mainClass>${app.mainclass}</mainClass>
|
||||||
<os>ios</os>
|
<os>ios</os>
|
||||||
<arch>thumbv7</arch>
|
<arch>arm64</arch>
|
||||||
<target>ios</target>
|
<target>ios</target>
|
||||||
<iosInfoPList>Info.plist.xml</iosInfoPList>
|
<iosInfoPList>Info.plist.xml</iosInfoPList>
|
||||||
<resources>
|
<resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user