Make on_gui_confirmed work for text-boxes

Things that we aren't going to implement
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 261
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Make on_gui_confirmed work for text-boxes

Post by Therenas »

As far as I can tell, on_gui_confirmed does not fire on text-boxes at all. It would be useful to have it work on them, too, for obvious reasons.

Now the problem this poses is that the enter-key is overloaded in a text-box: It either performs a line return, or confirms the form. In other places (the web or others), this is solved by ctrl/shift and enter either confirming the form or inserting a line return, with enter doing the reverse. I'm not sure which solution is the correct one here, probably modifier-key and enter being the confirmation.

Another solution that might be fitting here is to let the modder decide. As the event communicates which modifier keys have been pressed along with enter, the mod itself could choose which combination of keys does what. This is more work for the modder, and might be confusing to users to have different interactions in different places, but it is an option, as is gives the most flexibility.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14598
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Make on_gui_confirmed work for text-boxes

Post by Rseding91 »

on_gui_confirmed can't work with text boxes because enter is already reserved for adding newlines to the text box.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 261
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: Make on_gui_confirmed work for text-boxes

Post by Therenas »

... That's what I wrote about, wanting to come up with a solution to that. But if it's not something you want to support, that's fine too.
Post Reply

Return to “Won't implement”