56 lines
1.8 KiB
C#
56 lines
1.8 KiB
C#
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;
|
|
public bool isChangeColor;
|
|
public bool isChangeFont;
|
|
public KeyboardType keyboardType;
|
|
public Action OKAction;
|
|
|
|
public OpenKeyboardEventArgs(TMP_InputField inputField, Action okAction)
|
|
{
|
|
this.inputField = inputField;
|
|
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;
|
|
}
|
|
}
|
|
} |