Skip to content

Commit cfadfb2

Browse files
committed
feat: Use macro instead of specify a new gamepad class
1 parent 8417f86 commit cfadfb2

File tree

83 files changed

+161
-1299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+161
-1299
lines changed

Assets/JCSUnity/Scenes/Demo/GUI/JCS_GamePadUIHandler.unity

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ GameObject:
216216
- component: {fileID: 70186286}
217217
- component: {fileID: 70186290}
218218
m_Layer: 5
219-
m_Name: JCS_GamePadAnimationHandler
219+
m_Name: JCS_GamepadAnimationHandler
220220
m_TagString: Untagged
221221
m_Icon: {fileID: 0}
222222
m_NavMeshLayer: 0
@@ -1880,7 +1880,7 @@ GameObject:
18801880
- component: {fileID: 1680278274}
18811881
- component: {fileID: 1680278277}
18821882
m_Layer: 5
1883-
m_Name: JCS_GamePadSpriteHandler
1883+
m_Name: JCS_GamepadSpriteHandler
18841884
m_TagString: Untagged
18851885
m_Icon: {fileID: 0}
18861886
m_NavMeshLayer: 0
@@ -2462,7 +2462,7 @@ MonoBehaviour:
24622462
m_HorizontalOverflow: 1
24632463
m_VerticalOverflow: 1
24642464
m_LineSpacing: 1
2465-
m_Text: '** JCS_GamePadButtonUIHandler Demo **'
2465+
m_Text: '# Gamepad handler'
24662466
--- !u!222 &2031414604
24672467
CanvasRenderer:
24682468
m_ObjectHideFlags: 0

Assets/JCSUnity/Scripts/UI/Button/Canvas/JCS_HideCanvasButton.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ namespace JCSUnity
1414
/// <summary>
1515
/// Button to show canvas, so it's invisible on the screen.
1616
/// </summary>
17-
public class JCS_HideCanvasButton : JCS_Button
17+
public class JCS_HideCanvasButton :
18+
#if JCS_USE_GAMEPAD
19+
JCS_GamepadButton
20+
#else
21+
JCS_Button
22+
#endif
1823
{
1924
/* Variables */
2025

Assets/JCSUnity/Scripts/UI/Button/Canvas/JCS_HideCanvasGamepadButton.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

Assets/JCSUnity/Scripts/UI/Button/Canvas/JCS_HideCanvasGamepadButton.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Assets/JCSUnity/Scripts/UI/Button/Canvas/JCS_ShowCanvasButton.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ namespace JCSUnity
1414
/// <summary>
1515
/// Button to show canvas, so it's visible on the screen.
1616
/// </summary>
17-
public class JCS_ShowCanvasButton : JCS_Button
17+
public class JCS_ShowCanvasButton :
18+
#if JCS_USE_GAMEPAD
19+
JCS_GamepadButton
20+
#else
21+
JCS_Button
22+
#endif
1823
{
1924
/* Variables */
2025

Assets/JCSUnity/Scripts/UI/Button/Canvas/JCS_ShowCanvasGamepadButton.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

Assets/JCSUnity/Scripts/UI/Button/Canvas/JCS_ShowCanvasGamepadButton.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Assets/JCSUnity/Scripts/UI/Button/Canvas/JCS_ToggleCanvasGamepadButton.cs

Lines changed: 0 additions & 46 deletions
This file was deleted.

Assets/JCSUnity/Scripts/UI/Button/Canvas/JCS_ToggleCanvasGamepadButton.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Assets/JCSUnity/Scripts/UI/Button/JCS_OpenURLButton.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ namespace JCSUnity
1414
/// <summary>
1515
/// Open a URL in the default browser.
1616
/// </summary>
17-
public class JCS_OpenURLButton : JCS_Button
17+
public class JCS_OpenURLButton :
18+
#if JCS_USE_GAMEPAD
19+
JCS_GamepadButton
20+
#else
21+
JCS_Button
22+
#endif
1823
{
1924
/* Variables */
2025

0 commit comments

Comments
 (0)