aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorHugues Ross <hugues.ross@gmail.com>2020-01-26 14:35:26 -0500
committerrubenwardy <rw@rubenwardy.com>2020-01-26 19:35:26 +0000
commit60544ac56f13132ef24ce38024627a127f7f15f0 (patch)
treea1b454b0967bd6f9606af3eb5a6052b8543bfa55 /games
parentcde2a7f6f24f638421238ead4e61b155322fefc8 (diff)
downloadminetest-60544ac56f13132ef24ce38024627a127f7f15f0.tar.gz
minetest-60544ac56f13132ef24ce38024627a127f7f15f0.tar.bz2
minetest-60544ac56f13132ef24ce38024627a127f7f15f0.zip
Add 9-slice background support to button formspec elements (#9290)
Diffstat (limited to 'games')
-rw-r--r--games/minimal/mods/test/formspec.lua3
-rw-r--r--games/minimal/mods/test/textures/test_bg_9slice.pngbin0 -> 1017 bytes
-rw-r--r--games/minimal/mods/test/textures/test_bg_9slice_hovered.pngbin0 -> 1016 bytes
-rw-r--r--games/minimal/mods/test/textures/test_bg_9slice_pressed.pngbin0 -> 1016 bytes
4 files changed, 3 insertions, 0 deletions
diff --git a/games/minimal/mods/test/formspec.lua b/games/minimal/mods/test/formspec.lua
index bac82c965..67aad3b20 100644
--- a/games/minimal/mods/test/formspec.lua
+++ b/games/minimal/mods/test/formspec.lua
@@ -78,6 +78,9 @@ local style_fs = [[
style[one_btn15;border=false;bgimg=test_bg.png;bgimg_hovered=test_bg_hovered.png;bgimg_pressed=test_bg_pressed.png]
item_image_button[1.25,9.6;1,1;default:sword_steel;one_btn15;Bg]
+ style[one_btn16;border=false;bgimg=test_bg_9slice.png;bgimg_hovered=test_bg_9slice_hovered.png;bgimg_pressed=test_bg_9slice_pressed.png;bgimg_middle=4,6]
+ button[2.5,9.6;2,1;one_btn16;9-Slice Bg]
+
container[2.75,0]
diff --git a/games/minimal/mods/test/textures/test_bg_9slice.png b/games/minimal/mods/test/textures/test_bg_9slice.png
new file mode 100644
index 000000000..f9fe6870b
--- /dev/null
+++ b/games/minimal/mods/test/textures/test_bg_9slice.png
Binary files differ
diff --git a/games/minimal/mods/test/textures/test_bg_9slice_hovered.png b/games/minimal/mods/test/textures/test_bg_9slice_hovered.png
new file mode 100644
index 000000000..e614a5eee
--- /dev/null
+++ b/games/minimal/mods/test/textures/test_bg_9slice_hovered.png
Binary files differ
diff --git a/games/minimal/mods/test/textures/test_bg_9slice_pressed.png b/games/minimal/mods/test/textures/test_bg_9slice_pressed.png
new file mode 100644
index 000000000..125c774fb
--- /dev/null
+++ b/games/minimal/mods/test/textures/test_bg_9slice_pressed.png
Binary files differ