FM/Assets/Scripts/Base/Keyboard/OpenKeyboardEventArgs.cs

62 lines
2.0 KiB
C#
Raw Normal View History

using System;
using TMPro;
using ZGame;
namespace HK.Keyboard
{
public class OpenKeyboardEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(OpenKeyboardEventArgs).GetHashCode();
public override int Id => EventId;
public TMP_InputField inputField;
2025-07-14 19:29:10 +08:00
public bool isChangeColor;
public bool isChangeFont;
public KeyboardType keyboardType;
public Action OKAction;
public OpenKeyboardEventArgs(TMP_InputField inputField, Action okAction)
{
this.inputField = inputField;
2025-07-14 19:29:10 +08:00
this.isChangeColor = false;
this.isChangeFont = false;
this.keyboardType = KeyboardType.All;
OKAction = okAction;
}
public OpenKeyboardEventArgs(TMP_InputField inputField, bool isChangeColor, Action okAction)
{
this.inputField = inputField;
this.isChangeColor = isChangeColor;
this.isChangeFont = false;
this.keyboardType = KeyboardType.All;
OKAction = okAction;
}
public OpenKeyboardEventArgs(TMP_InputField inputField, bool isChangeColor, bool isChangeFont, Action okAction)
{
this.inputField = inputField;
this.isChangeColor = isChangeColor;
this.isChangeFont = isChangeFont;
this.keyboardType = KeyboardType.All;
OKAction = okAction;
}
public OpenKeyboardEventArgs(TMP_InputField inputField, bool isChangeColor, bool isChangeFont,
KeyboardType keyboardType,
Action okAction)
{
this.inputField = inputField;
this.isChangeColor = isChangeColor;
this.isChangeFont = isChangeFont;
this.keyboardType = keyboardType;
OKAction = okAction;
}
}
2025-08-27 01:05:19 +08:00
public class CloseKeyboardEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(CloseKeyboardEventArgs).GetHashCode();
public override int Id => EventId;
}
}