Jelajahi Sumber

GUI demos converted to 3.0

Juan Linietsky 8 tahun lalu
induk
melakukan
4593bdcc64
74 mengubah file dengan 813 tambahan dan 158 penghapusan
  1. 88 143
      2d/particles/particles.tscn
  2. 11 11
      2d/screen_space_shaders/screen_shaders.tscn
  3. 5 4
      2d/screen_space_shaders/screen_shaders.tscn~
  4. TEMPAT SAMPAH
      gui/drag_and_drop/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
  5. TEMPAT SAMPAH
      gui/drag_and_drop/drag_and_drop.scn
  6. 20 0
      gui/drag_and_drop/drag_drop_script.gd
  7. TEMPAT SAMPAH
      gui/drag_and_drop/icon.png
  8. 23 0
      gui/drag_and_drop/icon.png.import
  9. 6 0
      gui/drag_and_drop/project.godot
  10. TEMPAT SAMPAH
      gui/input_mapping/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
  11. 56 0
      gui/input_mapping/controls.gd
  12. TEMPAT SAMPAH
      gui/input_mapping/controls.scn
  13. TEMPAT SAMPAH
      gui/input_mapping/icon.png
  14. 23 0
      gui/input_mapping/icon.png.import
  15. 19 0
      gui/input_mapping/project.godot
  16. TEMPAT SAMPAH
      gui/rich_text_bbcode/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
  17. TEMPAT SAMPAH
      gui/rich_text_bbcode/.import/unicorn_icon.png-7e6ed0493ce9bae1105057e782fcd0de.stex
  18. 155 0
      gui/rich_text_bbcode/SIL Open Font License.txt
  19. TEMPAT SAMPAH
      gui/rich_text_bbcode/Titillium-Bold.otf
  20. TEMPAT SAMPAH
      gui/rich_text_bbcode/Titillium-BoldItalic.otf
  21. TEMPAT SAMPAH
      gui/rich_text_bbcode/Titillium-Regular.otf
  22. TEMPAT SAMPAH
      gui/rich_text_bbcode/Titillium-RegularItalic.otf
  23. TEMPAT SAMPAH
      gui/rich_text_bbcode/icon.png
  24. 23 0
      gui/rich_text_bbcode/icon.png.import
  25. 10 0
      gui/rich_text_bbcode/project.godot
  26. 6 0
      gui/rich_text_bbcode/rich_text_bbcode.gd
  27. 85 0
      gui/rich_text_bbcode/rich_text_bbcode.tscn
  28. TEMPAT SAMPAH
      gui/rich_text_bbcode/unicorn_icon.png
  29. 23 0
      gui/rich_text_bbcode/unicorn_icon.png.import
  30. TEMPAT SAMPAH
      gui/translation/.import/flag_japan.png-e7284e6af3de26ab9c66cac9c4062038.stex
  31. TEMPAT SAMPAH
      gui/translation/.import/flag_spain.png-fd2012b4e19487cfc4923df0c268553f.stex
  32. TEMPAT SAMPAH
      gui/translation/.import/flag_uk.png-eb8a2b26ac36f4d0cf0d7345e577ec2c.stex
  33. TEMPAT SAMPAH
      gui/translation/.import/hello_en.wav-27ed59f2d75c1ba813ab0abd069b6758.sample
  34. TEMPAT SAMPAH
      gui/translation/.import/hello_es.wav-64fe245556f8642a1881ae257bd123f2.sample
  35. TEMPAT SAMPAH
      gui/translation/.import/hello_jp.wav-c31fbd7870b4b969789cb01f208809ac.sample
  36. TEMPAT SAMPAH
      gui/translation/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
  37. TEMPAT SAMPAH
      gui/translation/.import/speaker.png-045bf6684b83b55b088824f14e175d16.stex
  38. 13 0
      gui/translation/LICENSE.DroidSans.txt
  39. 9 0
      gui/translation/controls.gd
  40. TEMPAT SAMPAH
      gui/translation/controls.scn
  41. TEMPAT SAMPAH
      gui/translation/flag_japan.png
  42. 23 0
      gui/translation/flag_japan.png.import
  43. TEMPAT SAMPAH
      gui/translation/flag_spain.png
  44. 23 0
      gui/translation/flag_spain.png.import
  45. TEMPAT SAMPAH
      gui/translation/flag_uk.png
  46. 23 0
      gui/translation/flag_uk.png.import
  47. TEMPAT SAMPAH
      gui/translation/font/DroidSans.ttf
  48. TEMPAT SAMPAH
      gui/translation/font/DroidSansArabic.ttf
  49. TEMPAT SAMPAH
      gui/translation/font/DroidSansFallback.ttf
  50. TEMPAT SAMPAH
      gui/translation/font/DroidSansHebrew.ttf
  51. TEMPAT SAMPAH
      gui/translation/font/DroidSansJapanese.ttf
  52. TEMPAT SAMPAH
      gui/translation/font/DroidSansThai.ttf
  53. 22 0
      gui/translation/font/droid_sans.tres
  54. TEMPAT SAMPAH
      gui/translation/hello_en.wav
  55. 16 0
      gui/translation/hello_en.wav.import
  56. TEMPAT SAMPAH
      gui/translation/hello_es.wav
  57. 16 0
      gui/translation/hello_es.wav.import
  58. TEMPAT SAMPAH
      gui/translation/hello_jp.wav
  59. 16 0
      gui/translation/hello_jp.wav.import
  60. TEMPAT SAMPAH
      gui/translation/icon.png
  61. 23 0
      gui/translation/icon.png.import
  62. 19 0
      gui/translation/main.gd
  63. TEMPAT SAMPAH
      gui/translation/main.scn
  64. TEMPAT SAMPAH
      gui/translation/noto.fnt
  65. 20 0
      gui/translation/project.godot
  66. TEMPAT SAMPAH
      gui/translation/speaker.png
  67. 23 0
      gui/translation/speaker.png.import
  68. 3 0
      gui/translation/text.csv
  69. 11 0
      gui/translation/text.csv.import
  70. TEMPAT SAMPAH
      gui/translation/text.en.translation
  71. TEMPAT SAMPAH
      gui/translation/text.es.translation
  72. TEMPAT SAMPAH
      gui/translation/text.ja.translation
  73. TEMPAT SAMPAH
      old/gui/drag_and_drop/drag_and_drop.scn
  74. TEMPAT SAMPAH
      old/gui/translation/main.scn

