-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindow.gd
99 lines (99 loc) · 1.91 KB
/
Window.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
extends Window
#
#var text_edit:TextEdit
#var command_palette:Control
#
## Create a new Timer instance
#var timer = Timer.new()
#
#func _ready():
##text_edit = TextEdit.new()
##add_child(text_edit)
##
##command_palette = Control.new()
##add_child(command_palette)
#text_edit = $TextEdit_main
#command_palette = $Control_main
#
## Set up rich text support
##text_edit.bbcode_enabled = true
#
## Connect signals for text selection and editing
#text_edit.connect("text_selected", _on_text_selected)
#text_edit.connect("text_changed", _on_text_changed)
#text_edit.connect("focus_entered", _on_focus)
#text_edit.connect("focus_exited", _on_defocus)
#
#
## Connect signals for command palette actions
#command_palette.connect("command1", _on_command1)
#command_palette.connect("command2", _on_command2)
#command_palette.connect("command3", _on_command3)
#
#
## Add the timer as a child of the current node
#add_child(timer)
## Set the timer properties
## timer.start()
#timer.wait_time = 2.0 # 500 milliseconds
## Connect the timer's timeout signal to a function
#timer.connect("timeout", _on_Timer_timeout)
#
#func _on_Timer_timeout():
#print("Timer has timed out!")
## Optionally, restart the timer if it's not set to one-shot
## timer.start()
#
#
#
#func _on_caret_changed():
#pass
#
#func _on_focus():
#print("_on_focus")
#timer.start()
#pass
#
#func _on_defocus():
#print("magnus")
#timer.stop()
#pass
#
#
#func _on_text_selected(start: int, end: int):
## Handle text selection
## ...
#print("text selected")
#pass
#
#func _on_text_changed():
## Handle text editing
## ...
#print("text changed")
#pass
#
#func _on_command1():
## Handle command 1
## ...
#pass
#
#func _on_command2():
## Handle command 2
## ...
#pass
#
#func _on_command3():
## Handle command 3
## ...
#pass
#
#func _on_timer():
#print("hello")
#pass
#
#
#func _process(float) -> void:
## Your code here
##print("tick")
#pass
#