Commit graph

9 commits

Author SHA1 Message Date
Leroy Hopson
5f399ed46e
Allow theme inheritance
Terminal colors and fonts will be inherited from ancestor nodes if not
defined.
2021-07-23 09:30:25 +07:00
Leroy Hopson
c81da3820b
Kill child process and close pty on exit
- Adds kill() method to LibuvUtils.
- Adds close() method to Pipe.
2021-07-23 08:37:54 +07:00
Leroy Hopson
55b0a0577d
Update bell
- Don't add the bell to the archive to keep it small a simplify
  licensing. Also bells seem to be rarely used with terminal emulators.
- Don't play the bell directly from the Terminal node by adding an
  AudioStreamPlayer, but make it easy to tune the "bell" signal behavior
  from the Terminal node so that only an AudioStreamPlayer node's play()
  method needs to be connected to it.
- Keep the bell.wav sound around for testing/demo.
2021-07-23 08:37:49 +07:00
Leroy Hopson
b08d218a59
Run tests in CI environment
Currently tests only run on X11.64 platform.
But other platforms can be supported with a bit of effort.
Remove default bell sound as it does not play nicely with CI environment
that does not have sound card.
2021-07-18 23:05:17 +07:00
Leroy Hopson
d2f073d7ae
Multiple updates
- Use viewport as render target for terminal:
  Terminal now only draws cells which changed since the last _draw() call.
  A viewport is used with clear mode set to NEVER to cache previous draw
  calls. The terminal node and viewport are wrapped by a GDScript Terminal
  node which takes care of resizing the viewport scene, and forcing the
  terminal to redraw all cells when necessary (i.e. on resize or theme
  change).

  Adds update_mode to terminal interface which can be set to one of:
  - DISABLED: terminal will never be drawn
  - AUTO: terminal will only draw the cells that changed, but
    automatically redraw the full screen when necessary (for example,
    when the size or theme changed).
  - ALL: terminal will always draw every cell on every update. This is
    the most reliable but least performant option.
  - ALL_NEXT_FRAME: Will use update_mode ALL for the next _draw() call,
    then change update_mode back to AUTO.

- Upgraded libtsm:
  Includes changes from Fredrik Wikstrom (salass00)'s fork of libtsm.

- Don't require theme to be set.
  Terminal will use default fonts/colors if no theme is set.
2021-06-20 18:33:40 +07:00
Leroy Hopson
80bcc41855
Save themes in .tres format
Better for version control and editing outside of the editor.
2021-06-18 10:17:48 +07:00
Leroy Hopson
f43149f204 Format files using GDScript Toolkit
https://github.com/Scony/godot-gdscript-toolkit
2021-06-06 16:25:19 +07:00
Leroy Hopson
a0237bb5d5 Add more themes 2020-11-30 11:24:34 +07:00
Leroy Hopson
9bd17ec8dc Multiple changes
Former-commit-id: db8e674358
2020-10-05 17:56:57 +07:00