Updating labels on title.
This commit is contained in:
@@ -95,7 +95,9 @@
|
|||||||
(map #(assoc % :opacity opacity) i))))]
|
(map #(assoc % :opacity opacity) i))))]
|
||||||
|
|
||||||
(when (:shown? entities)
|
(when (:shown? entities)
|
||||||
(doto (:highlighted-text entities) (label! :set-color (color 1 1 1 opacity)))
|
(doto (:highlighted-text entities)
|
||||||
|
(label! :set-color (color 1 1 1 opacity))
|
||||||
|
(label! :set-font-scale 0.5))
|
||||||
(render! screen [(:fade entities) (:overlay entities)])
|
(render! screen [(:fade entities) (:overlay entities)])
|
||||||
(render! screen (:items entities))
|
(render! screen (:items entities))
|
||||||
(if-let [item (:highlighted-item entities)]
|
(if-let [item (:highlighted-item entities)]
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
)
|
)
|
||||||
(:import [com.badlogic.gdx.graphics Pixmap Pixmap$Filter Texture Texture$TextureFilter Color]
|
(:import [com.badlogic.gdx.graphics Pixmap Pixmap$Filter Texture Texture$TextureFilter Color]
|
||||||
[com.badlogic.gdx.graphics.g2d TextureRegion]
|
[com.badlogic.gdx.graphics.g2d TextureRegion]
|
||||||
|
[play_clj.entities NinePatchEntity]
|
||||||
[com.badlogic.gdx.utils.viewport FitViewport]
|
[com.badlogic.gdx.utils.viewport FitViewport]
|
||||||
[com.badlogic.gdx.scenes.scene2d.ui Slider$SliderStyle Widget ButtonGroup TextButton$TextButtonStyle]
|
[com.badlogic.gdx.scenes.scene2d.ui Slider$SliderStyle Widget ButtonGroup TextButton$TextButtonStyle]
|
||||||
[com.badlogic.gdx.scenes.scene2d Group Actor]
|
[com.badlogic.gdx.scenes.scene2d Group Actor]
|
||||||
@@ -148,12 +149,21 @@
|
|||||||
([msg]
|
([msg]
|
||||||
(make-label msg nil))
|
(make-label msg nil))
|
||||||
([msg col]
|
([msg col]
|
||||||
(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"))
|
||||||
|
_ (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
|
(-> msg
|
||||||
(label (style :label font (or col (color 1.0 0.3 0.3 1.0))))
|
(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)
|
||||||
center
|
(doto (label! :set-alignment Align/bottom)
|
||||||
(doto (label! :set-alignment Align/bottom))))))
|
(label! :set-font-scale 0.5)
|
||||||
|
(#(label! % :set-width (/ (label! % :get-width) 2))))
|
||||||
|
center))))
|
||||||
|
|
||||||
(defn make-slider [initial-value & rest]
|
(defn make-slider [initial-value & rest]
|
||||||
(let [ui-skin (skin "ui/ui.json")
|
(let [ui-skin (skin "ui/ui.json")
|
||||||
|
|||||||
Reference in New Issue
Block a user