From 5f68d2de11a51dfc5fcc12538e7c3d055fe85b3d Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Fri, 6 Sep 2019 17:06:23 +0200 Subject: [PATCH] Improve the interface --- init.lua | 23 +++++++++++++---------- textures/craftguide_bg_full.png | Bin 0 -> 979 bytes 2 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 textures/craftguide_bg_full.png diff --git a/init.lua b/init.lua index c4f017c..12ae257 100644 --- a/init.lua +++ b/init.lua @@ -599,7 +599,8 @@ local function make_formspec(name) fs[#fs + 1] = [[ no_prepend[] - background[1,1;1,1;craftguide_bg.png;true] + bgcolor[#00000000;false] + background[1,1;1,1;craftguide_bg_full.png;true;10] ]] end @@ -607,11 +608,12 @@ local function make_formspec(name) sfinv_only and 2.76 or 2.72, ESC(data.filter)) - fs[#fs + 1] = fmt([[ - image_button[%f,-0.05;0.85,0.85;craftguide_search_icon.png;search;] - image_button[%f,-0.05;0.85,0.85;craftguide_clear_icon.png;clear;] - field_close_on_enter[filter;false] - ]], + fs[#fs + 1] = fmt( + "field_close_on_enter[filter;false]\ + image_button[%f,-0.05;0.85,0.85;craftguide_search_icon.png;search;;;false;" .. + "craftguide_search_icon.png^\\[colorize:yellow:255]" .. + "image_button[%f,-0.05;0.85,0.85;craftguide_clear_icon.png;clear;;;false;" .. + "craftguide_clear_icon.png^\\[colorize:red:255]", sfinv_only and 2.6 or 2.54, sfinv_only and 3.3 or 3.25) @@ -621,10 +623,11 @@ local function make_formspec(name) colorize("yellow", data.pagenum), data.pagemax) - fs[#fs + 1] = fmt([[ - image_button[%f,-0.05;0.8,0.8;craftguide_prev_icon.png;prev;] - image_button[%f,-0.05;0.8,0.8;craftguide_next_icon.png;next;] - ]], + fs[#fs + 1] = fmt( + "image_button[%f,-0.05;0.8,0.8;craftguide_prev_icon.png;prev;;;false;" .. + "craftguide_prev_icon.png^\\[colorize:yellow:255]" .. + "image_button[%f,-0.05;0.8,0.8;craftguide_next_icon.png;next;;;false;" .. + "craftguide_next_icon.png^\\[colorize:yellow:255]", sfinv_only and 5.45 or 6.83, sfinv_only and 7.2 or 8.75) diff --git a/textures/craftguide_bg_full.png b/textures/craftguide_bg_full.png new file mode 100644 index 0000000000000000000000000000000000000000..9a97df69ba777320ef87b4f17acebaa5b81f02d9 GIT binary patch literal 979 zcmeAS@N?(olHy`uVBq!ia0y~yV4M%cNgOOdk>=;JHy9Y0XL-6fhE&{ody`#sj)O$& z#rsFO9F9(IU}9O2#=C%-c`-Bl#)0c z>gSE}pZTWTRJf4(Z;HP$dr9W}x=B*ZRl0UkA8czJPNZ;17=?xzADFOp(@e&;oPE0v zt_ZU{!{FR!#MGlD+)(3SryxIpAB0b^KVkmF2*N)bY8ZeRRSF`FBn6QM2}7km{3h2Z zgaZiM!T@$3$a0tiU{3!DlY%+@1UpO$>MI93m=rl49(5&h3Lz;hL->>rOjvvgnC_xd zjhT6FYOR(`I1x1y$X~YVR9;8khU>E@9~HTqu(DkJtVHaBtL>9-%ETtD^H&dVK9G6+ z*PA*28yMbv{d)4Kw7{GTMJsm+UYKkxu%TY|`~ho$isw5EjqX=;Fh@PJD&AD{O@jSR seeem{}P-UHx3vIVCg!0B0YPAOHXW literal 0 HcmV?d00001