added text to credits popup

added connection to handle clicking links in credits
set up credits richtext with bold/regular fonts
master
Zac 4 years ago
parent 774c1a5867
commit 3579b761c8
  1. 54
      _scenes/MainMenu.tscn
  2. 5
      scripts/CreditPopup.gd

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=2]
[gd_scene load_steps=15 format=2]
[ext_resource path="res://scripts/MainMenu.gd" type="Script" id=1]
[ext_resource path="res://textures/white_pixel.png" type="Texture" id=2]
@ -7,6 +7,7 @@
[ext_resource path="res://textures/settings.png" type="Texture" id=5]
[ext_resource path="res://resources/label_font.tres" type="DynamicFont" id=6]
[ext_resource path="res://scripts/CreditPopup.gd" type="Script" id=7]
[ext_resource path="res://fonts/Amiko-Bold.ttf" type="DynamicFontData" id=8]
[sub_resource type="Shader" id=1]
@ -41,6 +42,22 @@ use_filter = true
font_data = ExtResource( 3 )
_sections_unfolded = [ "Font", "Settings" ]
[sub_resource type="DynamicFont" id=5]
size = 17
use_mipmaps = true
use_filter = true
font_data = ExtResource( 8 )
_sections_unfolded = [ "Extra Spacing", "Font", "Settings" ]
[sub_resource type="DynamicFont" id=6]
size = 17
use_mipmaps = true
use_filter = true
font_data = ExtResource( 3 )
_sections_unfolded = [ "Font", "Settings" ]
[node name="Menu" type="CanvasLayer" index="0"]
pause_mode = 2
@ -62,6 +79,7 @@ playback/speed = 1.0
[node name="MenuElements" type="Container" parent="." index="1"]
editor/display_folded = true
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
@ -117,6 +135,7 @@ _sections_unfolded = [ "custom_fonts" ]
[node name="buttons" type="VBoxContainer" parent="MenuElements" index="2"]
editor/display_folded = true
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
@ -586,6 +605,7 @@ _sections_unfolded = [ "custom_fonts" ]
[node name="CreditPopup" type="PopupDialog" parent="." index="3"]
editor/display_folded = true
visible = false
anchor_left = 0.5
anchor_top = 0.5
@ -594,7 +614,7 @@ anchor_bottom = 0.5
margin_left = -169.0
margin_top = -199.0
margin_right = 168.0
margin_bottom = 199.0
margin_bottom = 265.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
@ -628,29 +648,43 @@ lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "custom_fonts" ]
[node name="RichTextLabel" type="RichTextLabel" parent="CreditPopup" index="1"]
[node name="CreditsText" type="RichTextLabel" parent="CreditPopup" index="1"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -119.5
margin_top = -109.0
margin_top = -160.0
margin_right = 118.5
margin_bottom = 109.0
margin_bottom = 154.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
custom_fonts/bold_font = SubResource( 5 )
custom_fonts/normal_font = SubResource( 6 )
bbcode_enabled = true
bbcode_text = ""
bbcode_text = "[b]Rain Heavy Quiet Interior[/b]: YouTube Sound Library
[b]Slow Windshield Wipers[/b]: YouTube Sound Library
[b]Driving in Car Interior[/b]: YouTube Sound Library
[color=aqua][url=https://www.fontsquirrel.com/fonts/amiko][b]Amiko Regular/Bold[/b][/url][/color]: Impallari Type, licensed under the [color=aqua][url=https://www.fontsquirrel.com/license/amiko]SIL Open Font License[/url][/color]"
visible_characters = -1
percent_visible = 1.0
meta_underlined = true
tab_size = 4
text = ""
text = "Rain Heavy Quiet Interior: YouTube Sound Library
Slow Windshield Wipers: YouTube Sound Library
Driving in Car Interior: YouTube Sound Library
Amiko Regular/Bold: Impallari Type, licensed under the SIL Open Font License"
scroll_active = true
scroll_following = false
selection_enabled = false
@ -664,9 +698,9 @@ anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -74.5
margin_top = -88.0
margin_top = -60.0
margin_right = 73.5
margin_bottom = -68.0
margin_bottom = -40.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
focus_mode = 2
@ -706,6 +740,8 @@ align = 1
[connection signal="pressed" from="OptionMenu/Panel/Elements/OptCloseBtn2" to="." method="_on_OptsBtn_pressed"]
[connection signal="meta_clicked" from="CreditPopup/CreditsText" to="CreditPopup" method="_on_CreditsText_meta_clicked"]
[connection signal="pressed" from="CreditPopup/CloseBtn" to="CreditPopup" method="_on_CloseBtn_pressed"]

@ -1,4 +1,9 @@
extends PopupDialog
# handles closing the popup
func _on_CloseBtn_pressed():
self.hide()
# opens links in credits popup
func _on_CreditsText_meta_clicked(meta):
OS.shell_open(meta)

Loading…
Cancel
Save