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