frame-of-mind/src/ui/curtain/curtain.gd

40 lines
909 B
GDScript3
Raw Normal View History

extends Panel
class_name Curtain
2025-12-15 16:57:26 +00:00
var _tween : Tween = null
func _ready() -> void:
print("curtain.gd: ready()")
2026-01-18 20:53:19 +00:00
visible = true
_check_boot.call_deferred()
func _check_boot():
self.visible = Main.normal_boot
2026-01-20 21:47:44 +00:00
## Conceals the Game Stage
2026-01-18 20:53:19 +00:00
func close() -> void:
visible = true
print("curtain.gd: show()")
2026-01-18 20:53:19 +00:00
if _tween: _tween.kill()
2025-12-15 16:57:26 +00:00
_tween = create_tween()
2026-01-18 21:06:08 +00:00
_tween.tween_property(self, "modulate", Color.WHITE, 0.7)
await _tween.finished
2026-01-20 21:47:44 +00:00
## Conceals the Game Stage
2026-01-18 21:06:08 +00:00
func black() -> void:
visible = true
print("curtain.gd: show()")
2026-01-18 21:06:08 +00:00
if _tween: _tween.kill()
_tween = create_tween()
_tween.tween_property(self, "modulate", Color.BLACK, 0.7)
2025-12-15 16:57:26 +00:00
await _tween.finished
2026-01-20 21:47:44 +00:00
## Makes the Game Stage Visible
func open() -> void:
print("curtain.gd: hide()")
2026-01-18 20:53:19 +00:00
if _tween: _tween.kill()
2025-12-15 16:57:26 +00:00
_tween = create_tween()
2026-01-18 21:06:08 +00:00
_tween.tween_property(self, "modulate", Color.TRANSPARENT, 0.7)
2025-12-15 16:57:26 +00:00
await _tween.finished
visible = false