2015-03-22 05:46:18 +01:00
|
|
|
|
|
|
|
extends Area2D
|
|
|
|
|
2015-11-21 16:13:43 +01:00
|
|
|
|
|
|
|
# Virtual from CollisionObject2D (also available as signal)
|
2015-03-22 05:46:18 +01:00
|
|
|
func _input_event(viewport, event, shape_idx):
|
2015-11-21 16:13:43 +01:00
|
|
|
# Convert event to local coordinates
|
|
|
|
if (event.type == InputEvent.MOUSE_MOTION):
|
|
|
|
event = make_input_local(event)
|
2015-03-22 05:46:18 +01:00
|
|
|
get_node("label").set_text(str(event.pos))
|
|
|
|
|
|
|
|
|
2015-11-21 16:13:43 +01:00
|
|
|
# Virtual from CollisionObject2D (also available as signal)
|
|
|
|
func _mouse_exit():
|
|
|
|
get_node("label").set_text("")
|