diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2015-12-09 08:38:23 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2015-12-09 08:38:23 +0100 |
commit | 8639cecf4cedd56452b47503be19c44b304cd02f (patch) | |
tree | e2a795da15e40c7d9d5b82e33378f8dbf0eaf67a /demos/gui/translation/main.gd | |
parent | efbb834936fdc9da9789ad37c9cc61e0b90cda95 (diff) |
Improve code formatting and update to 2.0
The scripts were streamlined using more or less the following conventions:
- space after a comma in lists of arguments
- space around weak operators (+, -), no space around strong operators (*, /)
- space after a comment start (#)
- removed trailing spaces or tabs, apart from those that delimit the function indentation level (those could be removed too but since they are added automatically by the editor when typing code, keeping them for now)
- function blocks separate by two newlines
The scene files were resaved with the (current) 2.0 format, and some scenes that were in XML format were converted to SCN, to be consistent across all demos.
Diffstat (limited to 'demos/gui/translation/main.gd')
-rw-r--r-- | demos/gui/translation/main.gd | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/demos/gui/translation/main.gd b/demos/gui/translation/main.gd index bf3c0c0840..9b188cd588 100644 --- a/demos/gui/translation/main.gd +++ b/demos/gui/translation/main.gd @@ -1,31 +1,21 @@ extends Panel -# member variables here, example: -# var a=2 -# var b="textvar" - -func _ready(): - # Initialization here - pass - - func _goto_scene(): var s = load("res://controls.scn") var si = s.instance() get_parent().add_child(si) queue_free() - pass func _on_system_pressed(): - #will autodetect based on system, then fall back - #to english if not found + # will autodetect based on system, then fall back + # to english if not found _goto_scene() -#NOTE: Changling locale will not change the text in the controls, -# The scene must be reloaded for changes to take effect. +# NOTE: Changing locale will not change the text in the controls, +# The scene must be reloaded for changes to take effect. func _on_english_pressed(): TranslationServer.set_locale("en") |