much better buttons.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -1,28 +1,44 @@
|
|||||||
|
|
||||||
ui.png
|
ui.png
|
||||||
size: 256,64
|
size: 512,64
|
||||||
format: RGBA8888
|
format: RGBA8888
|
||||||
filter: Nearest,Nearest
|
filter: Nearest,Nearest
|
||||||
repeat: none
|
repeat: none
|
||||||
button
|
button
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 2, 2
|
xy: 2, 2
|
||||||
size: 52, 40
|
size: 52, 52
|
||||||
split: 24, 24, 12, 24
|
split: 24, 24, 12, 22
|
||||||
orig: 52, 40
|
orig: 52, 52
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
button.disabled
|
||||||
|
rotate: false
|
||||||
|
xy: 56, 2
|
||||||
|
size: 52, 52
|
||||||
|
split: 24, 24, 12, 22
|
||||||
|
orig: 52, 52
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
button.hover
|
||||||
|
rotate: false
|
||||||
|
xy: 110, 2
|
||||||
|
size: 52, 52
|
||||||
|
split: 24, 24, 12, 22
|
||||||
|
orig: 52, 52
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
button.pressed
|
button.pressed
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 56, 2
|
xy: 164, 2
|
||||||
size: 52, 40
|
size: 52, 52
|
||||||
split: 24, 24, 16, 20
|
split: 24, 24, 16, 16
|
||||||
orig: 52, 40
|
orig: 52, 52
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
screenshot-image-button
|
screenshot-image-button
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 162, 22
|
xy: 248, 34
|
||||||
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 @@ screenshot-image-button
|
|||||||
index: -1
|
index: -1
|
||||||
screenshot-image-button-active
|
screenshot-image-button-active
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 140, 22
|
xy: 218, 4
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
split: 8, 8, 8, 8
|
split: 8, 8, 8, 8
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
@@ -38,7 +54,7 @@ screenshot-image-button-active
|
|||||||
index: -1
|
index: -1
|
||||||
scroll-slider
|
scroll-slider
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 184, 22
|
xy: 270, 34
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
split: 8, 8, 8, 8
|
split: 8, 8, 8, 8
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
@@ -46,7 +62,7 @@ scroll-slider
|
|||||||
index: -1
|
index: -1
|
||||||
slider
|
slider
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 206, 22
|
xy: 292, 34
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
split: 8, 8, 8, 8
|
split: 8, 8, 8, 8
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
@@ -54,14 +70,14 @@ slider
|
|||||||
index: -1
|
index: -1
|
||||||
slider-bar
|
slider-bar
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 110, 14
|
xy: 218, 26
|
||||||
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: 110, 14
|
xy: 218, 26
|
||||||
size: 28, 28
|
size: 28, 28
|
||||||
orig: 28, 28
|
orig: 28, 28
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font: { file: ego/font.fnt }, button-font: { file: ego/button-font.fnt }}
|
com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font: { file: ego/font.fnt }, button-font: { file: ego/button-font.fnt }}
|
||||||
com.badlogic.gdx.graphics.Color: {
|
com.badlogic.gdx.graphics.Color: {
|
||||||
button-font-up: {hex: A97F55FF },
|
button-font-up: {hex: 19003Dff },
|
||||||
gray: { a: 1, b: 0.5, g: 0.5, r: 0.5},
|
gray: {hex: 21172Eff },
|
||||||
pressed: { hex: A97F55FF },
|
pressed: { hex: 19003Dff },
|
||||||
yellow: {hex: A97F55FF},
|
yellow: {hex: 69386Dff },
|
||||||
},
|
},
|
||||||
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 }
|
||||||
@@ -22,7 +22,7 @@ com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: {
|
|||||||
|
|
||||||
|
|
||||||
com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle: {
|
com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle: {
|
||||||
default: { font: button-font, down: button.pressed, up: button, fontColor: button-font-up, overFontColor: yellow, unpressedOffsetY: 0, pressedOffsetY: -4, downFontColor: pressed, disabledFontColor: gray}
|
default: { font: button-font, disabled: button.disabled, down: button.pressed, over: button.hover, up: button, fontColor: button-font-up, overFontColor: yellow, unpressedOffsetY: 0, pressedOffsetY: -4, downFontColor: pressed, disabledFontColor: gray}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 985 B After Width: | Height: | Size: 1.7 KiB |
@@ -127,7 +127,7 @@
|
|||||||
(defn button-style []
|
(defn button-style []
|
||||||
(let [style (skin! (skin "ui/ui.json") :get TextButton$TextButtonStyle)
|
(let [style (skin! (skin "ui/ui.json") :get TextButton$TextButtonStyle)
|
||||||
tx (-> style .font .getRegion .getTexture)]
|
tx (-> style .font .getRegion .getTexture)]
|
||||||
#_(call! ^Texture tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
|
(call! ^Texture tx :set-filter Texture$TextureFilter/Linear Texture$TextureFilter/Linear)
|
||||||
style))
|
style))
|
||||||
|
|
||||||
(defn save-object [a]
|
(defn save-object [a]
|
||||||
|
|||||||
Reference in New Issue
Block a user