GuiElement Textfield localised .text

Things that we aren't going to implement
Post Reply
matjojo
Filter Inserter
Filter Inserter
Posts: 337
Joined: Wed Jun 17, 2015 6:08 pm
Contact:

GuiElement Textfield localised .text

Post by matjojo »

So a lot of gui elements have the .caption tag wich can take localised strings. But when trying to make a placeholder text for a textfield found that the .text tag for Lua/GuiElement textfield does not allow localisation. I can see why this would not matter for the user adding text in the textbox, as it does not have a use for localisation there, but when making a placeholder using the .text tag it makes sense to be able to use it.

Another way of doing this is adding a .placeholder tag in the .add{type = (...)} which does allow localisation, I'd certainly use it.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: GuiElement Textfield localised .text

Post by aubergine18 »

+1 for the .placeholder property; assuming that displays text in the text box and when the box gets focus the placeholder text disappears?

Would also need new property in textfield_style prototypes to define the placeholder_color.

While on subject of textfield_style prototypes, it would be nice to define different background images for different states, for example: default, hover, clicked/selected?, disabled - I'd like to make text field with dark background normally, but when active have light background.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

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

Re: GuiElement Textfield localised .text

Post by Rseding91 »

Factorio TextFields don't currently support any kind of water-mark text. If at some point we decide to implement that mechanics I'll add a way to use it in the mod API.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Won't implement”