Page 1 of 1

Expose caret position to `on_gui_text_changed`

Posted: Fri Aug 21, 2020 12:21 am
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 143 times

Re: Expose caret position to `on_gui_text_changed`

Posted: Fri Aug 21, 2020 5:34 am
by Koub
[Koub] Moved to modding interface requests.

Re: Expose caret position to `on_gui_text_changed`

Posted: Sun Aug 23, 2020 8:40 pm
by CytoPlant812
+1

Re: Expose caret position to `on_gui_text_changed`

Posted: Wed Sep 09, 2020 10:23 pm
by cid0rz
for sure we need fancy stuff!

Re: Expose caret position to `on_gui_text_changed`

Posted: Sun Sep 27, 2020 9:43 am
by Sedar
Wee are need that! :D

Re: Expose caret position to `on_gui_text_changed`

Posted: Sun Dec 20, 2020 3:46 am
by BSvER1
+1

Re: Expose caret position to `on_gui_text_changed`

Posted: Sun Nov 03, 2024 7:33 pm
by danbopes
+1 Please expose this

Re: Expose caret position to `on_gui_text_changed`

Posted: Mon Nov 04, 2024 5:45 pm
by extermeon