-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexport_ok.gd
More file actions
20 lines (19 loc) · 952 Bytes
/
export_ok.gd
File metadata and controls
20 lines (19 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
extends PanelContainer
func _ready() -> void:
pass
func _process(_delta: float) -> void:
pass
func _gui_input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
if Rect2(Vector2.ZERO, size).has_point(event.position):
add_theme_stylebox_override("panel", preload("res://ok_pressed_stylebox.tres"))
else:
add_theme_stylebox_override("panel", preload("res://ok_stylebox.tres"))
elif event is InputEventMouseButton and event.button_index == MouseButton.MOUSE_BUTTON_LEFT:
if event.is_pressed():
add_theme_stylebox_override("panel", preload("res://ok_pressed_stylebox.tres"))
elif event.is_released():
add_theme_stylebox_override("panel", preload("res://ok_stylebox.tres"))
if $"../../../../..".visible and Rect2(Vector2.ZERO, size).has_point(event.position):
$"../../../../..".visible = false
Global.export_chart($"../../HBoxContainer/Contents/Format/RPE".pressed, $"../../HBoxContainer/Contents/Path".text)