Skip to content

Commit

Permalink
Remove TLabel and update settings UI (#1159)
Browse files Browse the repository at this point in the history
* Remove TLabel

Also includes some UI updates on some settings pages.
I've created a new "Hint"/"Info" labelsettings resource that is used on all the information labels to make them stand out from the settings. Added a list of commands to the DialogText settings page

* Add TitleBgStylebox

Added to make it easier to change the title style later on.

* Small ui update
  • Loading branch information
Jowan-Spooner authored Aug 25, 2022
1 parent b60650b commit 7d55adf
Show file tree
Hide file tree
Showing 19 changed files with 1,504 additions and 614 deletions.
972 changes: 972 additions & 0 deletions addons/dialogic/Editor/Common/HintLabelSettings.tres

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions addons/dialogic/Editor/Common/TLabel.gd

This file was deleted.

9 changes: 0 additions & 9 deletions addons/dialogic/Editor/Common/TLabel.tscn

This file was deleted.

8 changes: 8 additions & 0 deletions addons/dialogic/Editor/Common/TitleBgStylebox.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://dmsjhgv22dns8"]

[resource]
content_margin_left = 5.0
content_margin_top = 5.0
content_margin_right = 5.0
content_margin_bottom = 5.0
bg_color = Color(0.545098, 0.545098, 0.545098, 0.211765)
7 changes: 7 additions & 0 deletions addons/dialogic/Editor/Settings/SettingsEditor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
extends PanelContainer

func _ready():

var info_font_settings :LabelSettings = load("res://addons/dialogic/Editor/Common/HintLabelSettings.tres")
info_font_settings.font = get_theme_font("doc_italic", "EditorFonts")
info_font_settings.font_size = get_theme_font_size('font_size', 'Label')
info_font_settings.font_color = get_theme_color("accent_color", "Editor")
ResourceSaver.save(info_font_settings)

hide()
visibility_changed.connect(_on_visibility_changed)

Expand Down
4 changes: 2 additions & 2 deletions addons/dialogic/Editor/Settings/SettingsEditor.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://cfwssh53iuf8x"]
[gd_scene load_steps=4 format=3]

[ext_resource type="Script" path="res://addons/dialogic/Editor/Settings/SettingsEditor.gd" id="1"]
[ext_resource type="PackedScene" uid="uid://bmuda00fbd6i7" path="res://addons/dialogic/Editor/Settings/Settings_General.tscn" id="3"]
[ext_resource type="PackedScene" uid="uid://dgg785aucy0l3" path="res://addons/dialogic/Editor/Settings/Translations.tscn" id="3_q3qwt"]
[ext_resource type="PackedScene" path="res://addons/dialogic/Editor/Settings/Settings_Translations.tscn" id="3_q3qwt"]

[node name="SettingsEditor" type="PanelContainer"]
visible = false
Expand Down
53 changes: 27 additions & 26 deletions addons/dialogic/Editor/Settings/Settings_General.tscn
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
[gd_scene load_steps=5 format=3 uid="uid://bmuda00fbd6i7"]
[gd_scene load_steps=6 format=3 uid="uid://dm4kxvcn7d7ug"]

[ext_resource type="Script" path="res://addons/dialogic/Editor/Settings/Settings_General.gd" id="2"]
[ext_resource type="LabelSettings" uid="uid://nkh7ypguw3il" path="res://addons/dialogic/Editor/Common/HintLabelSettings.tres" id="2_hs15a"]
[ext_resource type="StyleBox" uid="uid://dmsjhgv22dns8" path="res://addons/dialogic/Editor/Common/TitleBgStylebox.tres" id="2_u584y"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3nwa2"]
content_margin_left = 5.0
content_margin_top = 5.0
content_margin_right = 5.0
content_margin_bottom = 5.0
bg_color = Color(0.545098, 0.545098, 0.545098, 0.211765)

[sub_resource type="Image" id="Image_svkl2"]
[sub_resource type="Image" id="Image_3nstt"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "LumAlpha8",
Expand All @@ -19,7 +14,7 @@ data = {
}

[sub_resource type="ImageTexture" id="7"]
image = SubResource("Image_svkl2")
image = SubResource("Image_3nstt")

[node name="General" type="HBoxContainer"]
anchor_right = 1.0
Expand All @@ -34,7 +29,7 @@ size_flags_horizontal = 3
[node name="TitleLabel" type="Label" parent="General"]
offset_right = 830.0
offset_bottom = 36.0
theme_override_styles/normal = SubResource("StyleBoxFlat_3nwa2")
theme_override_styles/normal = ExtResource("2_u584y")
text = "Extensions"

[node name="HBoxContainer" type="HBoxContainer" parent="General"]
Expand All @@ -43,18 +38,20 @@ offset_right = 830.0
offset_bottom = 66.0

[node name="Label" type="Label" parent="General/HBoxContainer"]
offset_right = 166.0
offset_right = 498.0
offset_bottom = 26.0
size_flags_horizontal = 3
text = "Custom events folder"

[node name="CustomEventsFolderLabel" type="Label" parent="General/HBoxContainer"]
unique_name_in_owner = true
offset_left = 170.0
offset_left = 502.0
offset_right = 802.0
offset_bottom = 26.0
size_flags_horizontal = 3
size_flags_horizontal = 8
text = "res://addons/dialogic_additions/Events"
text_overrun_behavior = 1
horizontal_alignment = 2
visible_characters_behavior = 4

[node name="CustomEventsFolderButton" type="Button" parent="General/HBoxContainer"]
unique_name_in_owner = true
Expand All @@ -68,6 +65,7 @@ offset_top = 70.0
offset_right = 830.0
offset_bottom = 96.0
text = "You should restart godot after changing this path!"
label_settings = ExtResource("2_hs15a")

[node name="HSeparator" type="HSeparator" parent="General"]
offset_top = 100.0
Expand All @@ -78,7 +76,7 @@ offset_bottom = 104.0
offset_top = 108.0
offset_right = 830.0
offset_bottom = 144.0
theme_override_styles/normal = SubResource("StyleBoxFlat_3nwa2")
theme_override_styles/normal = ExtResource("2_u584y")
text = "Testing"

[node name="HBoxContainer2" type="HBoxContainer" parent="General"]
Expand All @@ -87,18 +85,20 @@ offset_right = 830.0
offset_bottom = 174.0

[node name="Label" type="Label" parent="General/HBoxContainer2"]
offset_right = 105.0
offset_right = 494.0
offset_bottom = 26.0
size_flags_horizontal = 3
text = "Testing scene"

[node name="TestingSceneLabel" type="Label" parent="General/HBoxContainer2"]
unique_name_in_owner = true
offset_left = 109.0
offset_left = 498.0
offset_right = 802.0
offset_bottom = 26.0
size_flags_horizontal = 3
text = "res://addons/dialogic_additions/Events"
text_overrun_behavior = 2
size_flags_horizontal = 8
text = "res://addons/dialogic_additions/Events "
horizontal_alignment = 2
visible_characters_behavior = 4

[node name="TestingSceneButton" type="Button" parent="General/HBoxContainer2"]
unique_name_in_owner = true
Expand All @@ -119,14 +119,15 @@ offset_bottom = 600.0

[node name="Label" type="Label" parent="Theming"]
offset_right = 182.0
offset_bottom = 26.0
offset_bottom = 36.0
theme_override_styles/normal = ExtResource("2_u584y")
text = "Color palette"

[node name="Colors" type="HBoxContainer" parent="Theming"]
unique_name_in_owner = true
offset_top = 30.0
offset_top = 40.0
offset_right = 182.0
offset_bottom = 38.0
offset_bottom = 48.0

[node name="Color1" type="ColorPickerButton" parent="Theming/Colors"]
offset_right = 8.0
Expand Down Expand Up @@ -165,9 +166,9 @@ color = Color(0.486275, 0.486275, 0.486275, 1)

[node name="ResetColorsButton" type="Button" parent="Theming"]
unique_name_in_owner = true
offset_top = 42.0
offset_top = 52.0
offset_right = 182.0
offset_bottom = 73.0
offset_bottom = 83.0
size_flags_horizontal = 0
text = "Reset colors to default"

Expand Down
Loading

0 comments on commit 7d55adf

Please sign in to comment.