igColorEdit4() private method

private igColorEdit4 ( string label, Vector4 col, bool show_alpha ) : bool
label string
col Vector4
show_alpha bool
return bool
コード例 #1
0
        public static unsafe bool ColorEdit4(string label, ref Vector4 color, bool showAlpha)
        {
            Vector4 localColor = color;
            bool    result     = ImGuiNative.igColorEdit4(label, &localColor, showAlpha);

            if (result)
            {
                color = localColor;
            }

            return(result);
        }
コード例 #2
0
ファイル: ImGui.cs プロジェクト: timgroote/BadgerEdit
        public static unsafe bool ColorEdit4(string label, ref Vector4 color, ColorEditFlags flags = ColorEditFlags.Default)
        {
            Vector4 localColor = color;
            bool    result     = ImGuiNative.igColorEdit4(label, &localColor, flags);

            if (result)
            {
                color = localColor;
            }

            return(result);
        }
コード例 #3
0
        public static unsafe bool ColorEdit4(string label, ref Color color, ColorEditFlags flags = ColorEditFlags.Default)
        {
            System.Numerics.Vector4 localColor = color.ToNumericsVector4();
            bool result = ImGuiNative.igColorEdit4(label, &localColor, flags);

            if (result)
            {
                color = new Color(localColor.X, localColor.Y, localColor.Z, localColor.W);
            }

            return(result);
        }
コード例 #4
0
        public static unsafe bool ColorEdit4(string label, ref float r, ref float g, ref float b, ref float a, bool showAlpha)
        {
            Vector4 localColor = new Vector4(r, g, b, a);
            bool    result     = ImGuiNative.igColorEdit4(label, &localColor, showAlpha);

            if (result)
            {
                r = localColor.X;
                g = localColor.Y;
                b = localColor.Z;
                a = localColor.W;
            }

            return(result);
        }
コード例 #5
0
        public static unsafe bool ColorEdit4(string label, ref float r, ref float g, ref float b, ref float a, ColorEditFlags flags = ColorEditFlags.Default)
        {
            Vector4 localColor = new Vector4(r, g, b, a);
            bool    result     = ImGuiNative.igColorEdit4(utf8String(label), &localColor, flags);

            if (result)
            {
                r = localColor.X;
                g = localColor.Y;
                b = localColor.Z;
                a = localColor.W;
            }

            return(result);
        }
コード例 #6
0
 public static bool ColorEdit4(string label, Vector4 color, bool showAlpha)
 {
     return(ImGuiNative.igColorEdit4(label, color, showAlpha));
 }