diff options
author | Rogier <rogier777@gmail.com> | 2015-02-07 18:10:40 +0100 |
---|---|---|
committer | Rogier <rogier777@gmail.com> | 2015-03-11 16:00:37 +0100 |
commit | 2fd9e59242efba7a8a375c4fb36f1f6f6ecc1500 (patch) | |
tree | 34e4f6b34b0d128ed35794cf01ccc0d8514a2ba8 /register.lua | |
parent | 76a9efff71f924b143af8945ce02ed336b6a1090 (diff) |
Display conversion method symbolically and textually next to arrow
Diffstat (limited to 'register.lua')
-rw-r--r-- | register.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/register.lua b/register.lua index 3f0d27c..67a4c02 100644 --- a/register.lua +++ b/register.lua @@ -224,9 +224,10 @@ unified_inventory.register_page("craftguide", { local craft_type = unified_inventory.registered_craft_types[craft.type] or unified_inventory.craft_type_defaults(craft.type, {}) - formspec = formspec.."label[6,3.35;" .. S("Method:") .. "]" - formspec = formspec.."label[6,3.75;" - ..minetest.formspec_escape(craft_type.description).."]" + if craft_type.icon then + formspec = formspec..string.format(" image[%f,%f;%f,%f;%s]",5.2,0.85,0.5,0.5,craft_type.icon) + end + formspec = formspec.."label[5,1.50;" .. minetest.formspec_escape(craft_type.description).."]" formspec = formspec..stack_image_button(6, 1, 1.1, 1.1, "item_button_usage_", ItemStack(craft.output)) local display_size = craft_type.dynamic_display_size and craft_type.dynamic_display_size(craft) or { width = craft_type.width, height = craft_type.height } local craft_width = craft_type.get_shaped_craft_width and craft_type.get_shaped_craft_width(craft) or display_size.width |