aboutsummaryrefslogtreecommitdiff
path: root/main.gd
blob: c5f7d0d664b183e0d87e43cd2c345208b9f431ee (plain)
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
extends Control

var timeout: float

onready var controls_sensible_to_keyboard: Array = [
	self,
	get_node("/root/main/file_picker"),
	get_node("/root/main/confirm_action"),
]


func _init():
	Physics2DServer.set_active(false)
	PhysicsServer.set_active(false)



func _process(delta: float):
	var keyboard_height: int = OS.get_virtual_keyboard_height()
	for it in controls_sensible_to_keyboard:
		it.margin_bottom = -keyboard_height
	
	# @DAM Debug information.
#	$debug.text = "%s" % Engine.get_frames_per_second()
#	$debug.text = "%s" % timeout
	if timeout > 0.0:
		timeout -= delta
	else:
		Engine.target_fps = 10.0


func _input(event):
	Engine.target_fps = 0
	timeout = 3.5


func _unhandled_input(event):
	Engine.target_fps = 0
	timeout = 3.5