Terminal panel updates

- Add TerminalSettings resource.
- Init/load terminal settings from terminal panel.
- Add terminal context menu (i.e. right-click PopupMenu).
- Add shortcut to open a new terminal Ctrl+Shift+T and make terminal panel
  visible.
This commit is contained in:
Leroy Hopson 2021-07-12 23:11:28 +07:00
parent 04e077694f
commit ebb527cb8b
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
9 changed files with 169 additions and 0 deletions

View file

@ -24,7 +24,10 @@ func _enter_tree():
"X11", "Server", "OSX":
pty_script = load("res://addons/godot_xterm/nodes/pty/unix/pty_unix.gd")
add_custom_type("PTY", "Node", pty_script, pty_icon)
var terminal_settings_script = preload("./editor_plugins/terminal/settings/terminal_settings.gd")
add_custom_type("TerminalSettings", "Resource", terminal_settings_script, null)
terminal_panel = preload("./editor_plugins/terminal/terminal_panel.tscn").instance()
terminal_panel.editor_plugin = self
terminal_panel.editor_interface = get_editor_interface()
add_control_to_bottom_panel(terminal_panel, "Terminal")
@ -38,5 +41,6 @@ func _exit_tree():
if pty_supported:
remove_custom_type("PTY")
remove_custom_type("TerminalSettings")
remove_control_from_bottom_panel(terminal_panel)
terminal_panel.free()