mobile prep

This commit is contained in:
Bryce Covert
2016-07-21 19:48:54 -07:00
parent d0fb4736aa
commit 973f452641
10 changed files with 27 additions and 28 deletions

View File

@@ -26,7 +26,8 @@
[com.badlogic.gdx.scenes.scene2d.ui Slider$SliderStyle Widget ButtonGroup TextButton$TextButtonStyle CheckBox$CheckBoxStyle CheckBox Button]
[com.badlogic.gdx.scenes.scene2d Group Actor]
[play_clj.entities ActorEntity]
[com.badlogic.gdx.scenes.scene2d.utils Align NinePatchDrawable TextureRegionDrawable BaseDrawable]
[com.badlogic.gdx.utils Align]
[com.badlogic.gdx.scenes.scene2d.utils NinePatchDrawable TextureRegionDrawable BaseDrawable]
[com.badlogic.gdx Application Audio Files Game Gdx Graphics Input
InputMultiplexer InputProcessor Net Preferences Screen]))
@@ -70,7 +71,7 @@
(defn quit [screen entities]
(do (log/info "Quitting.")
(input! :set-cursor-image (utils/cursor "cursor.png" :hourglass) 0 0)
(graphics! :set-cursor (utils/cursor "cursor.png" :hourglass))
(-> entities
(assoc-in [:tweens :fade-out]
(tween/tween :fade-out screen [:fade :opacity] 0.0 1.0 1.0
@@ -116,7 +117,7 @@
(defn start-playing [screen entities save]
(do (log/info "Starting/Continuing quest.")
(input! :set-cursor-image (utils/cursor "cursor.png" :hourglass) 0 0)
(graphics! :set-cursor (utils/cursor "cursor.png" :hourglass))
(-> entities
(assoc-in [:tweens :fade-out]
(tween/tween :fade-out screen [:fade :opacity] 0.0 1.0 1.0
@@ -133,7 +134,7 @@
(defn button-style []
(let [style (skin! (skin "ui/ui.json") :get TextButton$TextButtonStyle)
tx (-> style .font .getRegion .getTexture)]
(-> style .font (.setScale 0.5 0.5))
(call! ^Texture tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
style))
@@ -161,7 +162,7 @@
(let [s (skin! (skin "ui/ui.json") :get CheckBox$CheckBoxStyle)]
(-> s
.font
(.setScale 0.25 0.25))
)
(doto (merge (check-box msg s)
(apply hash-map rest))
@@ -178,7 +179,6 @@
_ (nine-patch! p :set-padding 0 0 0 0)
bg (drawable :nine-patch (:object p))
style (style :label font (or col (color 1.0 0.3 0.3 1.0)))
_ (bitmap-font! font :set-markup-enabled true)
#_#__ (set! (.background style) bg)]
(-> msg
(label style)
@@ -350,7 +350,7 @@
balloon (utils/make-anim "title/balloon.png" [15 30] 0.45 (range 4))
banner-back (utils/make-anim "title/banner-back.png" [180 42] 0.2 [0 1 2 1 0 1 2 1])]
(input! :set-cursor-image (utils/cursor "cursor.png" :hourglass) 0 0)
(graphics! :set-cursor (utils/cursor "cursor.png" :hourglass))
(let [entities {:background (assoc (utils/get-texture "title/background.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 0)
:cloud-background (assoc (utils/get-texture "title/clouds.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 2)
@@ -408,7 +408,7 @@
:tweens {:fade-in (tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 1.0
:finish #(do
(input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0)
(graphics! :set-cursor (utils/cursor "cursor.png" :main))
(utils/play-music (:music %)) %)
:ease tween/ease-in-quadratic)}}
]