mirror of
https://port.numenaute.org/aleajactaest/khanat-client.git
synced 2024-11-09 08:49:05 +00:00
15 lines
477 B
GDScript
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 )
|
|
|
|
|