only check for inputs if bound, increases efficiency
This commit is contained in:
parent
5fb1280e3e
commit
5c78058a9f
2 changed files with 4 additions and 1 deletions
|
@ -760,6 +760,7 @@ horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="InFileLabel" type="Label" parent="ShowtapeLoadScreen/DialogPanel"]
|
[node name="InFileLabel" type="Label" parent="ShowtapeLoadScreen/DialogPanel"]
|
||||||
|
layout_mode = 0
|
||||||
offset_left = 8.0
|
offset_left = 8.0
|
||||||
offset_top = 73.0
|
offset_top = 73.0
|
||||||
offset_right = 264.0
|
offset_right = 264.0
|
||||||
|
@ -792,6 +793,7 @@ tooltip_text = "Browse for a file."
|
||||||
text = "Browse"
|
text = "Browse"
|
||||||
|
|
||||||
[node name="CancelButton" type="Button" parent="ShowtapeLoadScreen/DialogPanel"]
|
[node name="CancelButton" type="Button" parent="ShowtapeLoadScreen/DialogPanel"]
|
||||||
|
layout_mode = 0
|
||||||
offset_left = 309.0
|
offset_left = 309.0
|
||||||
offset_top = 216.0
|
offset_top = 216.0
|
||||||
offset_right = 405.0
|
offset_right = 405.0
|
||||||
|
@ -800,6 +802,7 @@ text = "Cancel
|
||||||
"
|
"
|
||||||
|
|
||||||
[node name="OpenButton" type="Button" parent="ShowtapeLoadScreen/DialogPanel"]
|
[node name="OpenButton" type="Button" parent="ShowtapeLoadScreen/DialogPanel"]
|
||||||
|
layout_mode = 0
|
||||||
offset_left = 408.0
|
offset_left = 408.0
|
||||||
offset_top = 216.0
|
offset_top = 216.0
|
||||||
offset_right = 504.0
|
offset_right = 504.0
|
||||||
|
|
|
@ -123,7 +123,7 @@ func _ready() -> void:
|
||||||
update_text()
|
update_text()
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
if (binding): return
|
if (binding || key_binding.keycode == 0): return
|
||||||
if (Input.is_key_pressed(key_binding.keycode)):
|
if (Input.is_key_pressed(key_binding.keycode)):
|
||||||
if (!held_on_previous_frame):
|
if (!held_on_previous_frame):
|
||||||
movement_in.emit(movement_name, in_flow)
|
movement_in.emit(movement_name, in_flow)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue