improve ui and bug fix

This commit is contained in:
2026-06-02 00:05:37 +02:00
parent 6c4f659fd0
commit 1037d1343d
13 changed files with 262 additions and 19 deletions

View File

@@ -0,0 +1,26 @@
extends Control
@onready var photo_texture: TextureRect = $%PhotoTexture
func _ready() -> void:
GameState.on_photo_taken_prepare.connect(_hide_photo_taken)
GameState.on_photo_taken_finished.connect(_show_photo_taken)
CollectionManager.on_photo_saved.connect(_set_photo_taken)
func _hide_photo_taken() -> void:
hide()
func _set_photo_taken(file_path) -> void:
var image = Image.load_from_file(file_path)
if image:
var texture = ImageTexture.create_from_image(image)
photo_texture.texture = texture
func _show_photo_taken() -> void:
scale = Vector2(1,1)
modulate.a = 1.0
rotation_degrees = 0.0
show()
var tween = TweenFX.explode(self, 5, 3)
await tween.finished
hide()