diff options
Diffstat (limited to 'demos/2d/area_input/input.gd')
-rw-r--r-- | demos/2d/area_input/input.gd | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/demos/2d/area_input/input.gd b/demos/2d/area_input/input.gd index 3f719fc853..e9cc9f3c1d 100644 --- a/demos/2d/area_input/input.gd +++ b/demos/2d/area_input/input.gd @@ -1,16 +1,15 @@ extends Area2D -#virtual from CollisionObject2D (also available as signal) + +# Virtual from CollisionObject2D (also available as signal) func _input_event(viewport, event, shape_idx): - #convert event to local coordinates - if (event.type==InputEvent.MOUSE_MOTION): - event = make_input_local( event ) + # Convert event to local coordinates + if (event.type == InputEvent.MOUSE_MOTION): + event = make_input_local(event) get_node("label").set_text(str(event.pos)) - -#virtual from CollisionObject2D (also available as signal) -func _mouse_exit(): - get_node("label").set_text("") - +# Virtual from CollisionObject2D (also available as signal) +func _mouse_exit(): + get_node("label").set_text("") |