-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.gd
52 lines (42 loc) · 1.41 KB
/
main.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
extends Node
var presscontinue
var gamepadtest = load("res://gamepad.gd")
var loadgame = load("res://load.gd")
var savegame = load("res://save.gd")
# Called when the node enters the scene tree for the first time.
func _ready():
presscontinue = $Label
updatehud()
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
#OS.get_data_dir().rsplit("/", true, 7)[2]
loadgame.new(0)
#print(OS.get_processor_name())
#pass # Replace with function body.
#add_child(title)
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _init():
func _process(delta):
pass
func _input(event):
gamepadtest.new(event)
updatehud()
# Mouse in viewport coordinates.
if !Global.sk && Input.is_action_just_pressed("ui_accept") || Input.is_action_just_pressed("mclick"):
#print("Mouse Click/Unclick at: ", event.position)
_title()
func _title():
# This is like autoloading the scene, only
# it happens after already loading the main scene.
get_tree().change_scene("res://levels/ui/vmboot.tscn")
#get_tree().root.add_child(title)
#get_tree().root.remove_child(boot)
#boot.queue_free()
func updatehud():
if Global.gamepad == 0:
presscontinue.set_text(tr("TEXT_CONTINUE_KB"))
elif Global.gamepad == 1:
presscontinue.set_text(tr("TEXT_CONTINUE_US"))
elif Global.gamepad == 2:
presscontinue.set_text(tr("TEXT_CONTINUE_JA"))
elif Global.gamepad == 3:
presscontinue.set_text(tr("TEXT_CONTINUE_GEO"))