From d2ab30e7a69bfe7efda63ae75812207377917bd3 Mon Sep 17 00:00:00 2001 From: miepzerino <o.skotnik@gmail.com> Date: Sun, 30 Mar 2025 18:50:27 +0000 Subject: [PATCH] Merge branch 'Flexalon-UI-Layouts' into develop --- Assets/Flexalon/Runtime/Interaction/FlexalonInputProvider.cs | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/Assets/Flexalon/Runtime/Interaction/FlexalonInputProvider.cs b/Assets/Flexalon/Runtime/Interaction/FlexalonInputProvider.cs new file mode 100644 index 0000000..7b58bb2 --- /dev/null +++ b/Assets/Flexalon/Runtime/Interaction/FlexalonInputProvider.cs @@ -0,0 +1,32 @@ +using UnityEngine; + +namespace Flexalon +{ + public enum InputMode + { + /// <summary> A ray is provided to determine which object is hovered and how it should be moved. </summary> + Raycast, + + /// <summary> Objects are moved by an external system. Only state changes are provided. </summary> + External + } + + /// <summary> Implement this interface and assign it to the Flexalon.InputProvider + /// to override how FlexalonInteractables receive input. </summary> + public interface InputProvider + { + InputMode InputMode { get; } + + /// <summary> True if the input is active, e.g. button is being held down. </summary> + bool Active { get; } + + /// <summary> In Raycast Mode, the screen-space position used to pick UI objects. </summary> + Vector3 UIPointer { get; } + + /// <summary> In Raycast Mode, the ray to cast to determine what should be moved / hit. </summary> + Ray Ray { get; } + + /// <summary> In External Mode, the object that is currently being hovered or selected. </summary> + GameObject ExternalFocusedObject { get; } + } +} \ No newline at end of file -- Gitblit v1.9.3