Skip to content

Commit 3e4ebe9

Browse files
committed
Splitting ISelectHandler out from IControllerInputHandler
1 parent 2f18bc1 commit 3e4ebe9

File tree

5 files changed

+30
-7
lines changed

5 files changed

+30
-7
lines changed

Assets/HoloToolkit/Input/Scripts/Gaze/MixedRealityTeleport.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ private Vector3 HitNormal()
183183
return retval;
184184
}
185185

186-
void IControllerInputHandler.OnSelectPressedAmountChanged(SelectPressedEventData eventData)
187-
{
188-
}
189-
190186
void IControllerInputHandler.OnInputPositionChanged(InputPositionEventData eventData)
191187
{
192188
if(EnableTeleport)

Assets/HoloToolkit/Input/Scripts/InputEvents/IControllerInputHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace HoloToolkit.Unity.InputModule
1010
/// </summary>
1111
public interface IControllerInputHandler : IEventSystemHandler
1212
{
13-
void OnSelectPressedAmountChanged(SelectPressedEventData eventData);
1413
void OnInputPositionChanged(InputPositionEventData eventData);
1514
}
1615
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
using UnityEngine.EventSystems;
5+
6+
namespace HoloToolkit.Unity.InputModule
7+
{
8+
/// <summary>
9+
/// Interface to implement to react to select pressed changes.
10+
/// </summary>
11+
public interface ISelectHandler : IEventSystemHandler
12+
{
13+
void OnSelectPressedAmountChanged(SelectPressedEventData eventData);
14+
}
15+
}

Assets/HoloToolkit/Input/Scripts/InputEvents/ISelectHandler.cs.meta

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/HoloToolkit/Input/Scripts/InputManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,8 @@ public void RaiseInputPositionChanged(IInputSource source, uint sourceId, Intera
679679
HandleEvent(inputPositionEventData, OnInputPositionChangedEventHandler);
680680
}
681681

682-
private static readonly ExecuteEvents.EventFunction<IControllerInputHandler> OnSelectPressedAmountChangedEventHandler =
683-
delegate (IControllerInputHandler handler, BaseEventData eventData)
682+
private static readonly ExecuteEvents.EventFunction<ISelectHandler> OnSelectPressedAmountChangedEventHandler =
683+
delegate (ISelectHandler handler, BaseEventData eventData)
684684
{
685685
SelectPressedEventData casted = ExecuteEvents.ValidateEventData<SelectPressedEventData>(eventData);
686686
handler.OnSelectPressedAmountChanged(casted);

0 commit comments

Comments
 (0)