diff options
| author | Sophia Pearson <codergal89@gmail.com> | 2022-09-04 12:43:37 +0200 |
|---|---|---|
| committer | Sophia Pearson <codergal89@gmail.com> | 2022-09-04 12:43:37 +0200 |
| commit | 6503e483766d3a4e1907ecd9b69e7db4e86e7cb6 (patch) | |
| tree | cde6ecde91175b99ba610dff0ae16cdb720b0280 | |
| parent | 461fec003cdf3144b2e0d97392edd090f457a555 (diff) | |
| download | texty-6503e483766d3a4e1907ecd9b69e7db4e86e7cb6.tar.xz texty-6503e483766d3a4e1907ecd9b69e7db4e86e7cb6.zip | |
gui: set up new default theme
| -rw-r--r-- | Assets/Fonts/VT323Font24.tres | 1 | ||||
| -rw-r--r-- | Assets/Styles/DefaultFlatPanel.tres | 8 | ||||
| -rw-r--r-- | Assets/Styles/DefaultInvertedFlatPanel.tres | 8 | ||||
| -rw-r--r-- | Assets/Styles/GUIBox.tres | 12 | ||||
| -rw-r--r-- | Assets/Styles/GUIBoxDisabled.tres | 12 | ||||
| -rw-r--r-- | Assets/Styles/GUIBoxFocus.tres | 12 | ||||
| -rw-r--r-- | Assets/Styles/GUIBoxHover.tres | 12 | ||||
| -rw-r--r-- | Assets/Styles/GuiBoxPressed.tres | 12 | ||||
| -rw-r--r-- | Assets/Themes/Default.tres | 32 | ||||
| -rw-r--r-- | Assets/Themes/Texty.tres | 45 | ||||
| -rw-r--r-- | Scenes/Game.tscn | 83 | ||||
| -rw-r--r-- | Scenes/Texty.tscn | 79 | ||||
| -rw-r--r-- | project.godot | 2 |
13 files changed, 137 insertions, 181 deletions
diff --git a/Assets/Fonts/VT323Font24.tres b/Assets/Fonts/VT323Font24.tres index b2091a5..807c1d1 100644 --- a/Assets/Fonts/VT323Font24.tres +++ b/Assets/Fonts/VT323Font24.tres @@ -5,5 +5,6 @@ font_path = "res://Assets/Fonts/VT323-Regular.ttf" [resource] size = 24 +use_mipmaps = true use_filter = true font_data = SubResource( 1 ) diff --git a/Assets/Styles/DefaultFlatPanel.tres b/Assets/Styles/DefaultFlatPanel.tres new file mode 100644 index 0000000..0e6999b --- /dev/null +++ b/Assets/Styles/DefaultFlatPanel.tres @@ -0,0 +1,8 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +content_margin_left = 8.0 +content_margin_right = 8.0 +content_margin_top = 2.0 +content_margin_bottom = 2.0 +bg_color = Color( 0, 0, 0, 1 ) diff --git a/Assets/Styles/DefaultInvertedFlatPanel.tres b/Assets/Styles/DefaultInvertedFlatPanel.tres new file mode 100644 index 0000000..4150cb5 --- /dev/null +++ b/Assets/Styles/DefaultInvertedFlatPanel.tres @@ -0,0 +1,8 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +content_margin_left = 8.0 +content_margin_right = 8.0 +content_margin_top = 2.0 +content_margin_bottom = 2.0 +bg_color = Color( 0, 0.956863, 0, 1 ) diff --git a/Assets/Styles/GUIBox.tres b/Assets/Styles/GUIBox.tres deleted file mode 100644 index 81e3687..0000000 --- a/Assets/Styles/GUIBox.tres +++ /dev/null @@ -1,12 +0,0 @@ -[gd_resource type="StyleBoxFlat" format=2] - -[resource] -content_margin_left = 8.0 -content_margin_right = 8.0 -content_margin_top = 8.0 -content_margin_bottom = 8.0 -bg_color = Color( 0.1, 0.1, 0.1, 0.627451 ) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 diff --git a/Assets/Styles/GUIBoxDisabled.tres b/Assets/Styles/GUIBoxDisabled.tres deleted file mode 100644 index 81e3687..0000000 --- a/Assets/Styles/GUIBoxDisabled.tres +++ /dev/null @@ -1,12 +0,0 @@ -[gd_resource type="StyleBoxFlat" format=2] - -[resource] -content_margin_left = 8.0 -content_margin_right = 8.0 -content_margin_top = 8.0 -content_margin_bottom = 8.0 -bg_color = Color( 0.1, 0.1, 0.1, 0.627451 ) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 diff --git a/Assets/Styles/GUIBoxFocus.tres b/Assets/Styles/GUIBoxFocus.tres deleted file mode 100644 index 4681f62..0000000 --- a/Assets/Styles/GUIBoxFocus.tres +++ /dev/null @@ -1,12 +0,0 @@ -[gd_resource type="StyleBoxFlat" format=2] - -[resource] -content_margin_left = 8.0 -content_margin_right = 8.0 -content_margin_top = 8.0 -content_margin_bottom = 8.0 -bg_color = Color( 0, 0, 0, 0.627451 ) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 diff --git a/Assets/Styles/GUIBoxHover.tres b/Assets/Styles/GUIBoxHover.tres deleted file mode 100644 index 4681f62..0000000 --- a/Assets/Styles/GUIBoxHover.tres +++ /dev/null @@ -1,12 +0,0 @@ -[gd_resource type="StyleBoxFlat" format=2] - -[resource] -content_margin_left = 8.0 -content_margin_right = 8.0 -content_margin_top = 8.0 -content_margin_bottom = 8.0 -bg_color = Color( 0, 0, 0, 0.627451 ) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 diff --git a/Assets/Styles/GuiBoxPressed.tres b/Assets/Styles/GuiBoxPressed.tres deleted file mode 100644 index cedec54..0000000 --- a/Assets/Styles/GuiBoxPressed.tres +++ /dev/null @@ -1,12 +0,0 @@ -[gd_resource type="StyleBoxFlat" format=2] - -[resource] -content_margin_left = 8.0 -content_margin_right = 8.0 -content_margin_top = 8.0 -content_margin_bottom = 8.0 -bg_color = Color( 0, 0, 0, 0.862745 ) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 diff --git a/Assets/Themes/Default.tres b/Assets/Themes/Default.tres new file mode 100644 index 0000000..6faea67 --- /dev/null +++ b/Assets/Themes/Default.tres @@ -0,0 +1,32 @@ +[gd_resource type="Theme" load_steps=9 format=2] + +[ext_resource path="res://Assets/Styles/DefaultInvertedFlatPanel.tres" type="StyleBox" id=1] +[ext_resource path="res://Assets/Styles/DefaultFlatPanel.tres" type="StyleBox" id=2] + +[sub_resource type="StyleBoxEmpty" id=3] + +[sub_resource type="StyleBoxEmpty" id=7] + +[sub_resource type="StyleBoxEmpty" id=1] + +[sub_resource type="StyleBoxEmpty" id=2] + +[sub_resource type="StyleBoxEmpty" id=5] + +[sub_resource type="StyleBoxEmpty" id=6] + +[resource] +InvertedLabel/colors/font_color = Color( 0, 0, 0, 1 ) +InvertedPanelContainer/styles/panel = ExtResource( 1 ) +Label/colors/font_color = Color( 1, 1, 1, 1 ) +Label/styles/normal = SubResource( 3 ) +LineEdit/colors/cursor_color = Color( 0, 0, 0, 1 ) +LineEdit/colors/font_color = Color( 0, 0, 0, 1 ) +LineEdit/colors/font_color_uneditable = Color( 0.470588, 0.470588, 0.470588, 1 ) +LineEdit/styles/focus = SubResource( 7 ) +LineEdit/styles/normal = SubResource( 1 ) +LineEdit/styles/read_only = SubResource( 2 ) +PanelContainer/styles/panel = ExtResource( 2 ) +RichTextLabel/colors/default_color = Color( 0, 0.956863, 0, 1 ) +RichTextLabel/styles/focus = SubResource( 5 ) +RichTextLabel/styles/normal = SubResource( 6 ) diff --git a/Assets/Themes/Texty.tres b/Assets/Themes/Texty.tres deleted file mode 100644 index 1f7d00c..0000000 --- a/Assets/Themes/Texty.tres +++ /dev/null @@ -1,45 +0,0 @@ -[gd_resource type="Theme" load_steps=7 format=2] - -[ext_resource path="res://Assets/Styles/GUIBoxDisabled.tres" type="StyleBox" id=1] -[ext_resource path="res://Assets/Styles/GUIBoxFocus.tres" type="StyleBox" id=2] -[ext_resource path="res://Assets/Styles/GuiBoxPressed.tres" type="StyleBox" id=3] -[ext_resource path="res://Assets/Styles/GUIBoxHover.tres" type="StyleBox" id=4] -[ext_resource path="res://Assets/Styles/GUIBox.tres" type="StyleBox" id=5] - -[sub_resource type="StyleBoxFlat" id=1] -content_margin_left = 8.0 -content_margin_right = 8.0 -content_margin_top = 8.0 -content_margin_bottom = 8.0 -bg_color = Color( 0, 0, 0, 0.627451 ) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 - -[resource] -Button/colors/font_color = Color( 0.839216, 0.0117647, 0.439216, 1 ) -Button/colors/font_color_disabled = Color( 0.580392, 0.580392, 0.580392, 1 ) -Button/colors/font_color_focus = Color( 0.839216, 0.0117647, 0.439216, 1 ) -Button/colors/font_color_hover = Color( 0.929412, 0.0117647, 0.490196, 1 ) -Button/colors/font_color_pressed = Color( 0.929412, 0.0117647, 0.490196, 1 ) -Button/styles/disabled = ExtResource( 1 ) -Button/styles/focus = ExtResource( 2 ) -Button/styles/hover = SubResource( 1 ) -Button/styles/normal = ExtResource( 5 ) -Button/styles/pressed = ExtResource( 3 ) -Label/colors/font_color = Color( 0.839216, 0.00784314, 0.439216, 1 ) -LineEdit/colors/font_color = Color( 0.839216, 0.00784314, 0.439216, 1 ) -LineEdit/colors/font_color_uneditable = Color( 0.580392, 0.580392, 0.580392, 1 ) -LineEdit/styles/focus = ExtResource( 2 ) -LineEdit/styles/normal = ExtResource( 5 ) -LineEdit/styles/read_only = ExtResource( 1 ) -PanelContainer/styles/panel = ExtResource( 5 ) -ProgressBar/colors/font_color = Color( 0.839216, 0.0117647, 0.439216, 1 ) -ProgressBar/styles/bg = ExtResource( 5 ) -ProgressBar/styles/fg = ExtResource( 4 ) -TextEdit/colors/font_color = Color( 0.839216, 0.00784314, 0.439216, 1 ) -TextEdit/colors/font_color_readonly = Color( 0.580392, 0.580392, 0.580392, 1 ) -TextEdit/colors/font_color_selected = Color( 0, 0, 0, 1 ) -TextEdit/styles/focus = ExtResource( 2 ) -TextEdit/styles/normal = ExtResource( 5 ) diff --git a/Scenes/Game.tscn b/Scenes/Game.tscn new file mode 100644 index 0000000..c5c22e0 --- /dev/null +++ b/Scenes/Game.tscn @@ -0,0 +1,83 @@ +[gd_scene format=2] + +[node name="Game" type="VBoxContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +custom_constants/separation = 0 + +[node name="StatusLine" type="PanelContainer" parent="."] +margin_right = 640.0 +margin_bottom = 29.0 +theme_type_variation = "InvertedPanelContainer" + +[node name="Container" type="HBoxContainer" parent="StatusLine"] +margin_left = 8.0 +margin_top = 2.0 +margin_right = 632.0 +margin_bottom = 27.0 +size_flags_horizontal = 3 + +[node name="Title" type="Label" parent="StatusLine/Container"] +margin_right = 624.0 +margin_bottom = 25.0 +size_flags_horizontal = 3 +size_flags_vertical = 6 +theme_type_variation = "InvertedLabel" +text = "Adventure Title" +max_lines_visible = 1 + +[node name="Output" type="PanelContainer" parent="."] +margin_top = 29.0 +margin_right = 640.0 +margin_bottom = 451.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Container" type="ScrollContainer" parent="Output"] +margin_left = 8.0 +margin_top = 2.0 +margin_right = 632.0 +margin_bottom = 420.0 +mouse_filter = 1 +size_flags_horizontal = 3 +size_flags_vertical = 3 +scroll_horizontal_enabled = false + +[node name="Lines" type="VBoxContainer" parent="Output/Container"] +margin_right = 624.0 +margin_bottom = 27.0 +size_flags_horizontal = 3 + +[node name="RichTextLabel" type="RichTextLabel" parent="Output/Container/Lines"] +margin_right = 624.0 +margin_bottom = 27.0 +text = "This is where the output goes" +fit_content_height = true +scroll_active = false + +[node name="Input" type="PanelContainer" parent="."] +margin_top = 451.0 +margin_right = 640.0 +margin_bottom = 480.0 +theme_type_variation = "InvertedPanelContainer" + +[node name="Container" type="HBoxContainer" parent="Input"] +margin_left = 8.0 +margin_top = 2.0 +margin_right = 632.0 +margin_bottom = 27.0 + +[node name="Prompt" type="Label" parent="Input/Container"] +margin_right = 20.0 +margin_bottom = 25.0 +theme_type_variation = "InvertedLabel" +text = "?>" + +[node name="Text" type="LineEdit" parent="Input/Container"] +margin_left = 28.0 +margin_right = 624.0 +margin_bottom = 25.0 +size_flags_horizontal = 3 +context_menu_enabled = false +selecting_enabled = false +caret_blink = true diff --git a/Scenes/Texty.tscn b/Scenes/Texty.tscn index b40b2da..a7bdbf9 100644 --- a/Scenes/Texty.tscn +++ b/Scenes/Texty.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://Assets/Shaders/crt_shader.tres" type="Material" id=1] +[ext_resource path="res://Scenes/Game.tscn" type="PackedScene" id=2] [ext_resource path="res://Scripts/Texty.cs" type="Script" id=3] [node name="Texty" type="Node"] @@ -8,80 +9,7 @@ script = ExtResource( 3 ) [node name="Terminal" type="CanvasLayer" parent="."] -[node name="Game" type="VBoxContainer" parent="Terminal"] -anchor_right = 1.0 -anchor_bottom = 1.0 - -[node name="StatusLine" type="PanelContainer" parent="Terminal/Game"] -margin_right = 640.0 -margin_bottom = 53.0 - -[node name="Container" type="HBoxContainer" parent="Terminal/Game/StatusLine"] -margin_left = 14.0 -margin_top = 14.0 -margin_right = 626.0 -margin_bottom = 39.0 -size_flags_horizontal = 3 - -[node name="Title" type="Label" parent="Terminal/Game/StatusLine/Container"] -margin_right = 612.0 -margin_bottom = 25.0 -size_flags_horizontal = 3 -size_flags_vertical = 6 -text = "Adventure Title" -max_lines_visible = 1 - -[node name="Output" type="PanelContainer" parent="Terminal/Game"] -margin_top = 61.0 -margin_right = 640.0 -margin_bottom = 399.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="Container" type="ScrollContainer" parent="Terminal/Game/Output"] -margin_left = 14.0 -margin_top = 14.0 -margin_right = 626.0 -margin_bottom = 324.0 -mouse_filter = 1 -size_flags_horizontal = 3 -size_flags_vertical = 3 -scroll_horizontal_enabled = false - -[node name="Lines" type="VBoxContainer" parent="Terminal/Game/Output/Container"] -margin_right = 612.0 -margin_bottom = 27.0 -size_flags_horizontal = 3 - -[node name="RichTextLabel" type="RichTextLabel" parent="Terminal/Game/Output/Container/Lines"] -margin_right = 612.0 -margin_bottom = 27.0 -text = "This is where the output goes" -fit_content_height = true - -[node name="Input" type="PanelContainer" parent="Terminal/Game"] -margin_top = 407.0 -margin_right = 640.0 -margin_bottom = 480.0 - -[node name="Container" type="HBoxContainer" parent="Terminal/Game/Input"] -margin_left = 14.0 -margin_top = 14.0 -margin_right = 626.0 -margin_bottom = 59.0 - -[node name="Prompt" type="Label" parent="Terminal/Game/Input/Container"] -margin_top = 10.0 -margin_right = 20.0 -margin_bottom = 35.0 -text = "?>" - -[node name="Text" type="LineEdit" parent="Terminal/Game/Input/Container"] -margin_left = 28.0 -margin_right = 612.0 -margin_bottom = 45.0 -size_flags_horizontal = 3 -placeholder_text = "Command Input" +[node name="Game" parent="Terminal" instance=ExtResource( 2 )] [node name="Screen" type="CanvasLayer" parent="."] @@ -89,5 +17,6 @@ placeholder_text = "Command Input" material = ExtResource( 1 ) anchor_right = 1.0 anchor_bottom = 1.0 +mouse_filter = 2 size_flags_horizontal = 3 size_flags_vertical = 3 diff --git a/project.godot b/project.godot index 9c03cd8..6b4fafa 100644 --- a/project.godot +++ b/project.godot @@ -63,6 +63,7 @@ enabled=PoolStringArray( "res://addons/ClassExporter/plugin.cfg", "res://addons/ [gui] theme/use_hidpi=true +theme/custom="res://Assets/Themes/Default.tres" theme/custom_font="res://Assets/Fonts/VT323Font24.tres" [locale] @@ -75,5 +76,4 @@ common/enable_pause_aware_picking=true [rendering] -quality/driver/driver_name="GLES2" environment/default_environment="res://default_env.tres" |
