diff options
author | Anton Yabchinskiy <arn@bestmx.ru> | 2015-07-29 23:01:36 +0300 |
---|---|---|
committer | Anton Yabchinskiy <arn@bestmx.ru> | 2015-07-29 23:01:36 +0300 |
commit | dc8df8a91a995796f0f330bf6bb6b209f6dfce08 (patch) | |
tree | 46cfe09124703b07860754d6b44e0289422e0573 /demos/misc/window_management/control.gd | |
parent | 16746f157f83d666079ba3266acec13d35b84c3f (diff) | |
parent | 922356b903061cda7591090bf19e8346c3a78cf5 (diff) |
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'demos/misc/window_management/control.gd')
-rw-r--r-- | demos/misc/window_management/control.gd | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/demos/misc/window_management/control.gd b/demos/misc/window_management/control.gd index 5eb5817619..1609dda699 100644 --- a/demos/misc/window_management/control.gd +++ b/demos/misc/window_management/control.gd @@ -1,6 +1,8 @@ extends Control +var mousepos + func _fixed_process(delta): var modetext = "Mode:\n" @@ -31,7 +33,7 @@ func _fixed_process(delta): get_node("Label_Size").set_text(str("Size:\n", OS.get_window_size() ) ) - get_node("Label_MousePosition").set_text(str("Mouse Position:\n", Input.get_mouse_pos() ) ) + get_node("Label_MousePosition").set_text(str("Mouse Position:\n", mousepos ) ) get_node("Label_Screen_Count").set_text( str("Screen_Count:\n", OS.get_screen_count() ) ) @@ -126,6 +128,12 @@ func check_wm_api(): func _ready(): if( check_wm_api() ): set_fixed_process(true) + set_process_input(true) + + +func _input(ev): + if (ev.type==InputEvent.MOUSE_MOTION): + mousepos = ev.pos func _on_Button_MoveTo_pressed(): |