Commit graph

30 commits

Author SHA1 Message Date
Leroy Hopson
e68d2f55c9 Position background rect at 0,0
This is important when terminal is a child of a Container node and we
set the margin properties, otherwise the background rect is drawn with
an offset.
2020-10-16 12:55:41 +07:00
Leroy Hopson
fd39635fc5 Update build script 2020-10-13 16:12:16 +07:00
Leroy Hopson
46b2d2c56f Bump version to 1.0.0 2020-10-05 18:16:17 +07:00
Leroy Hopson
c66e478484 Update documentation and LICENSE 2020-10-05 18:04:41 +07:00
Leroy Hopson
293d35f5c5 Add pre-built binary for x11 platform 2020-10-05 17:56:58 +07:00
Leroy Hopson
db8e674358 Multiple changes 2020-10-05 17:56:57 +07:00
Leroy Hopson
f63246d8ea Make Terminal a tool script 2020-10-05 17:56:57 +07:00
Leroy Hopson
faca53fe28 Center cell string vertically
This prevents overlapping so we no longer need to draw all background
cells before the foreground.
2020-10-05 17:56:57 +07:00
Leroy Hopson
0d14fd1e47 Don't cache true colors
If a true color has been set it will have code -1 regardless of the
actual color. Therefore, it shouldn't be stored in the color cache
dictionary otherwise all true color cells will be colored the most
recently set value.
2020-10-05 17:56:57 +07:00
Leroy Hopson
0130ce96db Add 3D Text plugin 2020-10-05 17:56:57 +07:00
Leroy Hopson
57aed28a0e Change write method to accept both String and PoolByteArray
Will print a warning if neither of these types is used as an argument.
2020-10-05 17:56:57 +07:00
Leroy Hopson
ada8b1087d Copy old cells to new cells when resizing
Previously all cells were erased which resulted in the screen becoming
blank in some places until it was redrawn.
2020-10-05 17:56:57 +07:00
Leroy Hopson
66b061bf8b Ensure terminal is initialized to the correct size
Moves the call to update_size() from _init() to _ready() to ensure
Terminal is initialized to the correct size.
2020-10-05 17:56:57 +07:00
Leroy Hopson
e7c14bd76d Ignore vscode config files 2020-10-05 17:56:57 +07:00
Leroy Hopson
d64800229f Move input handling into the Terminal node 2020-10-05 17:56:57 +07:00
Leroy Hopson
0dabc56076 Update file format
Automatically updated by VSCode upon saving the files.
2020-10-05 17:56:57 +07:00
Leroy Hopson
8d3eec465f Rename 'modules' directory to 'external' 2020-10-05 17:56:57 +07:00
Leroy Hopson
ffa8561865 Add asciicast importer 2020-10-05 17:56:57 +07:00
Leroy Hopson
3eecf504cf Refactor file structure 2020-10-05 17:56:57 +07:00
Leroy Hopson
f9474fe533 Remove gdscript version and replace with native 2020-10-05 17:56:55 +07:00
Leroy Hopson
d8c8b5b272 Make native library easier to build/use
Makes libtsm a static library rather than dynamic so that it doesn't
have to be installed as a system library on the user's operating system.

Also updates SConstruct to work on more operating systems other than
just NixOS. Adds a number of docker files for building the library on
various distributions (NixOS, Arch Linux, Ubuntu).

Uses a fork of godot-cpp with an updated godot_headers submodule that
includes godotengine/godot_headers#76. We should go back to tracking
https://github.com/godotengine/godot-cpp once the submodule has
been updated in that repo.
2020-10-05 17:56:40 +07:00
Leroy Hopson
78eeacdc22 Ok
todos:
	- Read more than one byte at a time before emitting signal.
	- Set correct termios and winp values.
	- Handle SIGWINCH stuff when resizing window.
2020-10-05 17:56:25 +07:00
Leroy Hopson
6b92606d99 Crude resize working 2020-10-05 17:56:24 +07:00
Leroy Hopson
1187c9b7a3 Basics working, added pseudoterminal 2020-10-05 17:56:21 +07:00
Leroy Hopson
f6bd5a11c8 Initial native commit 2020-10-05 17:55:46 +07:00
Richard Hájek
85e6e8807e refactored some collisions 2020-09-13 19:28:34 +02:00
Leroy Hopson
0d4e10f5ab Add more features, bug fixes and bugs ;-)
Most notably:
- Reflow is now working. Terminal size will fill the window and
cols/rows will be resized/calculated based on window and font size.
- Added support for different fonts (i.e. bold, italic, bolditalic).
- Enabled blinking characters.
- Adde more tests and caught a few subtle bugs.
- Removed renderer code (which was part of xterm.js) and just
doing naive rendering in terminal.gd, but it seems to perform
a lot faster.

Still not working completely:
- vim (some weirdness going on).
- vttest (more weirdness).

Todo:
- Fix the above.
- Draw the cursor!
- Improve performance. Performance is still not great. The terminal
becomes unusable when running `yes` or `cmatrix -r`.
2020-05-19 18:55:43 +07:00
Leroy Hopson
0769592a1b Add/update more files 2020-05-17 17:32:06 +07:00
Leroy Hopson
8d76d3500c Update license text in file headers
With the exception of text_decoder.gd the code in these files follows
the original so closely that it doesn't qualify as an original work
and so there is nothing new to copyright.

Instead, the original license text is kept with a note mentioning the
port to GDScript.
2020-05-11 04:05:37 +12:00
Leroy Hopson
96e9ddcf79 Add all the files 2020-05-10 01:42:19 +07:00