Expose caret position to `on_gui_text_changed`

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
extermeon
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu May 18, 2017 7:44 pm
Contact:

Expose caret position to `on_gui_text_changed`

Post by extermeon »

TL;DR
Expose text field caret position to Lua API.

What ?
Add caret position information to `on_gui_text_changed` event for `LuaGuiElement::text-box` (and may be to `LuaGuiElement::textfield`)
https://lua-api.factorio.com/latest/eve ... xt_changed
Why ?
This will enable support for syntax highlighting and code suggestions libraries.
Which will improve the quality of the mods and indirectly improve the UX.
caret_position.webm
(695.43 KiB) Downloaded 92 times
Last edited by extermeon on Sun Nov 22, 2020 1:34 am, edited 2 times in total.

Koub
Global Moderator
Global Moderator
Posts: 7200
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Expose caret position to `on_gui_text_changed`

Post by Koub »

[Koub] Moved to modding interface requests.
Koub - Please consider English is not my native language.

CytoPlant812
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Aug 22, 2020 8:45 pm
Contact:

Re: Expose caret position to `on_gui_text_changed`

Post by CytoPlant812 »

+1

cid0rz
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Sun Jul 31, 2016 5:52 pm
Contact:

Re: Expose caret position to `on_gui_text_changed`

Post by cid0rz »

for sure we need fancy stuff!

Sedar
Fast Inserter
Fast Inserter
Posts: 113
Joined: Wed Apr 06, 2016 7:29 am
Contact:

Re: Expose caret position to `on_gui_text_changed`

Post by Sedar »

Wee are need that! :D

BSvER1
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat May 06, 2017 2:43 am
Contact:

Re: Expose caret position to `on_gui_text_changed`

Post by BSvER1 »

+1

Post Reply

Return to “Modding interface requests”