2024-01-16 03:05:25 +01:00
|
|
|
extends Control
|
2024-09-07 18:25:58 +02:00
|
|
|
const gamepadtest = preload("res://gamepad.gd")
|
2024-06-27 00:22:53 +02:00
|
|
|
var alsatest
|
2024-01-16 03:05:25 +01:00
|
|
|
func _ready():
|
2024-09-07 18:25:58 +02:00
|
|
|
#Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
2024-06-27 00:22:53 +02:00
|
|
|
alsatest = $VBoxContainer/ALSA
|
2024-01-16 13:58:17 +01:00
|
|
|
$"VBoxContainer/Music".grab_focus()
|
2024-06-27 00:22:53 +02:00
|
|
|
if OS.get_name() == "Linux":
|
|
|
|
alsatest.disabled = false
|
2024-01-16 03:05:25 +01:00
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(delta):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
func _input(event):
|
2024-09-07 18:25:58 +02:00
|
|
|
gamepadtest.new(event)
|
2024-01-16 03:05:25 +01:00
|
|
|
# Mouse in viewport coordinates.
|
2024-01-16 13:58:17 +01:00
|
|
|
if Input.is_action_just_pressed("ui_cancel"):
|
2024-01-16 03:05:25 +01:00
|
|
|
_on_back_pressed()
|
|
|
|
#print("Mouse Click/Unclick at: ", event.position)
|
|
|
|
# if highlighted == 1:
|
|
|
|
# _on_debug_pressed()
|
|
|
|
# if highlighted == 2:
|
|
|
|
# _on_exit_pressed()
|
|
|
|
# else:
|
|
|
|
# _on_start_pressed()
|
|
|
|
# elif Input.is_action_pressed("ui_up"):
|
|
|
|
# focus_next
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-16 13:58:17 +01:00
|
|
|
func _on_back_pressed():
|
2024-01-20 11:38:12 +01:00
|
|
|
get_tree().change_scene_to_file("res://levels/ui/tmenu.tscn")
|
2024-01-16 03:05:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-16 13:58:17 +01:00
|
|
|
func _on_music_pressed():
|
2024-01-20 11:38:12 +01:00
|
|
|
get_tree().change_scene_to_file("res://levels/ui/musictest.tscn")
|
2024-01-16 03:05:25 +01:00
|
|
|
|
|
|
|
|
2024-01-16 13:58:17 +01:00
|
|
|
func _on_sfx_pressed():
|
2024-01-20 11:38:12 +01:00
|
|
|
get_tree().change_scene_to_file("res://levels/ui/sfxtest.tscn")
|
2024-06-27 00:22:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _on_alsa_pressed() -> void:
|
|
|
|
get_tree().change_scene_to_file("res://levels/ui/alsatest.tscn")
|