diff options
author | hurikhan <m4r10.5ch14ck@gmail.com> | 2015-01-22 01:14:50 +0900 |
---|---|---|
committer | hurikhan <m4r10.5ch14ck@gmail.com> | 2015-01-22 01:14:50 +0900 |
commit | 94d94a08558c83fb6e447c3e1ed858cf39c0e1ba (patch) | |
tree | 23e60f417f725b2cbec6bd0502ab231319eadbcd /demos/misc | |
parent | 6dd1a21fb7fbac03fb8343f5858c22185ca6c59e (diff) |
* fix compilation without scons experimental_wm_api=yes
* Extended the demo with an addional MouseGrab Test
Diffstat (limited to 'demos/misc')
-rw-r--r-- | demos/misc/window_management/control.gd | 6 | ||||
-rw-r--r-- | demos/misc/window_management/engine.cfg | 7 | ||||
-rw-r--r-- | demos/misc/window_management/window_management.scn | bin | 4030 -> 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 Binary files differindex baf03bdfd1..40e6e64cef 100644 --- a/demos/misc/window_management/window_management.scn +++ b/demos/misc/window_management/window_management.scn |