New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No way to press enter in formspec without closing it #2743
Comments
I've labeled this as a bug (as well as feature request) because I think that, in essence and in my opinion, not having a way to bypass the enter key closing a formspec is undesirable behaviour |
For what it's worth, my long-term goal is to be able to implement a terminal in Minetest (a la computercraft's) but since that appears to be currently impossible the current engine, so I'm shooting for the next-best thing, line-oriented teletype interaction. |
I just show another formspec to a player in magichet. But image_button work well for me - I sort inventory with it and it doesn't close anything. |
@4aiman Could you give me a link to the code where you just show another formspec to make it appear as if enter doesn't close the form? I've tried this in my own code and haven't been able to get it to work. |
@technomancy
In case you'll need more info: please, tell me what are you trying to do and if possible show your code that needs "fixing". I'll be able to help you. I won't demand anything from you in turn, so feel at ease about licensing or whatever distribution concerns you may have. |
@4aiman Thanks. What I've got is here: technomancy/calandria@84f3651 I call |
@technomancy Please, try the things I've described and tell other people here should you succeed. |
Just to follow-up back here re: conversations held elsewhere, there are some workarounds for this, but none of them work for keyboard-initiated form callbacks, which is what I need. Is there anything I could do to help get this fixed inside Minetest itself? |
I wouldn't say this is a bug, more down to how the formspec/mod is written... Check out how nametags are done in mobs redo, you can hit enter and it works fine; https://github.com/tenplus1/mobs/blob/master/api.lua#L2662 |
#516 was refused btw. |
I think the idea was to make a new formspec element for this, instead of changing the behavior of the current one. That's why it was refused. |
In this form, I'd like to be able to press enter to trigger the
on_receive_fields
callback, but every time I press enter, it closes the form.According to Zeno on the freenode channel, it should only close when
button_exit
is set, but this appears not to be checked here: https://github.com/minetest/minetest/blob/master/src/guiFormSpecMenu.cpp#L3038The text was updated successfully, but these errors were encountered: