2019-10-01 23:26:25 +02:00
#if UNITY_2019_1_OR_NEWER
using UnityEditor ;
using UnityEngine.UIElements ;
2019-10-15 21:10:57 +02:00
using UnityAtoms.Mobile ;
2019-10-01 23:26:25 +02:00
using UnityAtoms.Editor ;
namespace UnityAtoms.Mobile.Editor
{
2019-10-15 03:07:22 +02:00
/// <summary>
2019-10-15 21:10:57 +02:00
/// Event property drawer of type `TouchUserInput`. Inherits from `AtomEventEditor<TouchUserInput, TouchUserInputEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
2019-10-15 03:07:22 +02:00
/// </summary>
2019-10-01 23:26:25 +02:00
[CustomEditor(typeof(TouchUserInputEvent))]
public sealed class TouchUserInputEventEditor : AtomEventEditor < TouchUserInput , TouchUserInputEvent >
{
protected override VisualElement GetRaiseValueInput ( )
{
var input = new Toggle ( ) { label = "Raise value" , name = "Raise value" , viewDataKey = "Raise value" } ;
input . RegisterCallback < ChangeEvent < TouchUserInput > > ( ( evt ) = > { _raiseValue = evt . newValue ; } ) ;
return input ;
}
}
}
#endif