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!
LuaGuiElement textfield: confirm_on_focus_lost
LuaGuiElement textfield: confirm_on_focus_lost
- Attachments
-
- not confirming.mp4
- (112.61 KiB) Downloaded 188 times
Don't forget, you're here forever.
Re: LuaGuiElement textfield: confirm_on_focus_lost
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 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.
Re: LuaGuiElement textfield: confirm_on_focus_lost
Fair enough, thanks anyway!
Don't forget, you're here forever.
Re: LuaGuiElement textfield: confirm_on_focus_lost
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 !
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 !
Re: LuaGuiElement textfield: confirm_on_focus_lost
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.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.
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings