Hello there,
first of all, thanks to @quark for making a really easy to use library for GUI elements. It’s also one of the few with any kind of text-areas.
I’m in a process of making a simple text-editing tool for writing stories and managing different perspectives, and was wondering if there is a way to go around the following few issues with GTextArea.
- empty lines require trickery, and cannot be created by simply pressing enter. One must go to the end of the previous line, and then press enter to create an empty line.
- copy-pasting does not work properly (macOS cmd vs ctrl)
- double-clicking a word does not select it (and the same with triple clicking for a sentence)
- is there a neat way to get focus on a textarea when dragging a piece of text from another window? (I’m using Drop -library, and while I can get it to work with G4P, focus is a bit of a challenge at the moment.)
- is there any way to highlight part of the text in a text-area with a specific colour? I cannot even do it manually as an overlay, since G4P writes over any other graphical elements I use. This would be neat for tags in the text.
Has anyone encountered anything similar, and if so, would you have any suggestions on how to deal with them?
I think I might be able to find the right word/sentence for the double-clicking and the triple-clicking with just mouse-events, getCaretPos and getText, but how to make that text “selected”?
Also, if there are any other suggestions for making a good text-field, all suggestions are more than welcome!
-kryt