LuaGuiElement.selected [RW] for textboxes

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
IWTDU
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Apr 04, 2019 8:46 am
Contact:

LuaGuiElement.selected [RW] for textboxes

Post by IWTDU »

We can use select(start, end) to change selection or cursor position in text fields, but looks like there is no way to know where cursor is. I am making ingame lua code editor with syntax highlighting (programming combinators), and there is working implementation, but it have to compare previous with current text on on_gui_text_changed event to guess cursor position, and it is not always possible. Anyway, it looks like that it is an not-so-difficult-to-add api feature, and it is useful for sure.

Post Reply

Return to “Modding interface requests”