Before update to NET 7

This commit is contained in:
CortexCore
2023-07-12 12:11:10 +08:00
parent ca824c3b32
commit 4af7cec47b
15 changed files with 480 additions and 214 deletions

View File

@@ -0,0 +1,18 @@
using Cysharp.Threading.Tasks;
using Godot;
namespace BITKit;
public static class LabelExtensions
{
public static async void SetTextAsync(this Label self, string text)
{
await UniTask.SwitchToSynchronizationContext(BITApp.SynchronizationContext);
self.Text = text;
}
public static async void SetTextAsync(this RichTextLabel self,string text)
{
await UniTask.SwitchToSynchronizationContext(BITApp.SynchronizationContext);
self.Text = text;
}
}