using Godot; using System; using System.Collections.Generic; namespace BITKit.UX { public partial class UXControl : Control { private readonly Queue _imageTextureQueue = new(); public void DrawTextureRect(ImageTexture texture)=>_imageTextureQueue.Enqueue(texture); public override void _Draw() { while (_imageTextureQueue.TryDequeue(out var texture)) { DrawTextureRect(texture, GetRect(), false); } } } }