File diff ditekan karena terlalu besar
+ 88 - 143
2d/particles/particles.tscn


+ 11 - 11
2d/screen_space_shaders/screen_shaders.tscn

@@ -24,7 +24,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=2]
 
-shader/shader = SubResource( 1 )
+shader = SubResource( 1 )
 shader_param/vignette = ExtResource( 6 )
 _sections_unfolded = [ "shader", "shader_param" ]
 
@@ -41,7 +41,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=4]
 
-shader/shader = SubResource( 3 )
+shader = SubResource( 3 )
 shader_param/amount = 4.0
 _sections_unfolded = [ "shader", "shader_param" ]
 
@@ -62,7 +62,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=6]
 
-shader/shader = SubResource( 5 )
+shader = SubResource( 5 )
 shader_param/size_x = null
 shader_param/size_y = null
 _sections_unfolded = [ "shader" ]
@@ -86,7 +86,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=8]
 
-shader/shader = SubResource( 7 )
+shader = SubResource( 7 )
 shader_param/rotation = null
 _sections_unfolded = [ "shader" ]
 
@@ -109,7 +109,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=10]
 
-shader/shader = SubResource( 9 )
+shader = SubResource( 9 )
 shader_param/base = Color( 0.54451, 0.408353, 0.403137, 1 )
 _sections_unfolded = [ "shader", "shader_param" ]
 
@@ -127,7 +127,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=12]
 
-shader/shader = SubResource( 11 )
+shader = SubResource( 11 )
 _sections_unfolded = [ "shader" ]
 
 [sub_resource type="Shader" id=13]
@@ -144,7 +144,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=14]
 
-shader/shader = SubResource( 13 )
+shader = SubResource( 13 )
 _sections_unfolded = [ "shader" ]
 
 [sub_resource type="Shader" id=15]
@@ -159,7 +159,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=16]
 
-shader/shader = SubResource( 15 )
+shader = SubResource( 15 )
 _sections_unfolded = [ "shader" ]
 
 [sub_resource type="Shader" id=17]
@@ -184,7 +184,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=18]
 
-shader/shader = SubResource( 17 )
+shader = SubResource( 17 )
 shader_param/brightness = null
 shader_param/contrast = null
 shader_param/saturation = null
@@ -211,7 +211,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=20]
 
-shader/shader = SubResource( 19 )
+shader = SubResource( 19 )
 shader_param/frequency = null
 shader_param/depth = null
 _sections_unfolded = [ "shader" ]
