18 lines
458 B
C#
18 lines
458 B
C#
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;
|
|
}
|
|
} |