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: VoxeLibre/VoxeLibre#4456
Co-authored-by: the-real-herowl <wiktor_t-i@proton.me>
Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>
This commit is contained in:
the-real-herowl 2024-06-24 03:26:02 +02:00 committed by the-real-herowl
parent 53802b270d
commit 6e70c760d6
2 changed files with 2 additions and 0 deletions

View File

@ -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[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;] 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]
field_enter_after_edit[filter;true]
]] ]]
fs[#fs + 1] = fmt([[ tooltip[search;%s] fs[#fs + 1] = fmt([[ tooltip[search;%s]

View File

@ -28,6 +28,7 @@ local function get_anvil_formspec(set_name)
"field[4.125,0.75;7.25,1;name;;" .. F(set_name) .. "]", "field[4.125,0.75;7.25,1;name;;" .. F(set_name) .. "]",
"field_close_on_enter[name;false]", "field_close_on_enter[name;false]",
"field_enter_after_edit[name;true]",
"set_focus[name;true]", "set_focus[name;true]",
mcl_formspec.get_itemslot_bg_v4(1.625, 2.6, 1, 1), mcl_formspec.get_itemslot_bg_v4(1.625, 2.6, 1, 1),