From 47d6d16267965387465460c28078a378a5bfbc62 Mon Sep 17 00:00:00 2001 From: radiohotline Date: Thu, 22 Jan 2026 16:16:25 +0300 Subject: peace and love on planet earth (added preliminary icons and windows) --- scripts/app.gd | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/app.gd (limited to 'scripts/app.gd') diff --git a/scripts/app.gd b/scripts/app.gd new file mode 100644 index 0000000..18ad260 --- /dev/null +++ b/scripts/app.gd @@ -0,0 +1,24 @@ +extends Area2D + +signal open_app(app_name: String) + +enum Apps { NOTEPAD, FOLDER } + +@export var app_name: Apps + +var _mouse_in = false + +func _ready() -> void: + mouse_entered.connect(_on_mouse_entered) + mouse_exited.connect(_on_mouse_exited) + +func _process(_delta: float) -> void: + if Input.is_action_just_pressed("mouse1") and _mouse_in: + open_app.emit(app_name) + +func _on_mouse_entered(): + _mouse_in = true + +func _on_mouse_exited(): + _mouse_in = false + -- cgit v1.3