mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 07:50:22 +01:00
Update Multitouch View demo for Godot 4.1 (#960)
This commit is contained in:
committed by
GitHub
parent
1113bafac4
commit
ad2cdfebd4
@@ -2,7 +2,7 @@ extends Node2D
|
||||
|
||||
func _process(_delta):
|
||||
# Keep redrawing on every frame.
|
||||
update()
|
||||
queue_redraw()
|
||||
|
||||
|
||||
func _draw():
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bhi7m0klu2kgy"]
|
||||
|
||||
[ext_resource path="res://Main.gd" type="Script" id=1]
|
||||
[ext_resource type="Script" path="res://Main.gd" id="1"]
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
script = ExtResource("1")
|
||||
|
||||
@@ -13,8 +13,8 @@ func _unhandled_input(event):
|
||||
state[event.index] = event.position
|
||||
else: # Up.
|
||||
state.erase(event.index)
|
||||
get_tree().set_input_as_handled()
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
elif event is InputEventScreenDrag: # Movement.
|
||||
state[event.index] = event.position
|
||||
get_tree().set_input_as_handled()
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
@@ -6,15 +6,16 @@
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Multitouch View"
|
||||
config/description="Simple debugger for multitouch input. Shows red dots everywhere you press."
|
||||
run/main_scene="res://Main.tscn"
|
||||
config/icon="res://icon.webp"
|
||||
config/tags=PackedStringArray("demo", "input", "mobile", "official")
|
||||
run/main_scene="res://Main.tscn"
|
||||
config/features=PackedStringArray("4.1")
|
||||
config/icon="res://icon.webp"
|
||||
|
||||
[autoload]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user