mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 05:20:06 +01:00
This leads to code that is easier to understand and runs faster thanks to GDScript's typed instructions. The untyped declaration warning is now enabled on all projects where type hints were added. All projects currently run without any untyped declration warnings. Dodge the Creeps and Squash the Creeps demos intentionally don't use type hints to match the documentation, where type hints haven't been adopted yet (given its beginner focus).
13 lines
335 B
GDScript
13 lines
335 B
GDScript
extends Control
|
|
|
|
func _on_RichTextLabel_meta_clicked(meta: Variant) -> void:
|
|
var err := OS.shell_open(str(meta))
|
|
if err == OK:
|
|
print("Opened link '%s' successfully!" % str(meta))
|
|
else:
|
|
print("Failed opening the link '%s'!" % str(meta))
|
|
|
|
|
|
func _on_pause_toggled(button_pressed: bool) -> void:
|
|
get_tree().paused = button_pressed
|