update game_menu
This commit was merged in pull request #40.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user