supertux
supertux copied to clipboard
Improvements to text field item and script menu
Improves the text field and script line menu items:
- Support for going back in text and inserting/deleting characters from the current position. ("Backspace" for deleting characters in front of the cursor, "Delete" for deleting behind it.)
- Cut and copy support for whole lines. [Ctrl+X, Ctrl+C]
- Paste support (new-line characters are converted to spaces). [Ctrl+V]
- Undo/redo support (restricted to 1 step for both). [Ctrl+Z, Ctrl+Y]
Some tiny improvements take place in the script menu as well:
- Ability to duplicate lines. [Ctrl+D]
- Fix for a bug, where the menu doesn't change its size when a script line is deleted.
The int field and float field items were also refactored. They now inherit the text field item.
This PR aims to provide a partial fix to #936. Partial cut/copy, and paste support are added, but not selecting text.