A game about forced loneliness, made by TACStudios
1using System;
2using UnityEngine.UI;
3
4namespace Unity.VisualScripting
5{
6 /// <summary>
7 /// Called when the user finishes editing the text content either by submitting or by clicking somewhere that removes the
8 /// focus from the input field.
9 /// </summary>
10 [UnitCategory("Events/GUI")]
11 [TypeIcon(typeof(InputField))]
12 [UnitOrder(3)]
13 public sealed class OnInputFieldEndEdit : GameObjectEventUnit<string>
14 {
15 public override Type MessageListenerType => typeof(UnityOnInputFieldEndEditMessageListener);
16 protected override string hookName => EventHooks.OnInputFieldEndEdit;
17
18 /// <summary>
19 /// The new text content of the input field.
20 /// </summary>
21 [DoNotSerialize]
22 [PortLabelHidden]
23 public ValueOutput value { get; private set; }
24
25 protected override void Definition()
26 {
27 base.Definition();
28
29 value = ValueOutput<string>(nameof(value));
30 }
31
32 protected override void AssignArguments(Flow flow, string value)
33 {
34 flow.SetValue(this.value, value);
35 }
36 }
37}