forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputSystemEventSystem.cs
More file actions
55 lines (48 loc) · 1.86 KB
/
Copy pathInputSystemEventSystem.cs
File metadata and controls
55 lines (48 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine.Scripting.APIUpdating;
using UnityEngine.UIElements.Collections;
namespace UnityEngine.UIElements.InputSystem
{
/// <summary>
/// Handles input and sending events to UIElements Panel through use of Unity's Input System package.
/// </summary>
[AddComponentMenu("UI Toolkit/Input System Event System (UI Toolkit)")]
public class InputSystemEventSystem : MonoBehaviour
{
/// <summary>
/// Returns true if the application has the focus. Events are sent only if this flag is set to true.
/// </summary>
public bool isAppFocused { get; private set; } = true;
/// <summary>
/// Overrides the default input when NavigationEvents are sent.
/// </summary>
/// <remarks>
/// Use this override to bypass the default input system with your own input system.
/// This is useful when you want to send fake input to the event system.
/// This property will be ignored if the New Input System is used.
/// </remarks>
[Obsolete("EventSystem no longer supports input override for legacy input. Install Input System package for full input binding functionality.")]
public InputWrapper inputOverride { get; set; }
/// <summary>
/// Constructor.
/// </summary>
protected InputSystemEventSystem()
{
}
void OnApplicationFocus(bool hasFocus)
{
isAppFocused = hasFocus;
}
}
internal interface IKeyboardEventProcessor
{
void OnEnable();
void OnDisable();
void ProcessKeyboardEvents(InputSystemEventSystem eventSystem);
}
}