solid progress
This commit is contained in:
parent
8eb17bc565
commit
25aba0028d
28 changed files with 642 additions and 2 deletions
26
TitleBar.gd
Normal file
26
TitleBar.gd
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
extends Control
|
||||
|
||||
var following = false
|
||||
var dragging_start_position : Vector2i = Vector2i()
|
||||
|
||||
func _on_TitleBar_gui_input(event):
|
||||
if event is InputEventMouseButton:
|
||||
#print(event)
|
||||
if event.get_button_index() == 1:
|
||||
following = !following
|
||||
dragging_start_position = get_local_mouse_position()
|
||||
|
||||
func _process(_delta):
|
||||
if following:
|
||||
get_window().position = get_window().position + Vector2i(get_global_mouse_position()) - dragging_start_position
|
||||
#OS.set_window_position(OS.window_position + get_global_mouse_position() - dragging_start_position)
|
||||
|
||||
|
||||
#
|
||||
#func _on_CloseButton_pressed():
|
||||
#get_tree().quit()
|
||||
|
||||
|
||||
#func _on_MinimizeButton_pressed():
|
||||
#OS.set_window_minimized(true)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue