Compare commits

..

No commits in common. "1f24357f1f37ccf488fb0c6d166b0108a13aeb71" and "d8ec01161eaeaaf9c24f6fbe342cb1c01fc8a836" have entirely different histories.

4 changed files with 20 additions and 85 deletions

View file

@ -299,42 +299,21 @@ layout_mode = 2
text = "Move Up Controller
"
[node name="MoveDownController" type="Label" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Label"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
text = "Move Down Controller"
[node name="MoveLeftController" type="Label" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Label"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
text = "Move Left Controller"
[node name="MoveDownController" type="Label" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Label"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
text = "Move Down Controller"
[node name="MoveRightController" type="Label" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Label"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
text = "Move Right Controller"
[node name="AimUpController" type="Label" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Label"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
text = "Aim Up Controller
"
[node name="AimDownController" type="Label" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Label"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
text = "Aim Down Controller"
[node name="AimLeftController" type="Label" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Label"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
text = "Aim Left Controller"
[node name="AimRightController" type="Label" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Label"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
text = "Aim Right Controller"
[node name="AttackController" type="Label" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Label"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
@ -403,6 +382,14 @@ script = ExtResource("2_4asaa")
input_action_name = "move_up_controller"
remap_controller = NodePath("../../../../../../../../../../Remap Controller")
[node name="MoveLeftRemapButton2" type="Button" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item" node_paths=PackedStringArray("remap_controller")]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
size_flags_horizontal = 3
script = ExtResource("2_4asaa")
input_action_name = "move_left_controller"
remap_controller = NodePath("../../../../../../../../../../Remap Controller")
[node name="MoveDownControllerRemapButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item" node_paths=PackedStringArray("remap_controller")]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
@ -411,14 +398,6 @@ script = ExtResource("2_4asaa")
input_action_name = "move_down_controller"
remap_controller = NodePath("../../../../../../../../../../Remap Controller")
[node name="MoveLeftControllerRemapButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item" node_paths=PackedStringArray("remap_controller")]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
size_flags_horizontal = 3
script = ExtResource("2_4asaa")
input_action_name = "move_left_controller"
remap_controller = NodePath("../../../../../../../../../../Remap Controller")
[node name="MoveRightControllerRemapButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item" node_paths=PackedStringArray("remap_controller")]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
@ -428,38 +407,6 @@ script = ExtResource("2_4asaa")
input_action_name = "move_right_controller"
remap_controller = NodePath("../../../../../../../../../../Remap Controller")
[node name="AimUpControllerRemapButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item" node_paths=PackedStringArray("remap_controller")]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
script = ExtResource("2_4asaa")
input_action_name = "aim_up_controller"
remap_controller = NodePath("../../../../../../../../../../Remap Controller")
[node name="AimDownControllerRemapButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item" node_paths=PackedStringArray("remap_controller")]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
size_flags_horizontal = 3
script = ExtResource("2_4asaa")
input_action_name = "aim_down_controller"
remap_controller = NodePath("../../../../../../../../../../Remap Controller")
[node name="AimLeftControllerRemapButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item" node_paths=PackedStringArray("remap_controller")]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
size_flags_horizontal = 3
script = ExtResource("2_4asaa")
input_action_name = "aim_left_controller"
remap_controller = NodePath("../../../../../../../../../../Remap Controller")
[node name="AimRightControllerRemapButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item" node_paths=PackedStringArray("remap_controller")]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
size_flags_horizontal = 3
focus_neighbor_bottom = NodePath("../../../../../../../MarginContainer/Back Button")
script = ExtResource("2_4asaa")
input_action_name = "aim_right_controller"
remap_controller = NodePath("../../../../../../../../../../Remap Controller")
[node name="AttackControllerRemapButton" type="Button" parent="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item" node_paths=PackedStringArray("remap_controller")]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
@ -493,12 +440,8 @@ text = "Back"
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveRightRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveRightRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AttackRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AttackRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveUpControllerRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveUpControllerRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveLeftRemapButton2" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveLeftRemapButton2" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveDownControllerRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveDownControllerRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveLeftControllerRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveLeftControllerRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveRightControllerRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/MoveRightControllerRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AimUpControllerRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AimUpControllerRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AimDownControllerRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AimDownControllerRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AimLeftControllerRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AimLeftControllerRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AimRightControllerRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AimRightControllerRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AttackControllerRemapButton" to="Panel/MarginContainer/VBoxContainer/SettingsTabs/Controls/ScrollView/MarginContainer/HBoxContainer/Item/AttackControllerRemapButton" method="_on_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/VBoxContainer/MarginContainer/Back Button" to="." method="_on_back_pressed"]

View file

@ -26,10 +26,6 @@ func load_data():
"move_down_controller": "j" + str(JOY_AXIS_LEFT_Y) + "/1.00",
"move_right_controller": "j" + str(JOY_AXIS_LEFT_X) + "/1.00",
"attack_controller": "b" + str(JOY_BUTTON_A),
"aim_up_controller": "j" + str(JOY_AXIS_RIGHT_Y) + "/-1.00",
"aim_left_controller": "j" + str(JOY_AXIS_RIGHT_X) + "/-1.00",
"aim_down_controller": "j" + str(JOY_AXIS_RIGHT_Y) + "/1.00",
"aim_right_controller": "j" + str(JOY_AXIS_RIGHT_X) + "/1.00",
}
save_data()
else:

View file

@ -14,11 +14,7 @@ extends Node
"move_down_controller",
"move_left_controller",
"move_right_controller",
"attack_controller",
"aim_up_controller",
"aim_left_controller",
"aim_down_controller",
"aim_right_controller"
"attack_controller"
]
const resolutions_dictionary : Dictionary = {

View file

@ -50,20 +50,20 @@ func start_remap(button : Button, action : String):
pass
func remap_key(event):
set_process_unhandled_key_input(false)
for key in InputMap.action_get_events(remap_action):
InputMap.action_erase_event(remap_action, key)
InputMap.action_add_event(remap_action, event)
match str(event.get_class()):
"InputEventJoypadButton":
Save.game_data["%s" % [remap_action]] = "b" + str(event.button_index)
"InputEventJoypadMotion":
if abs(event.axis_value) < 0.5: return
Save.game_data["%s" % [remap_action]] = "j" + str(event.axis) + str("/1.00" if event.axis_value > 0 else "/-1.00")
"InputEventMouseButton":
Save.game_data["%s" % [remap_action]] = "m" + str(event.button_index)
"InputEventKey":
Save.game_data["%s" % [remap_action]] = event.keycode
set_process_unhandled_key_input(false)
for key in InputMap.action_get_events(remap_action):
InputMap.action_erase_event(remap_action, key)
InputMap.action_add_event(remap_action, event)
remap_button.display_key()
remap_button.grab_focus()
remap_button.disabled = false