From d5ac67c4cc06f2d7b313e81692e68eaff1f76da3 Mon Sep 17 00:00:00 2001 From: bleeptrack Date: Tue, 15 Sep 2020 12:50:01 +0200 Subject: [PATCH] Terminal style without standard focus --- styles/terminal_input.tres | 10 ++++++++++ terminal.tscn | 24 ++++++++---------------- 2 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 styles/terminal_input.tres diff --git a/styles/terminal_input.tres b/styles/terminal_input.tres new file mode 100644 index 0000000..b9cf241 --- /dev/null +++ b/styles/terminal_input.tres @@ -0,0 +1,10 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +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 ) +border_width_top = 2 +border_color = Color( 0.498039, 0.498039, 0.498039, 1 ) diff --git a/terminal.tscn b/terminal.tscn index 1945f52..920a183 100644 --- a/terminal.tscn +++ b/terminal.tscn @@ -2,6 +2,10 @@ [ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] [ext_resource path="res://terminal.gd" type="Script" id=2] +[ext_resource path="res://styles/terminal_input.tres" type="StyleBox" id=3] + +[sub_resource type="StyleBoxFlat" id=2] +bg_color = Color( 0, 0, 0, 1 ) [sub_resource type="StyleBoxFlat" id=1] content_margin_left = 10.0 @@ -10,20 +14,6 @@ content_margin_top = 10.0 content_margin_bottom = 10.0 bg_color = Color( 0, 0, 0, 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 = 5.0 -bg_color = Color( 0.0862745, 0.0862745, 0.0862745, 1 ) - -[sub_resource type="StyleBoxFlat" id=3] -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 ) - [node name="Terminal" type="Container"] anchor_right = 1.0 anchor_bottom = 1.0 @@ -45,6 +35,7 @@ margin_right = 1920.0 margin_bottom = 1039.0 focus_mode = 2 size_flags_vertical = 3 +custom_styles/focus = SubResource( 2 ) custom_styles/normal = SubResource( 1 ) custom_fonts/normal_font = ExtResource( 1 ) custom_colors/selection_color = Color( 0.14902, 0.368627, 0.168627, 0.690196 ) @@ -60,8 +51,9 @@ margin_bottom = 1080.0 margin_right = 1874.0 margin_bottom = 41.0 size_flags_horizontal = 3 -custom_styles/read_only = SubResource( 2 ) -custom_styles/normal = SubResource( 3 ) +custom_styles/read_only = ExtResource( 3 ) +custom_styles/focus = ExtResource( 3 ) +custom_styles/normal = ExtResource( 3 ) custom_fonts/font = ExtResource( 1 ) caret_blink = true __meta__ = {