Skip to content

Commit 3a53f53

Browse files
committed
Edit button colors, make rumble work for all gamepads
1 parent 79ce661 commit 3a53f53

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

Assets/Samples/LightbarAndRumble/LightbarAndRumble.unity

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,9 @@ MonoBehaviour:
541541
m_Transition: 1
542542
m_Colors:
543543
m_NormalColor: {r: 0, g: 1, b: 0.015686275, a: 1}
544-
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
545-
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
546-
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
544+
m_HighlightedColor: {r: 0, g: 1, b: 0.015686275, a: 0.39215687}
545+
m_PressedColor: {r: 0.26666668, g: 0.26666668, b: 0.26666668, a: 1}
546+
m_SelectedColor: {r: 0, g: 1, b: 0.015686275, a: 0.39215687}
547547
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
548548
m_ColorMultiplier: 1
549549
m_FadeDuration: 0.1
@@ -688,9 +688,9 @@ MonoBehaviour:
688688
m_Transition: 1
689689
m_Colors:
690690
m_NormalColor: {r: 0, g: 0.12156863, b: 1, a: 1}
691-
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
692-
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
693-
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
691+
m_HighlightedColor: {r: 0, g: 0.12156863, b: 1, a: 0.39215687}
692+
m_PressedColor: {r: 0.26666668, g: 0.26666668, b: 0.26666668, a: 1}
693+
m_SelectedColor: {r: 0, g: 0.12156863, b: 1, a: 0.39215687}
694694
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
695695
m_ColorMultiplier: 1
696696
m_FadeDuration: 0.1
@@ -996,9 +996,9 @@ MonoBehaviour:
996996
m_Transition: 1
997997
m_Colors:
998998
m_NormalColor: {r: 1, g: 0.8901961, b: 0, a: 1}
999-
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
1000-
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
1001-
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
999+
m_HighlightedColor: {r: 1, g: 0.8901961, b: 0, a: 0.39215687}
1000+
m_PressedColor: {r: 0.26666668, g: 0.26666668, b: 0.26666668, a: 1}
1001+
m_SelectedColor: {r: 1, g: 0.8901961, b: 0, a: 0.39215687}
10021002
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
10031003
m_ColorMultiplier: 1
10041004
m_FadeDuration: 0.1
@@ -4062,9 +4062,9 @@ MonoBehaviour:
40624062
m_Transition: 1
40634063
m_Colors:
40644064
m_NormalColor: {r: 1, g: 0, b: 0, a: 1}
4065-
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
4066-
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
4067-
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
4065+
m_HighlightedColor: {r: 1, g: 0, b: 0, a: 0.39215687}
4066+
m_PressedColor: {r: 0.2679245, g: 0.2679245, b: 0.2679245, a: 1}
4067+
m_SelectedColor: {r: 1, g: 0, b: 0, a: 0.39215687}
40684068
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
40694069
m_ColorMultiplier: 1
40704070
m_FadeDuration: 0.1

Assets/Samples/LightbarAndRumble/MotorSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class MotorSettings : MonoBehaviour
99

1010
public void SetMotorSpeeds()
1111
{
12-
var gamepad = DualShockGamepad.current;
12+
var gamepad = Gamepad.current;
1313
if (gamepad != null)
1414
{
1515
Debug.Log("Current gamepad: " + gamepad);
@@ -19,7 +19,7 @@ public void SetMotorSpeeds()
1919

2020
private void OnDisable()
2121
{
22-
var gamepad = DualShockGamepad.current;
22+
var gamepad = Gamepad.current;
2323
if (gamepad != null)
2424
{
2525
gamepad.SetMotorSpeeds(0, 0);

0 commit comments

Comments
 (0)