From fe5142dbdc48c2551610fa24558069420d2ff462 Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Tue, 8 Apr 2025 18:25:15 +0800 Subject: [PATCH] add set color alpha shortcuts --- Runtime/DebugX.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Runtime/DebugX.cs b/Runtime/DebugX.cs index 29a49f0..d37c53c 100644 --- a/Runtime/DebugX.cs +++ b/Runtime/DebugX.cs @@ -198,10 +198,18 @@ namespace DCFApixels { return new DrawHandler(GetCurrentDefaultDuration(), color); } + public static DrawHandler Draw((Color color, float alphaMultiplier) color) + { + return new DrawHandler(GetCurrentDefaultDuration(), color.ToColor()); + } public static DrawHandler Draw(float duration, Color color) { return new DrawHandler(duration, color); } + public static DrawHandler Draw(float duration, (Color color, float alphaMultiplier) color) + { + return new DrawHandler(duration, color.ToColor()); + } //public static DrawHandler Draw(float r, float g, float b, float a = 1f) //TODO public readonly partial struct DrawHandler @@ -221,8 +229,10 @@ namespace DCFApixels //ContextController = GetCurrenRenderContextController(); } [IN(LINE)] public DrawHandler Setup(float duration, Color color) => new DrawHandler(duration, color); + [IN(LINE)] public DrawHandler Setup(float duration, (Color color, float alphaMultiplier) color) => new DrawHandler(duration, color.ToColor()); [IN(LINE)] public DrawHandler Setup(float duration) => new DrawHandler(duration, Color); [IN(LINE)] public DrawHandler Setup(Color color) => new DrawHandler(Duration, color); + [IN(LINE)] public DrawHandler Setup((Color color, float alphaMultiplier) color) => new DrawHandler(Duration, color.ToColor()); //[IN(LINE)] //private DrawHandler(float time, Color color, RenderContextController contextController) //{