From 7b63079594de580251d16df9ec27b52d7673585f Mon Sep 17 00:00:00 2001 From: Leroy Hopson Date: Sat, 17 Jul 2021 20:57:43 +0700 Subject: [PATCH] Change default theme Replaces default.tres, default_dark.tres, and default_light.tres, with default.tres and default_light.tres based on Godot's default dark and light editor themes respectively. Closes #44 --- addons/godot_xterm/themes/default.tres | 32 ++++++++++---------- addons/godot_xterm/themes/default_dark.tres | 31 ------------------- addons/godot_xterm/themes/default_light.tres | 30 +++++++++--------- examples/menu/menu.gd | 4 ++- 4 files changed, 34 insertions(+), 63 deletions(-) delete mode 100644 addons/godot_xterm/themes/default_dark.tres diff --git a/addons/godot_xterm/themes/default.tres b/addons/godot_xterm/themes/default.tres index c56c1b2..8cc1459 100644 --- a/addons/godot_xterm/themes/default.tres +++ b/addons/godot_xterm/themes/default.tres @@ -7,24 +7,24 @@ [resource] default_font = ExtResource( 1 ) -Terminal/colors/Background = Color( 0, 0, 0, 1 ) +Terminal/colors/Background = Color( 0.12549, 0.145098, 0.192157, 1 ) Terminal/colors/Black = Color( 0, 0, 0, 1 ) -Terminal/colors/Blue = Color( 0, 0, 0.501961, 1 ) -Terminal/colors/Cyan = Color( 0, 0.501961, 0.501961, 1 ) -"Terminal/colors/Dark Grey" = Color( 0.501961, 0.501961, 0.501961, 1 ) -Terminal/colors/Foreground = Color( 1, 1, 1, 1 ) -Terminal/colors/Green = Color( 0, 0.501961, 0, 1 ) -"Terminal/colors/Light Blue" = Color( 0, 0, 1, 1 ) -"Terminal/colors/Light Cyan" = Color( 0, 1, 1, 1 ) -"Terminal/colors/Light Green" = Color( 0, 1, 0, 1 ) -"Terminal/colors/Light Grey" = Color( 0.752941, 0.752941, 0.752941, 1 ) -"Terminal/colors/Light Magenta" = Color( 1, 0, 1, 1 ) -"Terminal/colors/Light Red" = Color( 1, 0, 0, 1 ) -"Terminal/colors/Light Yellow" = Color( 1, 1, 0, 1 ) -Terminal/colors/Magenta = Color( 0.501961, 0, 0.501961, 1 ) -Terminal/colors/Red = Color( 0.501961, 0, 0, 1 ) +Terminal/colors/Blue = Color( 0.341176, 0.698039, 1, 1 ) +Terminal/colors/Cyan = Color( 0.4, 0.901961, 1, 1 ) +"Terminal/colors/Dark Grey" = Color( 0.462745, 0.47451, 0.509804, 1 ) +Terminal/colors/Foreground = Color( 0.8, 0.807843, 0.827451, 1 ) +Terminal/colors/Green = Color( 0.388235, 0.760784, 0.34902, 1 ) +"Terminal/colors/Light Blue" = Color( 0.737255, 0.878431, 1, 1 ) +"Terminal/colors/Light Cyan" = Color( 0.776471, 1, 0.929412, 1 ) +"Terminal/colors/Light Green" = Color( 0.258824, 1, 0.760784, 1 ) +"Terminal/colors/Light Grey" = Color( 0.8, 0.807843, 0.827451, 1 ) +"Terminal/colors/Light Magenta" = Color( 0.807843, 0.643137, 0.945098, 1 ) +"Terminal/colors/Light Red" = Color( 1, 0.439216, 0.521569, 1 ) +"Terminal/colors/Light Yellow" = Color( 1, 0.92549, 0.627451, 1 ) +Terminal/colors/Magenta = Color( 0.623529, 0.439216, 1, 1 ) +Terminal/colors/Red = Color( 1, 0.47, 0.42, 1 ) Terminal/colors/White = Color( 1, 1, 1, 1 ) -Terminal/colors/Yellow = Color( 0.501961, 0.501961, 0, 1 ) +Terminal/colors/Yellow = Color( 1, 0.866667, 0.396078, 1 ) Terminal/fonts/Bold = ExtResource( 4 ) "Terminal/fonts/Bold Italic" = ExtResource( 2 ) Terminal/fonts/Italic = ExtResource( 3 ) diff --git a/addons/godot_xterm/themes/default_dark.tres b/addons/godot_xterm/themes/default_dark.tres deleted file mode 100644 index f35f2f7..0000000 --- a/addons/godot_xterm/themes/default_dark.tres +++ /dev/null @@ -1,31 +0,0 @@ -[gd_resource type="Theme" load_steps=5 format=2] - -[ext_resource path="res://addons/godot_xterm/themes/fonts/bold_italic.tres" type="DynamicFont" id=1] -[ext_resource path="res://addons/godot_xterm/themes/fonts/italic.tres" type="DynamicFont" id=2] -[ext_resource path="res://addons/godot_xterm/themes/fonts/bold.tres" type="DynamicFont" id=3] -[ext_resource path="res://addons/godot_xterm/themes/fonts/regular.tres" type="DynamicFont" id=4] - -[resource] -default_font = ExtResource( 4 ) -Terminal/colors/Background = Color( 0, 0, 0, 1 ) -Terminal/colors/Black = Color( 0, 0, 0, 1 ) -Terminal/colors/Blue = Color( 0, 0, 0.933333, 1 ) -Terminal/colors/Cyan = Color( 0, 0.803922, 0.803922, 1 ) -"Terminal/colors/Dark Grey" = Color( 0.498039, 0.498039, 0.498039, 1 ) -Terminal/colors/Foreground = Color( 1, 1, 1, 1 ) -Terminal/colors/Green = Color( 0, 0.803922, 0, 1 ) -"Terminal/colors/Light Blue" = Color( 0, 0, 1, 1 ) -"Terminal/colors/Light Cyan" = Color( 0, 1, 1, 1 ) -"Terminal/colors/Light Green" = Color( 0, 1, 0, 1 ) -"Terminal/colors/Light Grey" = Color( 0.898039, 0.898039, 0.898039, 1 ) -"Terminal/colors/Light Magenta" = Color( 1, 0, 1, 1 ) -"Terminal/colors/Light Red" = Color( 1, 0, 0, 1 ) -"Terminal/colors/Light Yellow" = Color( 1, 1, 0, 1 ) -Terminal/colors/Magenta = Color( 0.803922, 0, 0.803922, 1 ) -Terminal/colors/Red = Color( 0.803922, 0, 0, 1 ) -Terminal/colors/White = Color( 1, 1, 1, 1 ) -Terminal/colors/Yellow = Color( 0.803922, 0.803922, 0, 1 ) -Terminal/fonts/Bold = ExtResource( 3 ) -"Terminal/fonts/Bold Italic" = ExtResource( 1 ) -Terminal/fonts/Italic = ExtResource( 2 ) -Terminal/fonts/Regular = ExtResource( 4 ) diff --git a/addons/godot_xterm/themes/default_light.tres b/addons/godot_xterm/themes/default_light.tres index 5cacb33..46476e2 100644 --- a/addons/godot_xterm/themes/default_light.tres +++ b/addons/godot_xterm/themes/default_light.tres @@ -7,24 +7,24 @@ [resource] default_font = ExtResource( 4 ) -Terminal/colors/Background = Color( 1, 1, 1, 1 ) +Terminal/colors/Background = Color( 0.921569, 0.921569, 0.921569, 1 ) Terminal/colors/Black = Color( 0, 0, 0, 1 ) -Terminal/colors/Blue = Color( 0, 0, 0.933333, 1 ) -Terminal/colors/Cyan = Color( 0, 0.803922, 0.803922, 1 ) -"Terminal/colors/Dark Grey" = Color( 0.498039, 0.498039, 0.498039, 1 ) -Terminal/colors/Foreground = Color( 0, 0, 0, 1 ) -Terminal/colors/Green = Color( 0, 0.803922, 0, 1 ) -"Terminal/colors/Light Blue" = Color( 0, 0, 1, 1 ) -"Terminal/colors/Light Cyan" = Color( 0, 1, 1, 1 ) -"Terminal/colors/Light Green" = Color( 0, 1, 0, 1 ) +Terminal/colors/Blue = Color( 0.239216, 0.392157, 0.866667, 1 ) +Terminal/colors/Cyan = Color( 0, 0.65098, 0.729412, 1 ) +"Terminal/colors/Dark Grey" = Color( 0.25098, 0.25098, 0.25098, 1 ) +Terminal/colors/Foreground = Color( 0.25098, 0.25098, 0.25098, 1 ) +Terminal/colors/Green = Color( 0, 0.380392, 0.188235, 1 ) +"Terminal/colors/Light Blue" = Color( 0.160784, 0.545098, 1, 1 ) +"Terminal/colors/Light Cyan" = Color( 0.133333, 0.8, 1, 1 ) +"Terminal/colors/Light Green" = Color( 0, 0.760784, 0.380392, 1 ) "Terminal/colors/Light Grey" = Color( 0.898039, 0.898039, 0.898039, 1 ) -"Terminal/colors/Light Magenta" = Color( 1, 0, 1, 1 ) -"Terminal/colors/Light Red" = Color( 1, 0, 0, 1 ) -"Terminal/colors/Light Yellow" = Color( 1, 1, 0, 1 ) -Terminal/colors/Magenta = Color( 0.803922, 0, 0.803922, 1 ) -Terminal/colors/Red = Color( 0.803922, 0, 0, 1 ) +"Terminal/colors/Light Magenta" = Color( 0.658824, 0.364706, 0.913725, 1 ) +"Terminal/colors/Light Red" = Color( 1, 0.439216, 0.521569, 1 ) +"Terminal/colors/Light Yellow" = Color( 1, 0.866667, 0.396078, 1 ) +Terminal/colors/Magenta = Color( 0.439216, 0.164706, 1, 1 ) +Terminal/colors/Red = Color( 0.74902, 0.352941, 0.313726, 1 ) Terminal/colors/White = Color( 1, 1, 1, 1 ) -Terminal/colors/Yellow = Color( 0.803922, 0.803922, 0, 1 ) +Terminal/colors/Yellow = Color( 0.698039, 0.572549, 0.0627451, 1 ) Terminal/fonts/Bold = ExtResource( 3 ) "Terminal/fonts/Bold Italic" = ExtResource( 1 ) Terminal/fonts/Italic = ExtResource( 2 ) diff --git a/examples/menu/menu.gd b/examples/menu/menu.gd index 38e15cc..61b60e4 100644 --- a/examples/menu/menu.gd +++ b/examples/menu/menu.gd @@ -58,12 +58,14 @@ func draw_all(_size = Vector2.ZERO): func draw_title(): + tput.setaf(Color("#FFECA0")) tput.cup(row, 0) for line in TITLE.split("\r"): row += 1 tput.cup(row, offset) $Terminal.write(line) + tput.sgr0() # Get the plugin version from the plugin's config file. var config = ConfigFile.new() @@ -92,7 +94,7 @@ func draw_menu(): tput.cup(row, offset) if selected_index == i: - tput.setab(Color("#FF7500")) + tput.setab(Color("#FF786B")) tput.setaf(Color.black) $Terminal.write("%s. %s" % [i + 1, item.name])