summaryrefslogtreecommitdiff
path: root/demos/viewport/gui_in_3d
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-03 10:30:38 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-03 10:30:38 -0300
commitc7d45ec085086ab86192a7890b9622320d57b89d (patch)
tree0a764a6a2b7bded960a652c81a4b5a6815dd3c31 /demos/viewport/gui_in_3d
parentf9af57f3bdb16e015ee10b979fe18cf2195077f9 (diff)
Removed demos
they go to their own project now
Diffstat (limited to 'demos/viewport/gui_in_3d')
-rw-r--r--demos/viewport/gui_in_3d/engine.cfg5
-rw-r--r--demos/viewport/gui_in_3d/gui.scnbin2579 -> 0 bytes
-rw-r--r--demos/viewport/gui_in_3d/gui_3d.gd37
-rw-r--r--demos/viewport/gui_in_3d/gui_3d.scnbin6137 -> 0 bytes
-rw-r--r--demos/viewport/gui_in_3d/icon.pngbin3770 -> 0 bytes
5 files changed, 0 insertions, 42 deletions
diff --git a/demos/viewport/gui_in_3d/engine.cfg b/demos/viewport/gui_in_3d/engine.cfg
deleted file mode 100644
index 252e53ca33..0000000000
--- a/demos/viewport/gui_in_3d/engine.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-[application]
-
-name="GUI in 3D"
-main_scene="res://gui_3d.scn"
-icon="res://icon.png"
diff --git a/demos/viewport/gui_in_3d/gui.scn b/demos/viewport/gui_in_3d/gui.scn
deleted file mode 100644
index d7daa30340..0000000000
--- a/demos/viewport/gui_in_3d/gui.scn
+++ /dev/null
Binary files differ
diff --git a/demos/viewport/gui_in_3d/gui_3d.gd b/demos/viewport/gui_in_3d/gui_3d.gd
deleted file mode 100644
index b93c17521d..0000000000
--- a/demos/viewport/gui_in_3d/gui_3d.gd
+++ /dev/null
@@ -1,37 +0,0 @@
-
-extends Spatial
-
-# Member variables
-var prev_pos = null
-
-
-func _input(event):
- # All other (non-mouse) events
- if (not event.type in [InputEvent.MOUSE_BUTTON, InputEvent.MOUSE_MOTION, InputEvent.SCREEN_DRAG, InputEvent.SCREEN_TOUCH]):
- get_node("viewport").input(event)
-
-
-# Mouse events for Area
-func _on_area_input_event(camera, event, click_pos, click_normal, shape_idx):
- # Use click pos (click in 3d space, convert to area space)
- var pos = get_node("area").get_global_transform().affine_inverse()*click_pos
- # Convert to 2D
- pos = Vector2(pos.x, pos.y)
- # Convert to viewport coordinate system
- pos.x = (pos.x + 1.5)*100
- pos.y = (-pos.y + 0.75)*100
- # Set to event
- event.pos = pos
- event.global_pos = pos
- if (prev_pos == null):
- prev_pos = pos
- if (event.type == InputEvent.MOUSE_MOTION):
- event.relative_pos = pos - prev_pos
- prev_pos = pos
- # Send the event to the viewport
- get_node("viewport").input(event)
-
-
-func _ready():
- get_node("area/quad").get_material_override().set_texture(FixedMaterial.PARAM_DIFFUSE, get_node("viewport").get_render_target_texture())
- set_process_input(true)
diff --git a/demos/viewport/gui_in_3d/gui_3d.scn b/demos/viewport/gui_in_3d/gui_3d.scn
deleted file mode 100644
index 0541e7b142..0000000000
--- a/demos/viewport/gui_in_3d/gui_3d.scn
+++ /dev/null
Binary files differ
diff --git a/demos/viewport/gui_in_3d/icon.png b/demos/viewport/gui_in_3d/icon.png
deleted file mode 100644
index 22bdd791bb..0000000000
--- a/demos/viewport/gui_in_3d/icon.png
+++ /dev/null
Binary files differ