summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/misc/window_management/control.gd6
-rw-r--r--demos/misc/window_management/engine.cfg7
-rw-r--r--demos/misc/window_management/window_management.scnbin4030 -> 4268 bytes
3 files changed, 11 insertions, 2 deletions
diff --git a/demos/misc/window_management/control.gd b/demos/misc/window_management/control.gd
index 4929b1376c..6dc9282149 100644
--- a/demos/misc/window_management/control.gd
+++ b/demos/misc/window_management/control.gd
@@ -33,7 +33,6 @@ func _fixed_process(delta):
get_node("Label_Screen0_Position").set_text(str("Screen0 Position:\n",OS.get_screen_position() ) )
-
if(OS.get_screen_count() > 1):
get_node("Button_Screen0").show()
get_node("Button_Screen1").show()
@@ -63,6 +62,7 @@ func _fixed_process(delta):
get_node("Button_FixedSize").set_pressed( !OS.is_resizable() )
get_node("Button_Minimized").set_pressed( OS.is_minimized() )
get_node("Button_Maximized").set_pressed( OS.is_maximized() )
+ get_node("Button_Mouse_Grab").set_pressed( Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED )
func _ready():
@@ -113,4 +113,6 @@ func _on_Button_Maximized_pressed():
OS.set_maximized(true)
-
+func _on_Button_Mouse_Grab_pressed():
+ var observer = get_node("../Observer")
+ observer.state = observer.STATE_GRAB
diff --git a/demos/misc/window_management/engine.cfg b/demos/misc/window_management/engine.cfg
index 6ce3d51aee..c53bd45fb7 100644
--- a/demos/misc/window_management/engine.cfg
+++ b/demos/misc/window_management/engine.cfg
@@ -10,3 +10,10 @@ fullscreen=false
resizable=true
width=800
height=600
+
+[input]
+
+move_forward=[key(W)]
+move_backwards=[key(S)]
+move_left=[key(A)]
+move_right=[key(D)]
diff --git a/demos/misc/window_management/window_management.scn b/demos/misc/window_management/window_management.scn
index baf03bdfd1..40e6e64cef 100644
--- a/demos/misc/window_management/window_management.scn
+++ b/demos/misc/window_management/window_management.scn
Binary files differ