khanat-client/scenes/interfaces/windows/window.gd
2021-01-21 22:03:44 +01:00

15 lines
477 B
GDScript

extends WindowDialog
var old_mouse_position = Vector2( 0, 0 )
func _on_stats_window_gui_input(event):
if event is InputEventMouseButton and event.button_index == BUTTON_LEFT and Input.is_mouse_button_pressed( BUTTON_LEFT ):
self.old_mouse_position = event.position
if event is InputEventMouseMotion and Input.is_mouse_button_pressed( BUTTON_LEFT ):
var delta = self.old_mouse_position - event.position
self.set_position( self.get_position() - delta )