24 lines
454 B
GDScript3
24 lines
454 B
GDScript3
|
extends Panel
|
||
|
|
||
|
signal clicked()
|
||
|
|
||
|
export var roomName: String = "Unnamed room"
|
||
|
|
||
|
onready var roomNameLabel := $RoomName
|
||
|
|
||
|
func _ready():
|
||
|
roomNameLabel.text = roomName
|
||
|
|
||
|
func _gui_input(event: InputEvent):
|
||
|
# Left double click
|
||
|
if event is InputEventMouseButton and event.button_index == BUTTON_LEFT:
|
||
|
accept_event()
|
||
|
if event.doubleclick:
|
||
|
emit_signal("clicked")
|
||
|
else:
|
||
|
#TODO Fade in
|
||
|
pass
|
||
|
|
||
|
func _mouse_exited():
|
||
|
#TODO if faded in, fade out
|
||
|
pass
|