mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-10 04:40:25 +01:00
0d4e10f5ab
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`.
55 lines
2 KiB
Text
55 lines
2 KiB
Text
[gd_scene load_steps=7 format=2]
|
|
|
|
[ext_resource path="res://scenes/demo.gd" type="Script" id=1]
|
|
[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=2]
|
|
[ext_resource path="res://addons/godot_xterm/fonts/source_code_pro/source_code_pro_regular.tres" type="DynamicFont" id=3]
|
|
[ext_resource path="res://addons/godot_xterm/fonts/source_code_pro/source_code_pro_italic.tres" type="DynamicFont" id=4]
|
|
[ext_resource path="res://addons/godot_xterm/fonts/source_code_pro/source_code_pro_bold_italic.tres" type="DynamicFont" id=5]
|
|
[ext_resource path="res://addons/godot_xterm/fonts/source_code_pro/source_code_pro_bold.tres" type="DynamicFont" id=6]
|
|
|
|
[node name="Demo" type="Control"]
|
|
show_behind_parent = true
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
script = ExtResource( 1 )
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="Terminal" type="Control" parent="."]
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
rect_min_size = Vector2( 600, 400 )
|
|
script = ExtResource( 2 )
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
auto_resize = true
|
|
font_family = {
|
|
"bold": ExtResource( 6 ),
|
|
"bold_italic": ExtResource( 5 ),
|
|
"italic": ExtResource( 4 ),
|
|
"regular": ExtResource( 3 )
|
|
}
|
|
line_height = 1.15
|
|
colors = {
|
|
"black": Color( 0.180392, 0.203922, 0.211765, 1 ),
|
|
"blue": Color( 0.203922, 0.396078, 0.643137, 1 ),
|
|
"bright_black": Color( 0.333333, 0.341176, 0.32549, 1 ),
|
|
"bright_blue": Color( 0.447059, 0.623529, 0.811765, 1 ),
|
|
"bright_cyan": Color( 0.203922, 0.886275, 0.886275, 1 ),
|
|
"bright_green": Color( 0.541176, 0.886275, 0.203922, 1 ),
|
|
"bright_magenta": Color( 0.678431, 0.498039, 0.658824, 1 ),
|
|
"bright_red": Color( 0.937255, 0.160784, 0.160784, 1 ),
|
|
"bright_white": Color( 0.933333, 0.933333, 0.92549, 1 ),
|
|
"bright_yellow": Color( 0.988235, 0.913725, 0.309804, 1 ),
|
|
"cyan": Color( 0.0235294, 0.596078, 0.603922, 1 ),
|
|
"green": Color( 0.305882, 0.603922, 0.0235294, 1 ),
|
|
"magenta": Color( 0.458824, 0.313726, 0.482353, 1 ),
|
|
"red": Color( 0.8, 0, 0, 1 ),
|
|
"white": Color( 0.827451, 0.843137, 0.811765, 1 ),
|
|
"yellow": Color( 0.768627, 0.627451, 0, 1 )
|
|
}
|
|
window_options = {
|
|
"set_win_lines": false
|
|
}
|