mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-23 03:13:44 +01:00
New icons
This commit is contained in:
parent
eff2fa82f3
commit
0b4f202ffb
36
LICENSE
36
LICENSE
@ -1,3 +1,6 @@
|
|||||||
|
License of source code
|
||||||
|
----------------------
|
||||||
|
|
||||||
« Copyright © 2015-2018, Jean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>
|
« 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:
|
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.
|
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>. »
|
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` is also integrated in `sfinv` (Minetest Game inventory) when you enable it with
|
||||||
`craftguide_sfinv_only = true` in `minetest.conf`.
|
`craftguide_sfinv_only = true` in `minetest.conf`.
|
||||||
|
|
||||||
![Preview2](http://i.imgur.com/3q7rVSo.png)
|
![Preview2](https://i.imgur.com/bToFH38.png)
|
||||||
|
27
init.lua
27
init.lua
@ -110,7 +110,7 @@ function craftguide:get_recipe(iX, iY, xoffset, recipe_num, recipes, show_usage)
|
|||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
"button[" .. (iX - (sfinv_only and 2.2 or 2.6)) .. "," ..
|
"button[" .. (iX - (sfinv_only and 2.2 or 2.6)) .. "," ..
|
||||||
(iY + (sfinv_only and 3.9 or 3.3)) .. ";2.2,1;alternate;" ..
|
(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) .. "]"
|
S("@1 of @2", recipe_num, recipes_total) .. "]"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ function craftguide:get_recipe(iX, iY, xoffset, recipe_num, recipes, show_usage)
|
|||||||
return formspec
|
return formspec
|
||||||
else
|
else
|
||||||
for i, v in pairs(items) do
|
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)
|
(sfinv_only and 0 or 0.2)
|
||||||
local Y = ceil(i / width + (iY + 2) - min(2, rows))
|
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]" ..
|
"background[1,1;1,1;craftguide_bg.png;true]" ..
|
||||||
"tooltip[size_inc;" .. S("Increase window size") .. "]" ..
|
"tooltip[size_inc;" .. S("Increase window size") .. "]" ..
|
||||||
"tooltip[size_dec;" .. S("Decrease window size") .. "]" ..
|
"tooltip[size_dec;" .. S("Decrease window size") .. "]" ..
|
||||||
"button[" .. (data.iX * 0.48) .. ",0;0.7,1;size_inc;+]" ..
|
"image_button[" .. (data.iX * 0.47) ..
|
||||||
"button[" .. ((data.iX * 0.48) + 0.5) .. ",0;0.7,1;size_dec;-]"
|
",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
|
end
|
||||||
|
|
||||||
formspec = formspec .. [[
|
formspec = formspec .. [[
|
||||||
button[2.4,0.23;0.8,0.5;search;?]
|
image_button[2.4,0.12;0.8,0.8;craftguide_search_icon.png;search;]
|
||||||
button[3.05,0.23;0.8,0.5;clear;X]
|
image_button[3.05,0.12;0.8,0.8;craftguide_clear_icon.png;clear;]
|
||||||
field_close_on_enter[filter;false]
|
field_close_on_enter[filter;false]
|
||||||
]] ..
|
]] ..
|
||||||
"tooltip[search;" .. S("Search") .. "]" ..
|
"tooltip[search;" .. S("Search") .. "]" ..
|
||||||
"tooltip[clear;" .. S("Reset") .. "]" ..
|
"tooltip[clear;" .. S("Reset") .. "]" ..
|
||||||
"tooltip[prev;" .. S("Previous page") .. "]" ..
|
"tooltip[prev;" .. S("Previous page") .. "]" ..
|
||||||
"tooltip[next;" .. S("Next page") .. "]" ..
|
"tooltip[next;" .. S("Next page") .. "]" ..
|
||||||
"button[" .. (data.iX - (sfinv_only and 2.6 or 3.1)) ..
|
"image_button[" .. (data.iX - (sfinv_only and 2.6 or 3.1)) ..
|
||||||
",0.03;0.8,0.95;prev;<]" ..
|
",0.12;0.8,0.8;craftguide_prev_icon.png;prev;]" ..
|
||||||
"label[" .. (data.iX - (sfinv_only and 1.7 or 2.2)) .. ",0.21;" ..
|
"label[" .. (data.iX - (sfinv_only and 1.7 or 2.2)) .. ",0.22;" ..
|
||||||
colorize(data.pagenum) .. " / " .. data.pagemax .. "]" ..
|
colorize(data.pagenum) .. " / " .. data.pagemax .. "]" ..
|
||||||
"button[" .. (data.iX - (sfinv_only and 0.7 or 1.2) -
|
"image_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;>]" ..
|
(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) .. "]"
|
"field[0.3,0.32;2.5,1;filter;;" .. mt.formspec_escape(data.filter) .. "]"
|
||||||
|
|
||||||
local xoffset = data.iX / 2.15
|
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 data.item and reg_items[data.item] then
|
||||||
if not data.recipes_item or (is_fuel and not get_recipe(data.item).items) 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 ..
|
formspec = formspec ..
|
||||||
"item_image_button[" .. X .. "," ..
|
"item_image_button[" .. X .. "," ..
|
||||||
(iY + (sfinv_only and 2.7 or 2.2)) ..
|
(iY + (sfinv_only and 2.7 or 2.2)) ..
|
||||||
|
BIN
textures/craftguide_clear_icon.png
Normal file
BIN
textures/craftguide_clear_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 708 B |
BIN
textures/craftguide_next_icon.png
Normal file
BIN
textures/craftguide_next_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 727 B |
BIN
textures/craftguide_prev_icon.png
Normal file
BIN
textures/craftguide_prev_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 728 B |
BIN
textures/craftguide_search_icon.png
Normal file
BIN
textures/craftguide_search_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
textures/craftguide_zoomin_icon.png
Normal file
BIN
textures/craftguide_zoomin_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
BIN
textures/craftguide_zoomout_icon.png
Normal file
BIN
textures/craftguide_zoomout_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in New Issue
Block a user