From 60544ac56f13132ef24ce38024627a127f7f15f0 Mon Sep 17 00:00:00 2001 From: Hugues Ross Date: Sun, 26 Jan 2020 14:35:26 -0500 Subject: Add 9-slice background support to button formspec elements (#9290) --- games/minimal/mods/test/formspec.lua | 3 +++ games/minimal/mods/test/textures/test_bg_9slice.png | Bin 0 -> 1017 bytes .../mods/test/textures/test_bg_9slice_hovered.png | Bin 0 -> 1016 bytes .../mods/test/textures/test_bg_9slice_pressed.png | Bin 0 -> 1016 bytes 4 files changed, 3 insertions(+) create mode 100644 games/minimal/mods/test/textures/test_bg_9slice.png create mode 100644 games/minimal/mods/test/textures/test_bg_9slice_hovered.png create mode 100644 games/minimal/mods/test/textures/test_bg_9slice_pressed.png (limited to 'games') 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 Binary files /dev/null and b/games/minimal/mods/test/textures/test_bg_9slice.png 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 Binary files /dev/null and b/games/minimal/mods/test/textures/test_bg_9slice_hovered.png 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 Binary files /dev/null and b/games/minimal/mods/test/textures/test_bg_9slice_pressed.png differ -- cgit v1.2.3