summaryrefslogtreecommitdiff
path: root/demos/2d/area_input
diff options
context:
space:
mode:
Diffstat (limited to 'demos/2d/area_input')
-rw-r--r--demos/2d/area_input/box_area.pngbin1246 -> 0 bytes
-rw-r--r--demos/2d/area_input/circle_area.pngbin3030 -> 0 bytes
-rw-r--r--demos/2d/area_input/engine.cfg5
-rw-r--r--demos/2d/area_input/icon.pngbin3416 -> 0 bytes
-rw-r--r--demos/2d/area_input/input.gd15
-rw-r--r--demos/2d/area_input/input.tscn109
6 files changed, 0 insertions, 129 deletions
diff --git a/demos/2d/area_input/box_area.png b/demos/2d/area_input/box_area.png
deleted file mode 100644
index ba7c37f7de..0000000000
--- a/demos/2d/area_input/box_area.png
+++ /dev/null
Binary files differ
diff --git a/demos/2d/area_input/circle_area.png b/demos/2d/area_input/circle_area.png
deleted file mode 100644
index 3cc24c8a0c..0000000000
--- a/demos/2d/area_input/circle_area.png
+++ /dev/null
Binary files differ
diff --git a/demos/2d/area_input/engine.cfg b/demos/2d/area_input/engine.cfg
deleted file mode 100644
index ce87f39547..0000000000
--- a/demos/2d/area_input/engine.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-[application]
-
-name="Area 2D Input Events"
-main_scene="res://input.tscn"
-icon="res://icon.png"
diff --git a/demos/2d/area_input/icon.png b/demos/2d/area_input/icon.png
deleted file mode 100644
index 2f412ecf68..0000000000
--- a/demos/2d/area_input/icon.png
+++ /dev/null
Binary files differ
diff --git a/demos/2d/area_input/input.gd b/demos/2d/area_input/input.gd
deleted file mode 100644
index e9cc9f3c1d..0000000000
--- a/demos/2d/area_input/input.gd
+++ /dev/null
@@ -1,15 +0,0 @@
-
-extends Area2D
-
-
-# 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)
- get_node("label").set_text(str(event.pos))
-
-
-# Virtual from CollisionObject2D (also available as signal)
-func _mouse_exit():
- get_node("label").set_text("")
diff --git a/demos/2d/area_input/input.tscn b/demos/2d/area_input/input.tscn
deleted file mode 100644
index 81c0ed918d..0000000000
--- a/demos/2d/area_input/input.tscn
+++ /dev/null
@@ -1,109 +0,0 @@
-[gd_scene load_steps=6 format=1]
-
-[ext_resource path="res://input.gd" type="Script" id=1]
-[ext_resource path="res://box_area.png" type="Texture" id=2]
-[ext_resource path="res://circle_area.png" type="Texture" id=3]
-
-[sub_resource type="RectangleShape2D" id=1]
-
-custom_solver_bias = 0.0
-extents = Vector2( 64, 64 )
-
-[sub_resource type="CircleShape2D" id=2]
-
-custom_solver_bias = 0.0
-radius = 64.0
-
-[node name="base" type="Node2D"]
-
-[node name="box" type="Area2D" parent="."]
-
-transform/pos = Vector2( 212, 281 )
-transform/rot = 35.4081
-input/pickable = true
-shapes/0/shape = SubResource( 1 )
-shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
-shapes/0/trigger = false
-gravity_vec = Vector2( 0, 1 )
-gravity = 98.0
-linear_damp = 0.1
-angular_damp = 1.0
-script/script = ExtResource( 1 )
-
-[node name="sprite" type="Sprite" parent="box"]
-
-texture = ExtResource( 2 )
-
-[node name="label" type="Label" parent="box"]
-
-focus/ignore_mouse = true
-focus/stop_mouse = true
-size_flags/horizontal = 2
-margin/left = -43.0
-margin/top = 71.0
-margin/right = 43.0
-margin/bottom = 84.0
-align = 1
-percent_visible = 1.0
-lines_skipped = 0
-max_lines_visible = -1
-
-[node name="shape" type="CollisionShape2D" parent="box"]
-
-shape = SubResource( 1 )
-trigger = false
-_update_shape_index = -1
-
-[node name="circle" type="Area2D" parent="."]
-
-transform/pos = Vector2( 547.877, 286.808 )
-transform/rot = -40.5985
-input/pickable = true
-shapes/0/shape = SubResource( 2 )
-shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
-shapes/0/trigger = false
-gravity_vec = Vector2( 0, 1 )
-gravity = 98.0
-linear_damp = 0.1
-angular_damp = 1.0
-script/script = ExtResource( 1 )
-
-[node name="sprite" type="Sprite" parent="circle"]
-
-texture = ExtResource( 3 )
-
-[node name="label" type="Label" parent="circle"]
-
-focus/ignore_mouse = true
-focus/stop_mouse = true
-size_flags/horizontal = 2
-margin/left = -43.0
-margin/top = 71.0
-margin/right = 43.0
-margin/bottom = 84.0
-align = 1
-percent_visible = 1.0
-lines_skipped = 0
-max_lines_visible = -1
-
-[node name="shape" type="CollisionShape2D" parent="circle"]
-
-shape = SubResource( 2 )
-trigger = false
-_update_shape_index = -1
-
-[node name="Label" type="Label" parent="."]
-
-focus/ignore_mouse = true
-focus/stop_mouse = true
-size_flags/horizontal = 2
-margin/left = 0.0
-margin/top = 0.0
-margin/right = 40.0
-margin/bottom = 13.0
-text = "This demo shows how to use a regular Area2D to get input events, and how to convert the input events to local coordinates of the node.\nUnlike controls, Input on Area2D or PhysicsBody2D nodes only works properly (with scrolling) on canvas layer 0."
-percent_visible = 1.0
-lines_skipped = 0
-max_lines_visible = -1
-
-