From 0b4f202ffb2d1a4f3d1e2c5ffcad299a388b39ed Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Sun, 25 Nov 2018 15:51:01 +0100 Subject: [PATCH] New icons --- LICENSE | 36 +++++++++++++++++++++++++++ README.md | 2 +- init.lua | 27 +++++++++++--------- textures/craftguide_clear_icon.png | Bin 0 -> 708 bytes textures/craftguide_next_icon.png | Bin 0 -> 727 bytes textures/craftguide_prev_icon.png | Bin 0 -> 728 bytes textures/craftguide_search_icon.png | Bin 0 -> 1908 bytes textures/craftguide_zoomin_icon.png | Bin 0 -> 3544 bytes textures/craftguide_zoomout_icon.png | Bin 0 -> 2948 bytes 9 files changed, 52 insertions(+), 13 deletions(-) create mode 100644 textures/craftguide_clear_icon.png create mode 100644 textures/craftguide_next_icon.png create mode 100644 textures/craftguide_prev_icon.png create mode 100644 textures/craftguide_search_icon.png create mode 100644 textures/craftguide_zoomin_icon.png create mode 100644 textures/craftguide_zoomout_icon.png diff --git a/LICENSE b/LICENSE index 385c231..7854fd0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,6 @@ +License of source code +---------------------- + « Copyright © 2015-2018, Jean-Patrick Guerrero Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -7,3 +10,36 @@ The above copyright notice and this permission notice shall be included in all c The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders X be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software. Except as contained in this notice, the name of the shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the . » + +Licenses of media (textures) +---------------------------- + +Copyright © Diego Martínez (kaeza): craftguide_*_icon.png (CC BY-SA 3.0) + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/README.md b/README.md index 218339e..2896ced 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,4 @@ The progressive mode can be enabled with `craftguide_progressive_mode = true` in `craftguide` is also integrated in `sfinv` (Minetest Game inventory) when you enable it with `craftguide_sfinv_only = true` in `minetest.conf`. -![Preview2](http://i.imgur.com/3q7rVSo.png) +![Preview2](https://i.imgur.com/bToFH38.png) diff --git a/init.lua b/init.lua index d020f59..934441d 100644 --- a/init.lua +++ b/init.lua @@ -110,7 +110,7 @@ function craftguide:get_recipe(iX, iY, xoffset, recipe_num, recipes, show_usage) formspec = formspec .. "button[" .. (iX - (sfinv_only and 2.2 or 2.6)) .. "," .. (iY + (sfinv_only and 3.9 or 3.3)) .. ";2.2,1;alternate;" .. - (show_usage and S("Usage") or S("Recipe")) .. ": " .. + (show_usage and S("Usage") or S("Recipe")) .. " " .. S("@1 of @2", recipe_num, recipes_total) .. "]" end @@ -135,7 +135,7 @@ function craftguide:get_recipe(iX, iY, xoffset, recipe_num, recipes, show_usage) return formspec else for i, v in pairs(items) do - local X = math.ceil((i - 1) % width + xoffset - width) - + local X = ceil((i - 1) % width + xoffset - width) - (sfinv_only and 0 or 0.2) local Y = ceil(i / width + (iY + 2) - min(2, rows)) @@ -223,25 +223,28 @@ function craftguide:get_formspec(player_name, is_fuel) "background[1,1;1,1;craftguide_bg.png;true]" .. "tooltip[size_inc;" .. S("Increase window size") .. "]" .. "tooltip[size_dec;" .. S("Decrease window size") .. "]" .. - "button[" .. (data.iX * 0.48) .. ",0;0.7,1;size_inc;+]" .. - "button[" .. ((data.iX * 0.48) + 0.5) .. ",0;0.7,1;size_dec;-]" + "image_button[" .. (data.iX * 0.47) .. + ",0.12;0.8,0.8;craftguide_zoomin_icon.png;size_inc;]" .. + "image_button[" .. ((data.iX * 0.47) + 0.6) .. + ",0.12;0.8,0.8;craftguide_zoomout_icon.png;size_dec;]" end formspec = formspec .. [[ - button[2.4,0.23;0.8,0.5;search;?] - button[3.05,0.23;0.8,0.5;clear;X] + image_button[2.4,0.12;0.8,0.8;craftguide_search_icon.png;search;] + image_button[3.05,0.12;0.8,0.8;craftguide_clear_icon.png;clear;] field_close_on_enter[filter;false] ]] .. "tooltip[search;" .. S("Search") .. "]" .. "tooltip[clear;" .. S("Reset") .. "]" .. "tooltip[prev;" .. S("Previous page") .. "]" .. "tooltip[next;" .. S("Next page") .. "]" .. - "button[" .. (data.iX - (sfinv_only and 2.6 or 3.1)) .. - ",0.03;0.8,0.95;prev;<]" .. - "label[" .. (data.iX - (sfinv_only and 1.7 or 2.2)) .. ",0.21;" .. + "image_button[" .. (data.iX - (sfinv_only and 2.6 or 3.1)) .. + ",0.12;0.8,0.8;craftguide_prev_icon.png;prev;]" .. + "label[" .. (data.iX - (sfinv_only and 1.7 or 2.2)) .. ",0.22;" .. colorize(data.pagenum) .. " / " .. data.pagemax .. "]" .. - "button[" .. (data.iX - (sfinv_only and 0.7 or 1.2) - - (data.iX >= 11 and 0.08 or 0)) .. ",0.03;0.8,0.95;next;>]" .. + "image_button[" .. (data.iX - (sfinv_only and 0.7 or 1.2) - + (data.iX >= 11 and 0.08 or 0)) .. + ",0.12;0.8,0.8;craftguide_next_icon.png;next;]" .. "field[0.3,0.32;2.5,1;filter;;" .. mt.formspec_escape(data.filter) .. "]" local xoffset = data.iX / 2.15 @@ -267,7 +270,7 @@ function craftguide:get_formspec(player_name, is_fuel) if data.item and reg_items[data.item] then if not data.recipes_item or (is_fuel and not get_recipe(data.item).items) then - local X = math.floor(xoffset) - (sfinv_only and 0 or 0.2) + local X = floor(xoffset) - (sfinv_only and 0 or 0.2) formspec = formspec .. "item_image_button[" .. X .. "," .. (iY + (sfinv_only and 2.7 or 2.2)) .. diff --git a/textures/craftguide_clear_icon.png b/textures/craftguide_clear_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9244264adcf8a710ff13a2d684f148f997f1522f GIT binary patch literal 708 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrVCwdCaSW-r_4ck|p0J|`+k@?8 z)4T38Ghetp_qK?~6E??3JeK}D7|j>(if@>5FNQ(xtQ%9xq#I|>oJ-rk-tWo9fB*MH zp5A261T+u{c%448b?emavpj!@3x2dSE|*=GYrgL7A+xn2b!l~{&a|J|bNs}_tEEWpk`5!2*`a}1RyVnJUKYCsTDmAJZ691N{Rw#iPDykKZKfD4SDBXYZavSfp zt(M8LUICfU&F8YHzp0s=(DY%oUz2h9J|Q20x{sb8K$MJ(p@+4@qz<4 z!kg0dK3Eysi%9);Rd;NiTfc_o`reublauX^hYkL8bi5ZVT=BywU-{9yDV`H%&hFSD z{eSy3XBU}c*&BW+C(O>xi5IGCE-m?*7^bhf!nSDs-Ve5G964XH7nBIy_{nX@*CKED zC9J9A$E62L@3|g1-|-{rXX!rIBX13O=8G=aFLdP6;d1{6XTq5t?lu(JC&Y2TP@!hB z!wW0ribzTW? zv>WHHXDQnUw9_l$Ihb?k|95ulYSoBmH}=bWKa)PledlLA%OVzTzIe`-^(=?Nn=}vK z|5|oXdfI~7>hssAan;KT<|{qg^yu`QKY#yx%+Ejmf9+EvCB5Qf=OwiwTl#JLZgovQ z!0-C6bfNb@zk-X!W`9H8=%_c!chCE&^5PxeZU@em`wuKW9OwuSX$khe@MP~-NmYTm zX3qx;1G)7Yj~~+PMrdBTn&4iAk_ zCzVg(Na=19?+|cZ@IbL5e8K}(p%j$~LCzBsW`=l_98+=LxOqcU#KxZ4bF1w%xt0{a z`}n5x5A!4yPfR4$8*;e!gynrkwWs^THJ8fwm6_+NZhvfNz`X2$*7H3+nrmg>zn$fk zcU;DTEsp7Yqx;j4fC<766bo4PXc+pOTKe$LWCb^d;0JOacKq4RS~rcuZuyjTGNpGJ zdGs?sCo&vRd%owBN{66>{6Xdinj19ZyXSmv6+FVRpg$o@?6BAl?l~2f9l{R##m}7n zuvdnKCqd%iW=9Tg|0WBd0qnUq*`xfMA{hVF3Oz`Y&}R^LW-c%^fl>ZU%pX(?803|t z4oqwB*k7+NsASMk@89(JA%AxN0fuev7cTA1*!Id^O!B}t4yQjGPcSs;x3LM-7@9OZ z=w8Uk63@e{@FOXM;ULghj(rkR4j+zQ04pijarA>!#Pd1(`(A$LlzLtR)BDcFwBi3|wtWop4gCi;u{`7xI8ZA2L-PYy1jFf#wRRI3-_)Pq&*Imx z{ps&h?Ts7z{(f(M7~k`?l9BmF{*UDcW^d%bulm8@@b{Ao7I4RluIDspxZ8IB{^$7q z%7?}cf4Be5TKAJ}!~JbQq4U|*l{*+&ZhqrE(0ZO>k$w%({XjJjxaR}i|AR;2$Dwqf z`|W`4{~+n`0jQ)&zs5XMrtS@Ycb-gLPVZrJhW300zWWR^`xq^1m zyWUxR_7M!z4@iFKeHXjyz0AM7AYOB&=QfLf7qn^Ky}aAIU0%C^v)*oIvhlX<8Qz#F e2P9I`9q-0Hd(Hm59fiOI%i!ti=d#Wzp$P!RnKjM; literal 0 HcmV?d00001 diff --git a/textures/craftguide_prev_icon.png b/textures/craftguide_prev_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b26cd157f95aec853fce734574e5d319686b8399 GIT binary patch literal 728 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrV4Cmg;uunK>+N0tY+*-+wvXwz zGV{>pV?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>!JU5 oz)Hy+PJ7*y{67!tO!d0_mw-1lpr~N2?{5lnuywWJ5y{E_0lF-AYXATM literal 0 HcmV?d00001 diff --git a/textures/craftguide_zoomin_icon.png b/textures/craftguide_zoomin_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..5b8ecc2cbdfbee1ae0398c6562221d711d47e6f8 GIT binary patch literal 3544 zcmd5P1RJw5=23fMTi@qAek3Hrk!Iup82ae_r3exyWjnN-*36U zb8^(*cZc=jHH#4lgtd>iM*uw6n68Bu@Lgt*&xfZ)V(-0D1Y*fb(=`uqvcL|3Sa6-s z3Xz2{chk8d0R{j?90;Qjh+#AW;q0mq1KemxhU7pId?5ohQdf^c@<9eFn8b8sirt|| zzIUPo3QY86aTBAtG!W(Lf^=5UVFLn41|SuJ7@?G|V4$Y$(&1;*XDkXi4Ut7NP;Mqd zWC+tA=`NB$ND_vO=HiHWB!z~-ksWDx;(JKEBaVV~q+oFbv?Gr0NTw5L$k`tXW|M$C zdVq)5EEoL7Kt;-AVmcNpm&-A70!Ac>z~X2$8rBhy#pBU10xeAt$^ZpgDBbYNf(In! zO88z5YL$vN@v3a2MntK#8@20(d5!J5aiC`#Bq|CX>yQ@ zg<>E9B$P>EEN%`fjugp6(n!%Cn4Vky9RVC#CUcJCwORy%ISQ%FGahzhHXyG>OIZnG z2pa%NMR5`?fCqtSfI=jpX#|LZrjj{$4wpxyfaDo3;QbyVZk#E(ru{Q@4vM(2jsLLH02&U* zBXiIo4Tnb)sYDRX0pT)q1PLSxj)cQ;NW@oa{3Lw%r~xs*wQ5oY!WMCO8ihlq5Ybc+ zzHuN}6_v-~!p3MkGKBzA020?!(9<?O<|kw7SR_9=#soGuGGz%`XS1I0Dv z83IwWpZTwe#~U%v?w3bGu+cwB{tUZR#FNPZ3FH<5$L>w)3;Rd&d7S5 z`rp;#|EYd9INV4;7y-c@6pJ$XgEjSy*g;Guq(C@f-a)1wic&%oc$$L{Lc%s=R#rLtM_E@jc8JqyF< zFCo9zW}xdHq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