fix game menu

This commit is contained in:
2026-06-29 23:56:37 +02:00
parent c6893b7ee8
commit 1b5b364313
5 changed files with 25 additions and 20 deletions

View File

@@ -3,7 +3,7 @@ extends Control
@onready var photo: Photo = $%Photo
@onready var panel: Panel = $%Panel
var is_closing: bool = false
func _ready() -> void:
GameState.on_photo_highlighted.connect(_on_photo_highlighted)
@@ -15,10 +15,13 @@ func _on_photo_highlighted(texture: Texture) -> void:
TweenFX.fold_in(photo)
photo.setup(texture)
var is_closing: bool = false
func _on_panel_gui_input(event: InputEvent) -> void:
func _input(event: InputEvent) -> void:
if not visible:
return
if event is InputEventMouse:
get_viewport().set_input_as_handled()
if is_closing:
return
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed: