main.gd 633 B

123456789101112131415161718192021222324252627282930313233
  1. extends Panel
  2. func _goto_scene():
  3. var s = load("res://controls.scn")
  4. var si = s.instance()
  5. get_parent().add_child(si)
  6. queue_free()
  7. func _on_system_pressed():
  8. # Will autodetect based on system, then fall back
  9. # to english if not found
  10. _goto_scene()
  11. # NOTE: Changing locale will not change the text in the controls,
  12. # The scene must be reloaded for changes to take effect.
  13. func _on_english_pressed():
  14. TranslationServer.set_locale("en")
  15. _goto_scene()
  16. func _on_spanish_pressed():
  17. TranslationServer.set_locale("es")
  18. _goto_scene()
  19. func _on_japanese_pressed():
  20. TranslationServer.set_locale("ja")
  21. _goto_scene()