mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
16 lines
375 B
GDScript
16 lines
375 B
GDScript
extends Control
|
|
|
|
var button_count : int = 0
|
|
|
|
|
|
func _input(event):
|
|
if event is InputEventMouseMotion:
|
|
# Move our cursor
|
|
var mouse_motion : InputEventMouseMotion = event
|
|
$Cursor.position = mouse_motion.position - Vector2(16, 16)
|
|
|
|
|
|
func _on_button_pressed():
|
|
button_count = button_count + 1
|
|
$CountLabel.text = "The button has been pressed %d times!" % [ button_count ]
|