From 1fc541edf96e0a5708d1a7774c6348fd65e75240 Mon Sep 17 00:00:00 2001 From: William Edwards Date: Thu, 13 Jun 2024 23:40:27 -0700 Subject: [PATCH] Add mappings for PS4 controller and match on Switch Pro Controller --- assets/gamepad/icon_mappings/ps4.tres | 66 +++++++++++++++++++++++- assets/gamepad/icon_mappings/ps5.tres | 6 ++- assets/gamepad/icon_mappings/switch.tres | 2 +- 3 files changed, 69 insertions(+), 5 deletions(-) diff --git a/assets/gamepad/icon_mappings/ps4.tres b/assets/gamepad/icon_mappings/ps4.tres index fccb4395..b9ec0104 100644 --- a/assets/gamepad/icon_mappings/ps4.tres +++ b/assets/gamepad/icon_mappings/ps4.tres @@ -1,8 +1,70 @@ -[gd_resource type="Resource" script_class="InputIconMapping" load_steps=2 format=3 uid="uid://d1wwvmphhodm0"] +[gd_resource type="Resource" script_class="InputIconMapping" load_steps=33 format=3 uid="uid://d1wwvmphhodm0"] [ext_resource type="Script" path="res://core/systems/input/input_icon_mapping.gd" id="1_6dodo"] +[ext_resource type="Texture2D" uid="uid://cgt42jlee1t3" path="res://assets/images/gamepad/playstation/playstation4_touchpad_touch.svg" id="1_dgojl"] +[ext_resource type="Texture2D" uid="uid://brf1l7pyedsg6" path="res://assets/images/gamepad/playstation/PS4_Diagram_Simple.png" id="1_xfnbr"] +[ext_resource type="Texture2D" uid="uid://dcysxvygs0t0b" path="res://assets/images/gamepad/playstation/playstation_button_color_circle.svg" id="2_boi0e"] +[ext_resource type="Texture2D" uid="uid://d1bn7vfymb8h7" path="res://assets/images/gamepad/playstation/playstation_dpad.svg" id="2_ksv3d"] +[ext_resource type="Texture2D" uid="uid://b8t8udyk7f2sy" path="res://assets/images/gamepad/playstation/playstation_dpad_down.svg" id="3_lbw7u"] +[ext_resource type="Texture2D" uid="uid://dt6pmeivafjuh" path="res://assets/images/gamepad/playstation/guide.svg" id="3_tihua"] +[ext_resource type="Texture2D" uid="uid://bucd4u3xhdkn5" path="res://assets/images/gamepad/playstation/playstation_dpad_left.svg" id="4_43xit"] +[ext_resource type="Texture2D" uid="uid://crv4tl33mg881" path="res://assets/images/gamepad/playstation/playstation_button_color_triangle.svg" id="4_t0rx5"] +[ext_resource type="Texture2D" uid="uid://nva4um5gnp46" path="res://assets/images/gamepad/playstation/playstation_dpad_right.svg" id="5_bxvhl"] +[ext_resource type="Texture2D" uid="uid://dvckjbn44kqh4" path="res://assets/images/gamepad/playstation/playstation_dpad_up.svg" id="6_01cs4"] +[ext_resource type="Texture2D" uid="uid://cvx6k287vtlda" path="res://assets/images/gamepad/playstation/playstation4_button_share.svg" id="6_eb1f1"] +[ext_resource type="Texture2D" uid="uid://d3b15ae2w8u04" path="res://assets/images/gamepad/playstation/playstation_button_color_cross.svg" id="7_1eaue"] +[ext_resource type="Texture2D" uid="uid://bbekpvxt1viwr" path="res://assets/images/gamepad/playstation/playstation4_button_options.svg" id="8_is2y1"] +[ext_resource type="Texture2D" uid="uid://ce50wyq1ctdg3" path="res://assets/images/gamepad/playstation/playstation_trigger_l1.svg" id="9_2i8h4"] +[ext_resource type="Texture2D" uid="uid://cwmll8jpe01x1" path="res://assets/images/gamepad/playstation/playstation_button_color_square.svg" id="9_41xra"] +[ext_resource type="Texture2D" uid="uid://bq64rpsb1usfh" path="res://assets/images/gamepad/playstation/playstation_stick_l.svg" id="10_sg1b0"] +[ext_resource type="Texture2D" uid="uid://bi2887g54x4ym" path="res://assets/images/gamepad/generic/gyro.png" id="10_tdin3"] +[ext_resource type="Texture2D" uid="uid://dbf2kolrjqlsk" path="res://assets/images/gamepad/playstation/playstation_stick_l_press.svg" id="11_j8ffx"] +[ext_resource type="Texture2D" uid="uid://cv1gammxiedb" path="res://assets/images/gamepad/playstation/playstation_stick_l_down.svg" id="12_vf35o"] +[ext_resource type="Texture2D" uid="uid://d22o4cxlcni3q" path="res://assets/images/gamepad/playstation/playstation_stick_l_left.svg" id="13_civhm"] +[ext_resource type="Texture2D" uid="uid://0bomms2ipyct" path="res://assets/images/gamepad/playstation/playstation_stick_l_right.svg" id="14_vpg31"] +[ext_resource type="Texture2D" uid="uid://ds60ucempaqtc" path="res://assets/images/gamepad/playstation/playstation_stick_l_up.svg" id="15_obvm1"] +[ext_resource type="Texture2D" uid="uid://d0pbaqstutkli" path="res://assets/images/gamepad/playstation/playstation_trigger_l2.svg" id="16_0u2wr"] +[ext_resource type="Texture2D" uid="uid://drbydhj23dk4v" path="res://assets/images/gamepad/playstation/playstation_trigger_r1.svg" id="18_mt27f"] +[ext_resource type="Texture2D" uid="uid://byrtduc2ys2gd" path="res://assets/images/gamepad/playstation/playstation_stick_r.svg" id="19_cv760"] +[ext_resource type="Texture2D" uid="uid://dnc8ia8fbc72f" path="res://assets/images/gamepad/playstation/playstation_stick_r_press.svg" id="20_wv7w2"] +[ext_resource type="Texture2D" uid="uid://b0hdbw4qo4nl2" path="res://assets/images/gamepad/playstation/playstation_stick_r_down.svg" id="21_64cn1"] +[ext_resource type="Texture2D" uid="uid://dedewmjipppck" path="res://assets/images/gamepad/playstation/playstation_stick_r_left.svg" id="22_6k3lc"] +[ext_resource type="Texture2D" uid="uid://d2f87ubl8ut4t" path="res://assets/images/gamepad/playstation/playstation_stick_r_right.svg" id="23_a3gna"] +[ext_resource type="Texture2D" uid="uid://cvjxqt1lsfp1t" path="res://assets/images/gamepad/playstation/playstation_stick_r_up.svg" id="24_hoi2y"] +[ext_resource type="Texture2D" uid="uid://botqou7j5tw5i" path="res://assets/images/gamepad/playstation/playstation_trigger_r2.svg" id="25_t4gxs"] [resource] script = ExtResource("1_6dodo") name = "PS4" -device_names = PackedStringArray() +device_names = PackedStringArray("Sony Interactive Entertainment Wireless Controller", "PS4 Controller") +diagram = ExtResource("1_xfnbr") +north = ExtResource("4_t0rx5") +south = ExtResource("7_1eaue") +east = ExtResource("2_boi0e") +west = ExtResource("9_41xra") +guide = ExtResource("3_tihua") +start = ExtResource("8_is2y1") +select = ExtResource("6_eb1f1") +dpad = ExtResource("2_ksv3d") +dpad_left = ExtResource("4_43xit") +dpad_right = ExtResource("5_bxvhl") +dpad_up = ExtResource("6_01cs4") +dpad_down = ExtResource("3_lbw7u") +left_shoulder = ExtResource("9_2i8h4") +left_trigger = ExtResource("16_0u2wr") +right_shoulder = ExtResource("18_mt27f") +right_trigger = ExtResource("25_t4gxs") +left_stick = ExtResource("10_sg1b0") +left_stick_left = ExtResource("13_civhm") +left_stick_right = ExtResource("14_vpg31") +left_stick_up = ExtResource("15_obvm1") +left_stick_down = ExtResource("12_vf35o") +left_stick_click = ExtResource("11_j8ffx") +right_stick = ExtResource("19_cv760") +right_stick_left = ExtResource("22_6k3lc") +right_stick_right = ExtResource("23_a3gna") +right_stick_up = ExtResource("24_hoi2y") +right_stick_down = ExtResource("21_64cn1") +right_stick_click = ExtResource("20_wv7w2") +center_pad = ExtResource("1_dgojl") +gyro = ExtResource("10_tdin3") diff --git a/assets/gamepad/icon_mappings/ps5.tres b/assets/gamepad/icon_mappings/ps5.tres index eb60842b..ee3ce2d2 100644 --- a/assets/gamepad/icon_mappings/ps5.tres +++ b/assets/gamepad/icon_mappings/ps5.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" script_class="InputIconMapping" load_steps=22 format=3 uid="uid://bmquv6m1c6ba1"] +[gd_resource type="Resource" script_class="InputIconMapping" load_steps=23 format=3 uid="uid://bmquv6m1c6ba1"] [ext_resource type="Script" path="res://core/systems/input/input_icon_mapping.gd" id="1_ba5rj"] [ext_resource type="Texture2D" uid="uid://biu5qfv6e1mq8" path="res://assets/images/gamepad/playstation/PS5_Diagram_Simple.png" id="1_brns1"] @@ -15,6 +15,7 @@ [ext_resource type="Texture2D" uid="uid://y4ntbxk5qrpo" path="res://assets/images/gamepad/playstation/playstation5_button_create.svg" id="7_klhod"] [ext_resource type="Texture2D" uid="uid://dvckjbn44kqh4" path="res://assets/images/gamepad/playstation/playstation_dpad_up.svg" id="7_paptw"] [ext_resource type="Texture2D" uid="uid://8vgoicywpflx" path="res://assets/images/gamepad/playstation/playstation5_button_options.svg" id="9_sj432"] +[ext_resource type="Texture2D" uid="uid://bi2887g54x4ym" path="res://assets/images/gamepad/generic/gyro.png" id="10_ctm85"] [ext_resource type="Texture2D" uid="uid://ce50wyq1ctdg3" path="res://assets/images/gamepad/playstation/playstation_trigger_l1.svg" id="10_gaqt5"] [ext_resource type="Texture2D" uid="uid://bq64rpsb1usfh" path="res://assets/images/gamepad/playstation/playstation_stick_l.svg" id="11_mlyq1"] [ext_resource type="Texture2D" uid="uid://d0pbaqstutkli" path="res://assets/images/gamepad/playstation/playstation_trigger_l2.svg" id="12_0m5i4"] @@ -25,7 +26,7 @@ [resource] script = ExtResource("1_ba5rj") name = "PS5" -device_names = PackedStringArray("PS5 Controller") +device_names = PackedStringArray("PS5 Controller", "Sony Interactive Entertainment DualSense") diagram = ExtResource("1_brns1") north = ExtResource("3_c5wlt") south = ExtResource("5_bn8cu") @@ -46,3 +47,4 @@ right_trigger = ExtResource("16_5vbcf") left_stick = ExtResource("11_mlyq1") right_stick = ExtResource("15_chusf") center_pad = ExtResource("1_l1iq3") +gyro = ExtResource("10_ctm85") diff --git a/assets/gamepad/icon_mappings/switch.tres b/assets/gamepad/icon_mappings/switch.tres index d61ddfce..0a9f5b01 100644 --- a/assets/gamepad/icon_mappings/switch.tres +++ b/assets/gamepad/icon_mappings/switch.tres @@ -35,7 +35,7 @@ [resource] script = ExtResource("1_s4hvo") name = "Switch" -device_names = PackedStringArray("Switch Controller", "Switch Pro Controller") +device_names = PackedStringArray("Switch Controller", "Switch Pro Controller", "Nintendo Co., Ltd. Pro Controller") north = ExtResource("17_n3inh") south = ExtResource("29_qxbwx") east = ExtResource("6_riih2")