From 6e70c760d697cfbaeb6f24a51b83e48173caff40 Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Mon, 24 Jun 2024 03:26:02 +0200 Subject: [PATCH] Fix some formspecs on mobile (#4456) This should allow renaming items on the anvil when using mobile. This also may improve mobile craftguide experience. Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4456 Co-authored-by: the-real-herowl Co-committed-by: the-real-herowl --- mods/HELP/mcl_craftguide/init.lua | 1 + mods/ITEMS/mcl_anvils/init.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index 41fb392fa..2e5e0ea63 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -678,6 +678,7 @@ local function make_formspec(name) 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] + field_enter_after_edit[filter;true] ]] fs[#fs + 1] = fmt([[ tooltip[search;%s] diff --git a/mods/ITEMS/mcl_anvils/init.lua b/mods/ITEMS/mcl_anvils/init.lua index b41411f15..3db1a7eb9 100644 --- a/mods/ITEMS/mcl_anvils/init.lua +++ b/mods/ITEMS/mcl_anvils/init.lua @@ -28,6 +28,7 @@ local function get_anvil_formspec(set_name) "field[4.125,0.75;7.25,1;name;;" .. F(set_name) .. "]", "field_close_on_enter[name;false]", + "field_enter_after_edit[name;true]", "set_focus[name;true]", mcl_formspec.get_itemslot_bg_v4(1.625, 2.6, 1, 1),