slightly less shitty ui.
This commit is contained in:
BIN
desktop/resources/ui/button.9.png
Normal file
BIN
desktop/resources/ui/button.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
desktop/resources/ui/button.9.pxi
Normal file
BIN
desktop/resources/ui/button.9.pxi
Normal file
Binary file not shown.
BIN
desktop/resources/ui/button.pressed.9.png
Normal file
BIN
desktop/resources/ui/button.pressed.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,12 +1,28 @@
|
|||||||
|
|
||||||
ui.png
|
ui.png
|
||||||
size: 128,32
|
size: 256,64
|
||||||
format: RGBA8888
|
format: RGBA8888
|
||||||
filter: Nearest,Nearest
|
filter: Nearest,Nearest
|
||||||
repeat: none
|
repeat: none
|
||||||
|
button
|
||||||
|
rotate: false
|
||||||
|
xy: 2, 2
|
||||||
|
size: 52, 40
|
||||||
|
split: 24, 24, 12, 24
|
||||||
|
orig: 52, 40
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
button.pressed
|
||||||
|
rotate: false
|
||||||
|
xy: 56, 2
|
||||||
|
size: 52, 40
|
||||||
|
split: 24, 24, 16, 20
|
||||||
|
orig: 52, 40
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
screenshot-image-button
|
screenshot-image-button
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 54, 10
|
xy: 162, 22
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
split: 8, 8, 8, 8
|
split: 8, 8, 8, 8
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
@@ -14,7 +30,7 @@ screenshot-image-button
|
|||||||
index: -1
|
index: -1
|
||||||
screenshot-image-button-active
|
screenshot-image-button-active
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 32, 10
|
xy: 140, 22
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
split: 8, 8, 8, 8
|
split: 8, 8, 8, 8
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
@@ -22,7 +38,7 @@ screenshot-image-button-active
|
|||||||
index: -1
|
index: -1
|
||||||
scroll-slider
|
scroll-slider
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 76, 10
|
xy: 184, 22
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
split: 8, 8, 8, 8
|
split: 8, 8, 8, 8
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
@@ -30,7 +46,7 @@ scroll-slider
|
|||||||
index: -1
|
index: -1
|
||||||
slider
|
slider
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 98, 10
|
xy: 206, 22
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
split: 8, 8, 8, 8
|
split: 8, 8, 8, 8
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
@@ -38,14 +54,14 @@ slider
|
|||||||
index: -1
|
index: -1
|
||||||
slider-bar
|
slider-bar
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 2, 2
|
xy: 110, 14
|
||||||
size: 28, 28
|
size: 28, 28
|
||||||
orig: 28, 28
|
orig: 28, 28
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
slider-bar-hover
|
slider-bar-hover
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 2, 2
|
xy: 110, 14
|
||||||
size: 28, 28
|
size: 28, 28
|
||||||
orig: 28, 28
|
orig: 28, 28
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
{
|
{
|
||||||
|
com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font: { file: ego/font.fnt } }
|
||||||
|
com.badlogic.gdx.graphics.Color: {
|
||||||
|
white: { a: 1, b: 1, g: 1, r: 1 },
|
||||||
|
gray: { a: 1, b: 0.5, g: 0.5, r: 0.5},
|
||||||
|
pressed: { a: 1.0, b: 0.9, g: 0.9, r: 0.9 },
|
||||||
|
yellow: {hex: DFD114FF},
|
||||||
|
},
|
||||||
com.badlogic.gdx.scenes.scene2d.ui.Slider$SliderStyle: {
|
com.badlogic.gdx.scenes.scene2d.ui.Slider$SliderStyle: {
|
||||||
default-horizontal: { background: slider, knob: slider-bar }
|
default-horizontal: { background: slider, knob: slider-bar }
|
||||||
default-horizontal-hover: { background: slider, knob: slider-bar-hover }
|
default-horizontal-hover: { background: slider, knob: slider-bar-hover }
|
||||||
@@ -12,6 +18,13 @@ com.badlogic.gdx.scenes.scene2d.ui.ScrollPane$ScrollPaneStyle: {
|
|||||||
com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: {
|
com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: {
|
||||||
default: { down: screenshot-image-button-active, up: screenshot-image-button, checked: screenshot-image-button-active}
|
default: { down: screenshot-image-button-active, up: screenshot-image-button, checked: screenshot-image-button-active}
|
||||||
active: { down: screenshot-image-button-active, up: screenshot-image-button-active, checked: screenshot-image-button-active}
|
active: { down: screenshot-image-button-active, up: screenshot-image-button-active, checked: screenshot-image-button-active}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle: {
|
||||||
|
default: { font: default-font, down: button.pressed, up: button, fontColor: white, overFontColor: yellow, unpressedOffsetY: 0, pressedOffsetY: -4, downFontColor: pressed, disabledFontColor: gray}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 592 B After Width: | Height: | Size: 985 B |
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font: { file: default.fnt } },
|
com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font: { file: ego/font.fnt } },
|
||||||
com.badlogic.gdx.graphics.Color: {
|
com.badlogic.gdx.graphics.Color: {
|
||||||
green: { a: 1, b: 0, g: 1, r: 0 },
|
green: { a: 1, b: 0, g: 1, r: 0 },
|
||||||
white: { a: 1, b: 1, g: 1, r: 1 },
|
white: { a: 1, b: 1, g: 1, r: 1 },
|
||||||
|
|||||||
@@ -19,7 +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]
|
||||||
[com.badlogic.gdx.utils.viewport FitViewport]
|
[com.badlogic.gdx.utils.viewport FitViewport]
|
||||||
[com.badlogic.gdx.scenes.scene2d.ui Slider$SliderStyle Widget ButtonGroup]
|
[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]
|
||||||
[play_clj.entities ActorEntity]
|
[play_clj.entities ActorEntity]
|
||||||
[com.badlogic.gdx.scenes.scene2d.utils Align NinePatchDrawable TextureRegionDrawable]
|
[com.badlogic.gdx.scenes.scene2d.utils Align NinePatchDrawable TextureRegionDrawable]
|
||||||
@@ -125,13 +125,7 @@
|
|||||||
(tween/tween :fade-out-music screen [:volume] 1.0 0.0 1.0)))))
|
(tween/tween :fade-out-music screen [:volume] 1.0 0.0 1.0)))))
|
||||||
|
|
||||||
(defn button-style []
|
(defn button-style []
|
||||||
(let [font (utils/get-font "ego/font.fnt")
|
(skin! (skin "ui/ui.json") :get TextButton$TextButtonStyle))
|
||||||
style (style :text-button nil nil nil font)]
|
|
||||||
(set! (.fontColor style) button-color)
|
|
||||||
(set! (.overFontColor style) (color :yellow))
|
|
||||||
(set! (.downFontColor style) (Color/valueOf "49224aff"))
|
|
||||||
(set! (.disabledFontColor style) (color :gray))
|
|
||||||
style))
|
|
||||||
|
|
||||||
(defn save-object [a]
|
(defn save-object [a]
|
||||||
(.setUserObject ^Actor (:object a) a)
|
(.setUserObject ^Actor (:object a) a)
|
||||||
@@ -183,28 +177,29 @@
|
|||||||
(defn main-menu []
|
(defn main-menu []
|
||||||
(let [start-playing-label (quest-label)
|
(let [start-playing-label (quest-label)
|
||||||
is-starting? (= "Begin quest" start-playing-label)]
|
is-starting? (= "Begin quest" start-playing-label)]
|
||||||
(make-table [[(make-button start-playing-label :key :continue-or-start) :height 32]
|
(make-table [[(make-button start-playing-label :key :continue-or-start) :height 56 :pad-bottom 4 :width 250]
|
||||||
:row
|
:row
|
||||||
[(doto (make-button "Load" :key :load)
|
[(doto (make-button "Load" :key :load)
|
||||||
(text-button! :set-disabled (not (seq (utils/snapshot-list))))) :height 32]
|
(text-button! :set-disabled (not (seq (utils/snapshot-list))))) :height 56 :pad-bottom 4 :width 250]
|
||||||
:row
|
:row
|
||||||
[(doto (make-button "Chapters" :key :chapters)
|
[(doto (make-button "Chapters" :key :chapters)
|
||||||
(text-button! :set-disabled (not (->> (utils/get-chapters)
|
(text-button! :set-disabled (not (->> (utils/get-chapters)
|
||||||
(vals)
|
(vals)
|
||||||
(filter identity)
|
(filter identity)
|
||||||
seq)))) :height 32]
|
seq)))) :height 56 :pad-bottom 4 :width 250]
|
||||||
|
|
||||||
|
:row
|
||||||
|
[(make-button "Settings" :key :settings) :height 56 :pad-bottom 4 :width 250]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:row
|
:row
|
||||||
[(make-label "Music" label-color) :height 32]
|
[(make-button "End quest" :key :end-quest) :height 56 :width 250]
|
||||||
:row
|
|
||||||
[(make-slider (:music-volume @utils/settings) :key :music-volume-slider) :height 32 :width 305]
|
|
||||||
:row
|
|
||||||
[(make-label "FX" label-color) :height 32]
|
|
||||||
:row
|
|
||||||
[(make-slider (:sound-volume @utils/settings) :key :sound-volume-slider) :height 32 :width 305]
|
|
||||||
:row
|
|
||||||
[(make-button "Fullscreen" :key :toggle-fullscreen) :height 32]
|
|
||||||
:row
|
|
||||||
[(make-button "End quest" :key :end-quest) :height 32]
|
|
||||||
])))
|
])))
|
||||||
|
|
||||||
(defn chapters-menu []
|
(defn chapters-menu []
|
||||||
@@ -216,15 +211,10 @@
|
|||||||
(saves/chapter-name chapter)
|
(saves/chapter-name chapter)
|
||||||
"---")
|
"---")
|
||||||
:chapter (chapter chapters))
|
:chapter (chapter chapters))
|
||||||
(text-button! :set-disabled (nil? (chapter chapters)))) :height 32]
|
(text-button! :set-disabled (nil? (chapter chapters)))) :height 56 :pad-bottom 4]
|
||||||
:row]))
|
:row]))
|
||||||
[[(ActorEntity. (Widget.)) :height 32]
|
[
|
||||||
:row
|
[ (make-button "Back" :key :back) :height 56]]))))
|
||||||
[(ActorEntity. (Widget.)) :height 32]
|
|
||||||
:row
|
|
||||||
[(ActorEntity. (Widget.)) :height 32]
|
|
||||||
:row
|
|
||||||
(make-button "Back" :key :back)]))))
|
|
||||||
|
|
||||||
(defn get-selected-save [entities [x y]]
|
(defn get-selected-save [entities [x y]]
|
||||||
(first (filter
|
(first (filter
|
||||||
@@ -276,9 +266,9 @@
|
|||||||
:row
|
:row
|
||||||
(saves-table entities stage)
|
(saves-table entities stage)
|
||||||
:row
|
:row
|
||||||
[delete-button :width 100]
|
[delete-button :width 100 :height 56]
|
||||||
[(make-button "Back" :key :back) :width 100]
|
[(make-button "Back" :key :back) :width 100 :height 56]
|
||||||
[continue-button :width 100]])
|
[continue-button :width 100 :height 56]])
|
||||||
:save-label save-label
|
:save-label save-label
|
||||||
:delete-button delete-button
|
:delete-button delete-button
|
||||||
:continue-button continue-button)))
|
:continue-button continue-button)))
|
||||||
|
|||||||
Reference in New Issue
Block a user