16 lines
392 B
GDScript
16 lines
392 B
GDScript
class_name ProfileWindow extends Window
|
|
|
|
var dragging : bool = false
|
|
|
|
|
|
func _on_close_requested() -> void:
|
|
queue_free()
|
|
|
|
func _on_drag_region_gui_input(event: InputEvent) -> void:
|
|
if event is InputEventMouseButton:
|
|
if event.button_index == MOUSE_BUTTON_LEFT:
|
|
dragging = event.pressed
|
|
elif dragging and event is InputEventMouseMotion:
|
|
position += Vector2i(event.screen_relative)
|
|
|