Files
godot-demo-projects/gui/rich_text_bbcode/rich_text_bbcode.tscn
2018-01-16 17:46:10 +02:00

96 lines
3.0 KiB
Plaintext

[gd_scene load_steps=10 format=2]
[ext_resource path="res://rich_text_bbcode.gd" type="Script" id=1]
[ext_resource path="res://Titillium-BoldItalic.otf" type="DynamicFontData" id=2]
[ext_resource path="res://Titillium-RegularItalic.otf" type="DynamicFontData" id=3]
[ext_resource path="res://Titillium-Bold.otf" type="DynamicFontData" id=4]
[ext_resource path="res://Titillium-Regular.otf" type="DynamicFontData" id=5]
[sub_resource type="DynamicFont" id=1]
size = 20
use_mipmaps = false
use_filter = false
font_data = ExtResource( 2 )
_sections_unfolded = [ "Font", "Settings" ]
[sub_resource type="DynamicFont" id=2]
size = 20
use_mipmaps = false
use_filter = false
font_data = ExtResource( 3 )
_sections_unfolded = [ "Font", "Settings" ]
[sub_resource type="DynamicFont" id=3]
size = 20
use_mipmaps = false
use_filter = false
font_data = ExtResource( 4 )
_sections_unfolded = [ "Font", "Settings" ]
[sub_resource type="DynamicFont" id=4]
size = 20
use_mipmaps = false
use_filter = false
font_data = ExtResource( 5 )
_sections_unfolded = [ "Font", "Settings" ]
[node name="Panel" type="Panel" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 2
script = ExtResource( 1 )
__meta__ = {
"__editor_plugin_screen__": "2D"
}
[node name="RichTextLabel" type="RichTextLabel" parent="." index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 49.0
margin_top = 55.0
margin_right = -48.0
margin_bottom = -62.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 2
custom_fonts/bold_italics_font = SubResource( 1 )
custom_fonts/italics_font = SubResource( 2 )
custom_fonts/bold_font = SubResource( 3 )
custom_fonts/normal_font = SubResource( 4 )
bbcode_enabled = true
bbcode_text = "[b][u]Rich Text Test[/u][/b]
RichTextLabel is a flexible way of adding text to your game, with support for [i]italics[/i], [b]bold[/b] and [i][b]both[/b][/i]. [u]Underline[/u] works too.
It is also possible to include [img]res://unicorn_icon.png[/img] custom images, as well as [color=aqua][url=http://www.google.com]Custom URLs[/url][/color].
Left alignment is default,[center]but center alignment is supported,[/center][right]as well as right alignment.[/right]
[fill]Fill alignment is also supported, and allows writing very long text that will end up fitting the horizontal space entirely with words of joy.[/fill]
For full reference [color=aqua][url=http://docs.godotengine.org/en/latest/learning/features/gui/bbcode_in_richtextlabel.html]check the documentation.[/url][/color]
"
visible_characters = -1
percent_visible = 1.0
override_selected_font_color = false
_sections_unfolded = [ "BBCode", "custom_fonts" ]
[connection signal="meta_clicked" from="RichTextLabel" to="." method="_on_RichTextLabel_meta_clicked"]