Place to ask discuss and request the modding support of Factorio. Don't request mods here.
1 post • Page 1 of 1
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.
Users browsing this forum: No registered users