@@ -257,7 +257,7 @@ void fragment() {
 
 [sub_resource type="ShaderMaterial" id=22]
 
-shader/shader = SubResource( 21 )
+shader = SubResource( 21 )
 shader_param/base = Color( 0.450274, 0.361255, 0.335059, 1 )
 shader_param/grain_strength = 0.3
 shader_param/fps = 12

+ 5 - 4
2d/screen_space_shaders/screen_shaders.tscn~

@@ -259,10 +259,10 @@ void fragment() {
 
 shader/shader = SubResource( 21 )
 shader_param/base = Color( 0.450274, 0.361255, 0.335059, 1 )
-shader_param/grain_strength = null
-shader_param/fps = null
-shader_param/stretch = null
-shader_param/flashing = null
+shader_param/grain_strength = 0.3
+shader_param/fps = 12
+shader_param/stretch = 0.5
+shader_param/flashing = 0.01
 shader_param/grain = ExtResource( 8 )
 shader_param/vignette = ExtResource( 6 )
 _sections_unfolded = [ "shader", "shader_param" ]
@@ -510,6 +510,7 @@ _sections_unfolded = [ "Material" ]
 
 [node name="old_film" type="TextureRect" parent="effects"]
 
+visible = false
 material = SubResource( 22 )
 anchor_right = 1
 anchor_bottom = 1

TEMPAT SAMPAH
gui/drag_and_drop/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex


TEMPAT SAMPAH
gui/drag_and_drop/drag_and_drop.scn


+ 20 - 0
gui/drag_and_drop/drag_drop_script.gd

@@ -0,0 +1,20 @@
+
+extends ColorPickerButton
+
+
+func get_drag_data(pos):
+	# Use another colorpicker as drag preview
+	var cpb = ColorPickerButton.new()
+	cpb.color = color
+	cpb.rect_size = Vector2(50, 50)
+	set_drag_preview(cpb)
+	# Return color as drag data
+	return color
+
+
+func can_drop_data(pos, data):
+	return typeof(data) == TYPE_COLOR
+
+
+func drop_data(pos, data):
+	color=data

TEMPAT SAMPAH
gui/drag_and_drop/icon.png


+ 23 - 0
gui/drag_and_drop/icon.png.import

@@ -0,0 +1,23 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true

+ 6 - 0
gui/drag_and_drop/project.godot

@@ -0,0 +1,6 @@
+[application]
+
+icon = "res://icon.png"
+main_scene = "res://drag_and_drop.scn"
+name = "Drag & Drop (GUI)"
+

TEMPAT SAMPAH
gui/input_mapping/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex


+ 56 - 0
gui/input_mapping/controls.gd

@@ -0,0 +1,56 @@
+
+extends Control
+
+# Note for the reader:
+#
+# This demo conveniently uses the same names for actions and for the container nodes
+# that hold each remapping button. This allow to get back to the button based simply
+# on the name of the corresponding action, but it might not be so simple in your project.
+#
+# A better approach for large-scale input remapping might be to do the connections between
+# buttons and wait_for_input through the code, passing as arguments both the name of the
+# action and the node, e.g.:
+# button.connect("pressed", self, "wait_for_input", [ button, action ])
+
+# Member variables
+var player_actions = [ "move_up", "move_down", "move_left", "move_right", "jump" ]
+var action # To register the action the UI is currently handling
+var button # Button node corresponding to the above action
+
+
+func wait_for_input(action_bind):
+	action = action_bind
+	# See note at the beginning of the script
+	button = get_node("bindings").get_node(action).get_node("Button")
+	get_node("contextual_help").text="Press a key to assign to the '" + action + "' action."
+	set_process_input(true)
+
+
+func _input(event):
+	# Handle the first pressed key
+	if (event is InputEventKey):
+		# Register the event as handled and stop polling
+		get_tree().set_input_as_handled()
+		set_process_input(false)
+		# Reinitialise the contextual help label
+		get_node("contextual_help").text="Click a key binding to reassign it, or press the Cancel action."
+		if (not event.is_action("ui_cancel")):
+			# Display the string corresponding to the pressed key
+			button.text=OS.get_scancode_string(event.scancode)
+			# Start by removing previously key binding(s)
+			for old_event in InputMap.get_action_list(action):
+				InputMap.action_erase_event(action, old_event)
+			# Add the new key binding
+			InputMap.action_add_event(action, event)
+
+
+func _ready():
+	# Initialise each button with the default key binding from InputMap
+	var input_event
+	for action in player_actions:
+		# We assume that the key binding that we want is the first one (0), if there are several
+		input_event = InputMap.get_action_list(action)[0]
+		# See note at the beginning of the script
+		var button = get_node("bindings").get_node(action).get_node("Button")
+		button.text=OS.get_scancode_string(input_event.scancode)
+		button.connect("pressed", self, "wait_for_input", [action])

TEMPAT SAMPAH
gui/input_mapping/controls.scn


TEMPAT SAMPAH
gui/input_mapping/icon.png


+ 23 - 0
gui/input_mapping/icon.png.import

@@ -0,0 +1,23 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true

+ 19 - 0
gui/input_mapping/project.godot

@@ -0,0 +1,19 @@
+[application]
+
+icon = "res://icon.png"
+main_scene = "res://controls.scn"
+name = "Input Mapping GUI"
+
+[display]
+
+window/height = 480
+window/width = 640
+
+[input]
+
+jump = [ InputEvent(KEY,32) ]
+move_down = [ InputEvent(KEY,16777234) ]
+move_left = [ InputEvent(KEY,16777231) ]
+move_right = [ InputEvent(KEY,16777233) ]
+move_up = [ InputEvent(KEY,16777232) ]
+

TEMPAT SAMPAH
gui/rich_text_bbcode/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex


TEMPAT SAMPAH
gui/rich_text_bbcode/.import/unicorn_icon.png-7e6ed0493ce9bae1105057e782fcd0de.stex


+ 155 - 0
gui/rich_text_bbcode/SIL Open Font License.txt

@@ -0,0 +1,155 @@
+Copyright (c) 2008-2010, Accademia di Belle Arti di Urbino (www.campivisivi.net|[email protected]),
+with Reserved Font Name Titillium.
+
+
+N: Luca Antonucci
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Paola Bacchiocchi
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Simone Bastianelli
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Valerio Bosi
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Fabio Cecchi
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Giulia Di Grusa
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Donatella Esposito
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Giulia Giordani
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Raffaele Mariotti
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Leslie Ameto
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Elisa Mearelli
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Silvia Mengarelli
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Roberto Mezzano
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Valentina Mingucci
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Andrea Monachesi
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Manuel Pasini
+W: http://www.campivisivi.net
+D: Contributor
+
+N: David Pulga
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Luca Silvestri
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Paolo Tripodi
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Fancesco Zamboni
+W: http://www.campivisivi.net
+D: Contributor
+
+N: Giuliano Chimenti
+W: http://www.isiaurbino.it
+D: Contributor
+
+N: Francesco Piarulli
+W: http://www.isiaurbino.it
+D: Contributor
+
+N: Ivan Abbattista
+W: http://www.isiaurbino.it
+D: Contributor
+
+N: Rita Colacicco
+W: http://www.isiaurbino.it
+D: Contributor
+
+N: Paolo Mazzetti
+W: http://www.scriptype.net
+D: Contributor
+
+N: Claudio Piccinini
+W: http://www.tht.it/
+D: Contributor
+
+N: Luciano Perondi
+E: [email protected]
+W: http://www.campivisivi.net
+D: Director of progect
+
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
+
+"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
+
+5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

TEMPAT SAMPAH
gui/rich_text_bbcode/Titillium-Bold.otf


TEMPAT SAMPAH
gui/rich_text_bbcode/Titillium-BoldItalic.otf


TEMPAT SAMPAH
gui/rich_text_bbcode/Titillium-Regular.otf


TEMPAT SAMPAH
gui/rich_text_bbcode/Titillium-RegularItalic.otf


TEMPAT SAMPAH
gui/rich_text_bbcode/icon.png


+ 23 - 0
gui/rich_text_bbcode/icon.png.import

@@ -0,0 +1,23 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true

+ 10 - 0
gui/rich_text_bbcode/project.godot

@@ -0,0 +1,10 @@
+config_version=3
+[application]
+
+name="Rich Text Label (BBCode)"
+main_scene="res://rich_text_bbcode.tscn"
+icon="res://icon.png"
+
+[memory]
+
+multithread/thread_rid_pool_prealloc=60

+ 6 - 0
gui/rich_text_bbcode/rich_text_bbcode.gd

@@ -0,0 +1,6 @@
+
+extends Panel
+
+
+func _on_RichTextLabel_meta_clicked(meta):
+	OS.shell_open(meta)

+ 85 - 0
gui/rich_text_bbcode/rich_text_bbcode.tscn

@@ -0,0 +1,85 @@
+[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"]
+
+anchor_right = 1
+anchor_bottom = 1
+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="RichTextLabel" type="RichTextLabel" parent="."]
+
+anchor_right = 1
+anchor_bottom = 1
+margin_left = 49.0
+margin_top = 55.0
+margin_right = 55.0
+margin_bottom = 44.0
+mouse_filter = 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=https://github.com/godotengine/godot/wiki/richtext_bbcode]check the wiki.[/url][/color]
+"
+visible_characters = -1
+_sections_unfolded = [ "BBCode", "custom_fonts" ]
+
+[connection signal="meta_clicked" from="RichTextLabel" to="." method="_on_RichTextLabel_meta_clicked"]
+
+

TEMPAT SAMPAH
gui/rich_text_bbcode/unicorn_icon.png


+ 23 - 0
gui/rich_text_bbcode/unicorn_icon.png.import

@@ -0,0 +1,23 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/unicorn_icon.png-7e6ed0493ce9bae1105057e782fcd0de.stex"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true

TEMPAT SAMPAH
gui/translation/.import/flag_japan.png-e7284e6af3de26ab9c66cac9c4062038.stex


TEMPAT SAMPAH
gui/translation/.import/flag_spain.png-fd2012b4e19487cfc4923df0c268553f.stex


TEMPAT SAMPAH
gui/translation/.import/flag_uk.png-eb8a2b26ac36f4d0cf0d7345e577ec2c.stex


TEMPAT SAMPAH
gui/translation/.import/hello_en.wav-27ed59f2d75c1ba813ab0abd069b6758.sample


TEMPAT SAMPAH
gui/translation/.import/hello_es.wav-64fe245556f8642a1881ae257bd123f2.sample


TEMPAT SAMPAH
gui/translation/.import/hello_jp.wav-c31fbd7870b4b969789cb01f208809ac.sample


TEMPAT SAMPAH
gui/translation/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex


TEMPAT SAMPAH
gui/translation/.import/speaker.png-045bf6684b83b55b088824f14e175d16.stex


+ 13 - 0
gui/translation/LICENSE.DroidSans.txt

@@ -0,0 +1,13 @@
+Copyright (C) 2008 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+  
+     http://www.apache.org/licenses/LICENSE-2.0
+  
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.

+ 9 - 0
gui/translation/controls.gd

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

TEMPAT SAMPAH
gui/translation/controls.scn


TEMPAT SAMPAH
gui/translation/flag_japan.png


+ 23 - 0
gui/translation/flag_japan.png.import

@@ -0,0 +1,23 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/flag_japan.png-e7284e6af3de26ab9c66cac9c4062038.stex"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true

TEMPAT SAMPAH
gui/translation/flag_spain.png


+ 23 - 0
gui/translation/flag_spain.png.import

@@ -0,0 +1,23 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/flag_spain.png-fd2012b4e19487cfc4923df0c268553f.stex"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true

TEMPAT SAMPAH
gui/translation/flag_uk.png


+ 23 - 0
gui/translation/flag_uk.png.import

@@ -0,0 +1,23 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/flag_uk.png-eb8a2b26ac36f4d0cf0d7345e577ec2c.stex"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true

TEMPAT SAMPAH
gui/translation/font/DroidSans.ttf


TEMPAT SAMPAH
gui/translation/font/DroidSansArabic.ttf


TEMPAT SAMPAH
gui/translation/font/DroidSansFallback.ttf


TEMPAT SAMPAH
gui/translation/font/DroidSansHebrew.ttf


TEMPAT SAMPAH
gui/translation/font/DroidSansJapanese.ttf


TEMPAT SAMPAH
gui/translation/font/DroidSansThai.ttf


+ 22 - 0
gui/translation/font/droid_sans.tres

@@ -0,0 +1,22 @@
+[gd_resource type="DynamicFont" load_steps=7 format=2]
+
+[ext_resource path="res://font/DroidSansArabic.ttf" type="DynamicFontData" id=1]
+[ext_resource path="res://font/DroidSansFallback.ttf" type="DynamicFontData" id=2]
+[ext_resource path="res://font/DroidSansHebrew.ttf" type="DynamicFontData" id=3]
+[ext_resource path="res://font/DroidSansJapanese.ttf" type="DynamicFontData" id=4]
+[ext_resource path="res://font/DroidSansThai.ttf" type="DynamicFontData" id=5]
+[ext_resource path="res://font/DroidSans.ttf" type="DynamicFontData" id=6]
+
+[resource]
+
+size = 16
+use_mipmaps = false
+use_filter = false
+font_data = ExtResource( 6 )
+fallback/0 = ExtResource( 1 )
+fallback/1 = ExtResource( 2 )
+fallback/2 = ExtResource( 3 )
+fallback/3 = ExtResource( 4 )
+fallback/4 = ExtResource( 5 )
+_sections_unfolded = [ "Font", "Font/fallback" ]
+

TEMPAT SAMPAH
gui/translation/hello_en.wav


+ 16 - 0
gui/translation/hello_en.wav.import

@@ -0,0 +1,16 @@
+[remap]
+
+importer="wav"
+type="AudioStreamSample"
+path="res://.import/hello_en.wav-27ed59f2d75c1ba813ab0abd069b6758.sample"
+
+[params]
+
+force/8_bit=false
+force/mono=false
+force/max_rate=false
+force/max_rate_hz=44100
+edit/trim=true
+edit/normalize=true
+edit/loop=false
+compress/mode=0

TEMPAT SAMPAH
gui/translation/hello_es.wav


+ 16 - 0
gui/translation/hello_es.wav.import

@@ -0,0 +1,16 @@
+[remap]
+
+importer="wav"
+type="AudioStreamSample"
+path="res://.import/hello_es.wav-64fe245556f8642a1881ae257bd123f2.sample"
+
+[params]
+
+force/8_bit=false
+force/mono=false
+force/max_rate=false
+force/max_rate_hz=44100
+edit/trim=true
+edit/normalize=true
+edit/loop=false
+compress/mode=0

TEMPAT SAMPAH
gui/translation/hello_jp.wav


+ 16 - 0
gui/translation/hello_jp.wav.import

@@ -0,0 +1,16 @@
+[remap]
+
+importer="wav"
+type="AudioStreamSample"
+path="res://.import/hello_jp.wav-c31fbd7870b4b969789cb01f208809ac.sample"
+
+[params]
+
+force/8_bit=false
+force/mono=false
+force/max_rate=false
+force/max_rate_hz=44100
+edit/trim=true
+edit/normalize=true
+edit/loop=false
+compress/mode=0

TEMPAT SAMPAH
gui/translation/icon.png


+ 23 - 0
gui/translation/icon.png.import

@@ -0,0 +1,23 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true

+ 19 - 0
gui/translation/main.gd

@@ -0,0 +1,19 @@
+
+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()

TEMPAT SAMPAH
gui/translation/main.scn


TEMPAT SAMPAH
gui/translation/noto.fnt


+ 20 - 0
gui/translation/project.godot

@@ -0,0 +1,20 @@
+config_version=3
+config_version=null
+
+[application]
+
+name="Translation Demo"
+main_scene="res://main.scn"
+icon="res://icon.png"
+
+[locale]
+
+translation_remaps={
+"res://flag_uk.png": [ "res://flag_spain.png:es", "res://flag_japan.png:ja" ],
+"res://hello_en.wav": PoolStringArray( "res://hello_es.wav:es", "res://hello_jp.wav:ja" )
+}
+translations=PoolStringArray( "res://text.en.translation", "res://text.es.translation", "res://text.ja.translation" )
+
+[memory]
+
+multithread/thread_rid_pool_prealloc=60

TEMPAT SAMPAH
gui/translation/speaker.png


+ 23 - 0
gui/translation/speaker.png.import

@@ -0,0 +1,23 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/speaker.png-045bf6684b83b55b088824f14e175d16.stex"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true

+ 3 - 0
gui/translation/text.csv

@@ -0,0 +1,3 @@
+,en,es,ja
+KEY_HELLO,Hello!,Hola!,こんにちは
+KEY_PUSH,Push Me!,Aprétame!,押す

+ 11 - 0
gui/translation/text.csv.import

@@ -0,0 +1,11 @@
+[remap]
+
+importer="csv_translation"
+type="Translation"
+
+[gen]
+files=[ "res://text.en.translation", "res://text.es.translation", "res://text.ja.translation" ]
+
+[params]
+
+compress=true

TEMPAT SAMPAH
gui/translation/text.en.translation


TEMPAT SAMPAH
gui/translation/text.es.translation


TEMPAT SAMPAH
gui/translation/text.ja.translation


TEMPAT SAMPAH
old/gui/drag_and_drop/drag_and_drop.scn


TEMPAT SAMPAH
old/gui/translation/main.scn


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini