From 26a9607853ecd465dd6f94faccaf7a9b093954c7 Mon Sep 17 00:00:00 2001 From: jadis0x <49281043+jadis0x@users.noreply.github.com> Date: Sun, 15 Jan 2023 22:08:27 +0300 Subject: [PATCH] MakeTex function added --- DevourClient/Helpers/GUIHelper.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DevourClient/Helpers/GUIHelper.cs b/DevourClient/Helpers/GUIHelper.cs index 7f300d6..097c07e 100644 --- a/DevourClient/Helpers/GUIHelper.cs +++ b/DevourClient/Helpers/GUIHelper.cs @@ -33,5 +33,18 @@ namespace DevourClient.Helpers return color; } + + private Texture2D MakeTex(int width, int height, Color col) + { + Color[] pix = new Color[width * height]; + for (int i = 0; i < pix.Length; ++i) + { + pix[i] = col; + } + Texture2D result = new Texture2D(width, height); + result.SetPixels(pix); + result.Apply(); + return result; + } } }