添加了标识更新

但是只有界面没有功能
This commit is contained in:
CortexCore
2023-07-11 00:14:36 +08:00
parent d8d34766c0
commit ca824c3b32
21 changed files with 742 additions and 126 deletions

View File

@@ -0,0 +1,26 @@
using Godot;
using System;
using System.Runtime.InteropServices.ComTypes;
using System.Text.RegularExpressions;
using BITKit;
namespace BITKit;
[GlobalClass]
public partial class RegularExpressionResource : TextValidationResource
{
[Export] private string regex;
[Export] private string errorReason;
public override bool IsTextValid(string text, out string _errorReason)
{
switch (Regex.IsMatch(text, regex))
{
case true:
_errorReason = string.Empty;
return true;
case false:
_errorReason = errorReason;
return false;
}
}
}