LuaGuiElement textfield: confirm_on_focus_lost

Things that we aren't going to implement
Post Reply
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 450
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

LuaGuiElement textfield: confirm_on_focus_lost

Post by raiguard »

Hello. With all of the new textfield additions (THANK YOU!!!), there are still two things missing that would complete my needs 100%, one of which is the option for the textfield to confirm when its focus is lost. Think of it as the opposite of the lose_focus_on_confirm option.

The reason I want this is to avoid confusion for players who, instead of pressing enter, click another GUI element to defocus the textfield. As you can see in this video, doing the latter does not fire the confirmed event, and therefore the cheat is not edited:



The most elegant solution I can think of for this is for a textfield to optionally fire the on_gui_confirmed event when it loses focus like this.

Thanks for your time!
Attachments
not confirming.mp4
(112.61 KiB) Downloaded 155 times
Don't forget, you're here forever.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaGuiElement textfield: confirm_on_focus_lost

Post by Rseding91 »

This isn't going to happen. Losing focus can happen for one of many reasons - even destroying the game when exiting can trigger focus lost. It's not an explicit user input and the base game specifically never treats "focus lost" as confirmation.

If that's the behavior you want - you're out of luck - because it's not going to happen.
If you want to get ahold of me I'm almost always on Discord.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 450
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: LuaGuiElement textfield: confirm_on_focus_lost

Post by raiguard »

Fair enough, thanks anyway!
Don't forget, you're here forever.

User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 357
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: LuaGuiElement textfield: confirm_on_focus_lost

Post by jockeril »

Hello Rseding,

Is there a way to have the input stick when we leave the text field if not like this - I and many other players have found this to be an issue in other mods as well like in this hellmod discussion about changing the amount of modules used in a line or block,

This behaviour is natural - you set a number and move on to the next item - can't there be a way to accept the last text in the field as the value of that field ?

Thank you !
[request] RTL support please

My mods

Formally Hebrew translator for FARL & EvoGUI mods

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image

Xorimuth
Filter Inserter
Filter Inserter
Posts: 623
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: LuaGuiElement textfield: confirm_on_focus_lost

Post by Xorimuth »

Rseding91 wrote:
Thu Aug 01, 2019 4:13 am
This isn't going to happen. Losing focus can happen for one of many reasons - even destroying the game when exiting can trigger focus lost. It's not an explicit user input and the base game specifically never treats "focus lost" as confirmation.

If that's the behavior you want - you're out of luck - because it's not going to happen.
In the train time select GUI, the textfield contains "30 s", when you click it, it turns into "30" and when it loses focus it goes back to "30 s". It would be nice to be able to replicate this, but it isn't possible without this suggestion being implemented. :?
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings

Post Reply

Return to “Won't implement”