-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditor_mode.gd
More file actions
52 lines (51 loc) · 3.2 KB
/
editor_mode.gd
File metadata and controls
52 lines (51 loc) · 3.2 KB
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
extends PanelContainer
func _ready() -> void:
pass
func _process(_delta: float) -> void:
pass
func _gui_input(event: InputEvent) -> void:
if event is InputEventScreenDrag:
if Rect2(Vector2.ZERO, size).has_point(event.position):
add_theme_stylebox_override("panel", preload("res://button_pressed_stylebox.tres"))
else:
add_theme_stylebox_override("panel", preload("res://button_stylebox.tres"))
elif event is InputEventScreenTouch:
if event.is_pressed():
add_theme_stylebox_override("panel", preload("res://button_pressed_stylebox.tres"))
elif event.is_released():
add_theme_stylebox_override("panel", preload("res://button_stylebox.tres"))
if Rect2(Vector2.ZERO, size).has_point(event.position):
Global.mode += 1
if Global.mode == 3:
Global.mode = 0
match Global.mode:
0:
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Note".visible = true
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Note".size_flags_horizontal = SIZE_EXPAND_FILL
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Event".visible = true
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Event".size_flags_horizontal = SIZE_EXPAND_FILL
$"../../../Control/AspectRatioContainer/Lines/Note".visible = true
$"../../../Control/AspectRatioContainer/Lines/Note".size_flags_horizontal = SIZE_EXPAND_FILL
$"../../../Control/AspectRatioContainer/Lines/Event".visible = true
$"../../../Control/AspectRatioContainer/Lines/Event".size_flags_horizontal = SIZE_EXPAND_FILL
$Label.text = "音符\n事件"
1:
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Note".visible = true
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Note".size_flags_horizontal = SIZE_EXPAND_FILL
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Event".visible = false
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Event".size_flags_horizontal = SIZE_FILL
$"../../../Control/AspectRatioContainer/Lines/Note".visible = true
$"../../../Control/AspectRatioContainer/Lines/Note".size_flags_horizontal = SIZE_EXPAND_FILL
$"../../../Control/AspectRatioContainer/Lines/Event".visible = false
$"../../../Control/AspectRatioContainer/Lines/Event".size_flags_horizontal = SIZE_FILL
$Label.text = "音符"
2:
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Note".visible = false
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Note".size_flags_horizontal = SIZE_FILL
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Event".size_flags_horizontal = SIZE_EXPAND_FILL
$"../../../Control/AspectRatioContainer/ScrollContainer/HBoxContainer/Event".visible = true
$"../../../Control/AspectRatioContainer/Lines/Note".visible = false
$"../../../Control/AspectRatioContainer/Lines/Note".size_flags_horizontal = SIZE_FILL
$"../../../Control/AspectRatioContainer/Lines/Event".visible = true
$"../../../Control/AspectRatioContainer/Lines/Event".size_flags_horizontal = SIZE_EXPAND_FILL
$Label.text = "事件"