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