diff options
| author | radiohotline <radiohotline@disroot.org> | 2026-01-22 16:16:25 +0300 |
|---|---|---|
| committer | radiohotline <radiohotline@disroot.org> | 2026-01-22 16:16:25 +0300 |
| commit | 47d6d16267965387465460c28078a378a5bfbc62 (patch) | |
| tree | b6baad3552287a168cafcd8bd284666d7c53a3d7 /scripts/window.gd | |
| parent | 9ee544bd13f358d39fd549d4127a96073c86637e (diff) | |
peace and love on planet earth (added preliminary icons and windows)
Diffstat (limited to 'scripts/window.gd')
| -rw-r--r-- | scripts/window.gd | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/window.gd b/scripts/window.gd new file mode 100644 index 0000000..75f29a7 --- /dev/null +++ b/scripts/window.gd @@ -0,0 +1,22 @@ +extends Area2D + +var _mouse_in = false +@onready var window = $Window + +func _ready() -> void: + mouse_entered.connect(_on_mouse_entered) + mouse_exited.connect(_on_mouse_exited) + window.visible = false + +func _process(_delta: float) -> void: + if Input.is_action_just_pressed("mouse1") and _mouse_in: + pass + +func _on_mouse_entered(): + _mouse_in = true + +func _on_mouse_exited(): + _mouse_in = false + +func _on_notepad_icon_open_app(app_name: Variant) -> void: + window.visible = !window.visible |
