New icons

This commit is contained in:
Jean-Patrick Guerrero 2018-11-25 15:51:01 +01:00
parent eff2fa82f3
commit 0b4f202ffb
9 changed files with 52 additions and 13 deletions

36
LICENSE

@ -1,3 +1,6 @@
License of source code
----------------------
« Copyright © 2015-2018, Jean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>
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 <copyright holders> 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 <copyright holders>. »
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/

@ -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)

@ -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)) ..

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB