Sync all demos with current master format

This commit is contained in:
Rémi Verschelde
2017-10-30 12:38:39 +01:00
parent dd37c3aa51
commit f8ca6d0a4d
312 changed files with 1978 additions and 655 deletions

Binary file not shown.

View File

@@ -0,0 +1,256 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://drag_drop_script.gd" type="Script" id=1]
[node name="Control" type="Control"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
__meta__ = {
"__editor_plugin_screen__": "2D"
}
[node name="ColorPickerButton0" type="ColorPickerButton" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 64.0
margin_top = 64.0
margin_right = 160.0
margin_bottom = 128.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
color = Color( 0.671032, 0.605183, 0, 1 )
edit_alpha = true
script = ExtResource( 1 )
[node name="ColorPickerButton1" type="ColorPickerButton" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 224.0
margin_top = 64.0
margin_right = 320.0
margin_bottom = 128.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
color = Color( 0, 0.797347, 0.741037, 1 )
edit_alpha = true
script = ExtResource( 1 )
[node name="ColorPickerButton2" type="ColorPickerButton" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 384.0
margin_top = 64.0
margin_right = 480.0
margin_bottom = 128.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
color = Color( 0.443924, 0, 0.632923, 1 )
edit_alpha = true
script = ExtResource( 1 )
[node name="ColorPickerButton3" type="ColorPickerButton" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 64.0
margin_top = 160.0
margin_right = 160.0
margin_bottom = 224.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
color = Color( 1, 1, 1, 1 )
edit_alpha = true
script = ExtResource( 1 )
[node name="ColorPickerButton4" type="ColorPickerButton" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 224.0
margin_top = 160.0
margin_right = 320.0
margin_bottom = 224.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
color = Color( 1, 0.933842, 0, 1 )
edit_alpha = true
script = ExtResource( 1 )
[node name="ColorPickerButton5" type="ColorPickerButton" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 384.0
margin_top = 160.0
margin_right = 480.0
margin_bottom = 224.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
color = Color( 0.287293, 0.886362, 0.122933, 1 )
edit_alpha = true
script = ExtResource( 1 )
[node name="ColorPickerButton6" type="ColorPickerButton" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 64.0
margin_top = 256.0
margin_right = 160.0
margin_bottom = 320.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
color = Color( 0.908461, 0, 0.88789, 1 )
edit_alpha = true
script = ExtResource( 1 )
[node name="ColorPickerButton7" type="ColorPickerButton" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 224.0
margin_top = 256.0
margin_right = 320.0
margin_bottom = 320.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
color = Color( 0, 0.283703, 0, 1 )
edit_alpha = true
script = ExtResource( 1 )
[node name="ColorPickerButton8" type="ColorPickerButton" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 384.0
margin_top = 256.0
margin_right = 480.0
margin_bottom = 320.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
color = Color( 0, 0, 0.178211, 1 )
edit_alpha = true
script = ExtResource( 1 )
[node name="Label" type="Label" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 10.0
margin_top = 11.0
margin_right = 470.0
margin_bottom = 24.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
text = "Drag colors from button to button, or change button colors and drag them again."
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

View File

@@ -21,3 +21,4 @@ process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,8 +1,8 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
@@ -11,11 +11,8 @@ config_version=3
[application]
config/name="Drag & Drop (GUI)"
run/main_scene="res://drag_and_drop.scn"
run/main_scene="res://drag_and_drop.tscn"
config/icon="res://icon.png"
icon="res://icon.png"
main_scene="res://drag_and_drop.scn"
name="Drag & Drop (GUI)"
[gdnative]

View File

@@ -1,8 +1,8 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters

View File

@@ -21,3 +21,4 @@ process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,8 +1,8 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters

View File

@@ -40,8 +40,11 @@ _sections_unfolded = [ "Font", "Settings" ]
[node name="Panel" type="Panel"]
anchor_right = 1
anchor_bottom = 1
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
@@ -53,12 +56,15 @@ __meta__ = {
[node name="RichTextLabel" type="RichTextLabel" parent="."]
anchor_right = 1
anchor_bottom = 1
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 = 55.0
margin_bottom = 44.0
margin_right = -48.0
margin_bottom = -62.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
@@ -78,6 +84,8 @@ Left alignment is default,[center]but center alignment is supported,[/center][ri
For full reference [color=aqua][url=https://github.com/godotengine/godot/wiki/richtext_bbcode]check the wiki.[/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"]

View File

@@ -21,3 +21,4 @@ process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,9 +1,8 @@
extends Panel
func _on_back_pressed():
var s = load("res://main.scn")
var si = s.instance()
var scene = load("res://main.tscn")
var si = scene.instance()
get_parent().add_child(si)
queue_free()

Binary file not shown.

View File

@@ -0,0 +1,107 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://controls.gd" type="Script" id=1]
[ext_resource path="res://flag_uk.png" type="Texture" id=2]
[node name="Panel" type="Panel"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
script = ExtResource( 1 )
__meta__ = {
"__editor_plugin_screen__": "2D"
}
[node name="Label" type="Label" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 175.0
margin_top = 118.0
margin_right = 328.0
margin_bottom = 132.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
text = "KEY_HELLO"
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="Button" type="Button" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 166.0
margin_top = 178.0
margin_right = 335.0
margin_bottom = 199.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "KEY_PUSH"
flat = false
[node name="TextureFrame" type="TextureRect" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 377.0
margin_top = 118.0
margin_right = 505.0
margin_bottom = 203.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 2 )
stretch_mode = 0
[node name="back" type="Button" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 26.0
margin_top = 20.0
margin_right = 150.0
margin_bottom = 44.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "<- back"
flat = false
[connection signal="pressed" from="back" to="." method="_on_back_pressed"]

View File

@@ -21,3 +21,4 @@ process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -21,3 +21,4 @@ process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -21,3 +21,4 @@ process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -21,3 +21,4 @@ process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,19 +1,14 @@
extends Panel
func _on_english_pressed():
TranslationServer.set_locale("en")
func _on_spanish_pressed():
TranslationServer.set_locale("es")
func _on_japanese_pressed():
TranslationServer.set_locale("ja")
func _on_play_pressed():
get_node("audio").play()

Binary file not shown.

218
gui/translation/main.tscn Normal file
View File

@@ -0,0 +1,218 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://main.gd" type="Script" id=1]
[ext_resource path="res://font/droid_sans.tres" type="DynamicFont" id=2]
[ext_resource path="res://speaker.png" type="Texture" id=3]
[ext_resource path="res://flag_uk.png" type="Texture" id=4]
[ext_resource path="res://hello_en.wav" type="AudioStream" id=5]
[node name="Panel" type="Panel"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
script = ExtResource( 1 )
__meta__ = {
"__editor_plugin_screen__": "2D"
}
[node name="english" type="Button" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 32.0
margin_top = 64.0
margin_right = 192.0
margin_bottom = 88.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Use English"
flat = false
[node name="spanish" type="Button" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 32.0
margin_top = 112.0
margin_right = 192.0
margin_bottom = 136.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Use Spanish"
flat = false
[node name="japanese" type="Button" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 32.0
margin_top = 160.0
margin_right = 192.0
margin_bottom = 184.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Use Japanese"
flat = false
[node name="description" type="Label" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 243.0
margin_top = 42.0
margin_right = 808.0
margin_bottom = 312.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
custom_fonts/font = ExtResource( 2 )
text = "This is a demo of how a game can be internationalized.
Translations are created in a CSV file and then imported into Godot.
Using a TTF/OTF font with CJK is required for this demo to run. One is provided
in the font/ folder for your games.
Godot allows internationalized text to change automatically when locale is
modified. Resources can also be set internationalized alternatives and replaced
automatically on locale change."
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "custom_fonts" ]
[node name="HSeparator" type="HSeparator" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 33.0
margin_top = 330.0
margin_right = 1001.0
margin_bottom = 370.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 1
size_flags_vertical = 1
[node name="label" type="Label" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 246.0
margin_top = 381.0
margin_right = 324.0
margin_bottom = 400.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 1
size_flags_vertical = 0
custom_fonts/font = ExtResource( 2 )
text = "KEY_HELLO"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "custom_fonts" ]
[node name="play" type="Button" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 243.0
margin_top = 442.0
margin_right = 475.0
margin_bottom = 467.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 1
size_flags_vertical = 1
custom_fonts/font = ExtResource( 2 )
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "KEY_PUSH"
icon = ExtResource( 3 )
flat = false
_sections_unfolded = [ "custom_fonts" ]
[node name="TextureRect" type="TextureRect" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 85.0
margin_top = 382.0
margin_right = 213.0
margin_bottom = 467.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 1
size_flags_vertical = 1
texture = ExtResource( 4 )
stretch_mode = 0
[node name="audio" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )
volume_db = 0.0
autoplay = false
mix_target = 0
bus = "Master"
[connection signal="pressed" from="english" to="." method="_on_english_pressed"]
[connection signal="pressed" from="spanish" to="." method="_on_spanish_pressed"]
[connection signal="pressed" from="japanese" to="." method="_on_japanese_pressed"]
[connection signal="pressed" from="play" to="." method="_on_play_pressed"]

View File

@@ -1,8 +1,8 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
@@ -11,11 +11,8 @@ config_version=3
[application]
config/name="Translation Demo"
run/main_scene="res://main.scn"
run/main_scene="res://main.tscn"
config/icon="res://icon.png"
name="Translation Demo"
main_scene="res://main.scn"
icon="res://icon.png"
[gdnative]

View File

@@ -21,3 +21,4 @@ process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -9,3 +9,4 @@ files=[ "res://text.en.translation", "res://text.es.translation", "res://text.ja
[params]
compress=true
delimiter=0