mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-12-22 20:32:38 +01:00
Improve fonts and colors
This commit is contained in:
parent
02a0428d1c
commit
5a291685fa
5 changed files with 41 additions and 25 deletions
7
fonts/big.tres
Normal file
7
fonts/big.tres
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://fonts/iosevka-regular.ttf" type="DynamicFontData" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
size = 40
|
||||||
|
font_data = ExtResource( 1 )
|
|
@ -32,6 +32,8 @@ margin_top = 484.0
|
||||||
margin_right = 1907.0
|
margin_right = 1907.0
|
||||||
margin_bottom = 1068.0
|
margin_bottom = 1068.0
|
||||||
custom_fonts/font = ExtResource( 5 )
|
custom_fonts/font = ExtResource( 5 )
|
||||||
|
custom_colors/background_color = Color( 0, 0, 0, 1 )
|
||||||
|
syntax_highlighting = true
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[gd_scene load_steps=3 format=2]
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://repository.gd" type="Script" id=1]
|
[ext_resource path="res://repository.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=2]
|
[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=2]
|
||||||
|
[ext_resource path="res://fonts/big.tres" type="DynamicFont" id=3]
|
||||||
|
|
||||||
[node name="Repository" type="Container"]
|
[node name="Repository" type="Container"]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
@ -17,6 +18,7 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Index" type="Label" parent="."]
|
[node name="Index" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
margin_left = 32.0
|
margin_left = 32.0
|
||||||
margin_top = 80.0
|
margin_top = 80.0
|
||||||
margin_right = 375.079
|
margin_right = 375.079
|
||||||
|
@ -29,6 +31,7 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="IndexLabel" type="Label" parent="."]
|
[node name="IndexLabel" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
margin_left = 21.0
|
margin_left = 21.0
|
||||||
margin_top = 65.0
|
margin_top = 65.0
|
||||||
margin_right = 377.0
|
margin_right = 377.0
|
||||||
|
@ -52,6 +55,6 @@ __meta__ = {
|
||||||
[node name="Label" type="Label" parent="."]
|
[node name="Label" type="Label" parent="."]
|
||||||
margin_left = 20.0
|
margin_left = 20.0
|
||||||
margin_top = 20.0
|
margin_top = 20.0
|
||||||
custom_fonts/font = ExtResource( 2 )
|
custom_fonts/font = ExtResource( 3 )
|
||||||
text = "Repo name"
|
text = "Repo name"
|
||||||
[connection signal="pressed" from="Button" to="." method="update_everything"]
|
[connection signal="pressed" from="Button" to="." method="update_everything"]
|
||||||
|
|
|
@ -11,22 +11,22 @@ onready var output = $Control/Output
|
||||||
func _input(event):
|
func _input(event):
|
||||||
if history.size() > 0:
|
if history.size() > 0:
|
||||||
if event.is_action_pressed("ui_up"):
|
if event.is_action_pressed("ui_up"):
|
||||||
|
if history_position > 0:
|
||||||
history_position -= 1
|
history_position -= 1
|
||||||
history_position %= history.size()
|
|
||||||
input.text = history[history_position]
|
input.text = history[history_position]
|
||||||
input.caret_position = input.text.length()
|
input.caret_position = input.text.length()
|
||||||
# This prevents the Input taking the arrow as a "skip to beginning" command.
|
# This prevents the Input taking the arrow as a "skip to beginning" command.
|
||||||
get_tree().set_input_as_handled()
|
get_tree().set_input_as_handled()
|
||||||
if event.is_action_pressed("ui_down"):
|
if event.is_action_pressed("ui_down"):
|
||||||
|
if history_position < history.size()-1:
|
||||||
history_position += 1
|
history_position += 1
|
||||||
history_position %= history.size()
|
|
||||||
input.text = history[history_position]
|
input.text = history[history_position]
|
||||||
input.caret_position = input.text.length()
|
input.caret_position = input.text.length()
|
||||||
get_tree().set_input_as_handled()
|
get_tree().set_input_as_handled()
|
||||||
|
|
||||||
func send_command(command):
|
func send_command(command):
|
||||||
history.push_back(command)
|
history.push_back(command)
|
||||||
history_position += 1
|
history_position = history.size()
|
||||||
|
|
||||||
thread = Thread.new()
|
thread = Thread.new()
|
||||||
thread.start(self, "run_command_in_a_thread", command)
|
thread.start(self, "run_command_in_a_thread", command)
|
||||||
|
@ -36,5 +36,5 @@ func run_command_in_a_thread(command):
|
||||||
|
|
||||||
input.text = ""
|
input.text = ""
|
||||||
output.text = output.text + "$ " + command + "\n" + o
|
output.text = output.text + "$ " + command + "\n" + o
|
||||||
output.scroll_vertical = 999999
|
#output.scroll_vertical = 999999
|
||||||
$"../Repositories/ActiveRepository".update_everything() # FIXME
|
$"../Repositories/ActiveRepository".update_everything() # FIXME
|
||||||
|
|
|
@ -4,10 +4,18 @@
|
||||||
[ext_resource path="res://terminal.gd" type="Script" id=2]
|
[ext_resource path="res://terminal.gd" type="Script" id=2]
|
||||||
[ext_resource path="res://command_button.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://command_button.tscn" type="PackedScene" id=4]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id=1]
|
[sub_resource type="StyleBoxFlat" id=2]
|
||||||
|
content_margin_left = 10.0
|
||||||
|
content_margin_right = 10.0
|
||||||
|
content_margin_top = 10.0
|
||||||
|
content_margin_bottom = 10.0
|
||||||
bg_color = Color( 0, 0, 0, 1 )
|
bg_color = Color( 0, 0, 0, 1 )
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id=2]
|
[sub_resource type="StyleBoxFlat" id=1]
|
||||||
|
content_margin_left = 10.0
|
||||||
|
content_margin_right = 10.0
|
||||||
|
content_margin_top = 10.0
|
||||||
|
content_margin_bottom = 5.0
|
||||||
bg_color = Color( 0, 0, 0, 1 )
|
bg_color = Color( 0, 0, 0, 1 )
|
||||||
|
|
||||||
[node name="Terminal" type="Container"]
|
[node name="Terminal" type="Container"]
|
||||||
|
@ -26,17 +34,13 @@ __meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Output" type="TextEdit" parent="Control"]
|
[node name="Output" type="RichTextLabel" parent="Control"]
|
||||||
margin_right = 1920.0
|
margin_right = 1920.0
|
||||||
margin_bottom = 1054.0
|
margin_bottom = 1039.0
|
||||||
focus_mode = 0
|
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
custom_styles/read_only = SubResource( 1 )
|
custom_styles/normal = SubResource( 2 )
|
||||||
custom_fonts/font = ExtResource( 1 )
|
custom_fonts/normal_font = ExtResource( 1 )
|
||||||
readonly = true
|
scroll_following = true
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Button" parent="Control" instance=ExtResource( 4 )]
|
[node name="Button" parent="Control" instance=ExtResource( 4 )]
|
||||||
visible = false
|
visible = false
|
||||||
|
@ -62,10 +66,10 @@ text = "git checkout HEAD^"
|
||||||
align = 0
|
align = 0
|
||||||
|
|
||||||
[node name="Input" type="LineEdit" parent="Control"]
|
[node name="Input" type="LineEdit" parent="Control"]
|
||||||
margin_top = 1054.0
|
margin_top = 1039.0
|
||||||
margin_right = 1920.0
|
margin_right = 1920.0
|
||||||
margin_bottom = 1080.0
|
margin_bottom = 1080.0
|
||||||
custom_styles/normal = SubResource( 2 )
|
custom_styles/normal = SubResource( 1 )
|
||||||
custom_fonts/font = ExtResource( 1 )
|
custom_fonts/font = ExtResource( 1 )
|
||||||
caret_blink = true
|
caret_blink = true
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
|
|
Loading…
Reference in a new issue