r3-next/levels/debug.gd

44 lines
1,019 B
GDScript3
Raw Normal View History

2024-01-16 03:04:31 +01:00
extends Control
func _ready():
2024-01-16 13:58:51 +01:00
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
Global.debug = true
2024-01-27 17:12:30 +01:00
$"VBoxContainer/Gamepad Test".grab_focus()
2024-01-16 03:04:31 +01:00
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _input(event):
# Mouse in viewport coordinates.
2024-01-16 13:58:51 +01:00
if Input.is_action_just_pressed("ui_cancel"):
2024-01-16 03:04:31 +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
func _on_scene_selector_pressed():
get_tree().change_scene_to_file("res://levels/scene.tscn")
func _on_sound_test_pressed():
get_tree().change_scene_to_file("res://levels/soundtest.tscn")
func _on_back_pressed():
2024-01-16 13:58:51 +01:00
Global.debug = false
2024-01-16 03:04:31 +01:00
get_tree().change_scene_to_file("res://levels/tmenu.tscn")
2024-01-27 17:12:30 +01:00
func _on_gamepad_test_pressed():
get_tree().change_scene_to_file("res://levels/gamepadtest.tscn")