Change terminal menu option 'Select All' -> 'Copy All'

Adds copy_all() function to terminal node which returns all of the
screen's text.
This commit is contained in:
Leroy Hopson 2021-07-13 22:20:29 +07:00
parent 703eb68f11
commit 97e07093b2
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
4 changed files with 14 additions and 2 deletions

View file

@ -16,7 +16,7 @@ enum TerminalPopupMenuOptions {
NEW_TERMINAL = 0,
COPY = 2,
PASTE = 3,
SELECT_ALL = 4,
COPY_ALL = 4,
CLEAR = 6,
KILL_TERMINAL = 7,
}
@ -216,6 +216,8 @@ func _on_TerminalPopupMenu_id_pressed(id):
event.unicode = ord(OS.clipboard[i])
event.pressed = true
terminal._gui_input(event)
TerminalPopupMenuOptions.COPY_ALL:
OS.clipboard = terminal.copy_all()
TerminalPopupMenuOptions.CLEAR:
terminal.clear()
TerminalPopupMenuOptions.KILL_TERMINAL: