Commit graph

4 commits

Author SHA1 Message Date
Leroy Hopson
d6a4adf6aa
feat(terminal): and stylebox support
Adds support for 'normal' and 'focus' Style Boxes to Terminal node.
Changes default background color to transparent, with background to be
set by StyleBox.

If background color is not transparent, will draw a background color
rect to cover the entire control over the top of any stylebox. This is
consistent with the behavior of the TextEdit node with regards to theme
colors and styleboxes.
2024-04-28 18:09:21 +12:00
Leroy Hopson
8c30bec861
Add support for two different inverse modes
- Inverse mode invert (default) will invert the color in shader.
- Inverse mode swap will simply swap the foreground and background
  colors. This is the default behavior of libtsm and GodotXterm v3.
2024-02-07 23:03:11 +13:00
Leroy Hopson
8b320622f9
Use shader include for fore/background shaders
The two shaders use a lot of common logic for co-ordinate and attribute
look up, so it makes sense to use a common include shader for both.

Adds support for the inverse and blink attributes to the foreground shader.
2024-02-07 21:59:01 +13:00
Leroy Hopson
a849423096
Rewrite terminal.cpp
Rewrites the Terminal class as a GDExtension to be used directly in
Godot without a terminal.gd proxy.

Breaks a lot of things in its current state (e.g. signals and other
functions have not be implemented yet), but does add support for
transparent colors and true color inversion. It also seems to
be about 4x faster (FPS-wise) than the old version with some basic
stress testing.

Old source code has been moved to a different directory to be copied
over and/or rewritten piece by piece.
2024-02-07 00:14:33 +13:00