igBeginPopupModal() публичный статический Метод

public static igBeginPopupModal ( string name, WindowFlags extra_flags ) : bool
name string
extra_flags WindowFlags
Результат bool
Пример #1
0
        public static bool BeginPopupModal(string name, ImGuiWindowFlags flags)
        {
            byte *native_name;
            int   name_byteCount = 0;

            if (name != null)
            {
                name_byteCount = Encoding.UTF8.GetByteCount(name);
                if (name_byteCount > Util.StackAllocationSizeLimit)
                {
                    native_name = Util.Allocate(name_byteCount + 1);
                }
                else
                {
                    byte *native_name_stackBytes = stackalloc byte[name_byteCount + 1];
                    native_name = native_name_stackBytes;
                }
                int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount);
                native_name[native_name_offset] = 0;
            }
            else
            {
                native_name = null;
            }
            byte *p_open = null;
            byte  ret    = ImGuiNative.igBeginPopupModal(native_name, p_open, flags);

            if (name_byteCount > Util.StackAllocationSizeLimit)
            {
                Util.Free(native_name);
            }
            return(ret != 0);
        }
Пример #2
0
        public static unsafe bool BeginPopupModal(string name, ref bool p_opened, ImGuiWindowFlags extra_flags)
        {
            byte value  = p_opened ? (byte)1 : (byte)0;
            bool result = ImGuiNative.igBeginPopupModal(name, &value, extra_flags);

            p_opened = value == 1 ? true : false;
            return(result);
        }
Пример #3
0
 public static bool BeginPopupModal(string name, ref bool opened, WindowFlags extraFlags)
 {
     return(ImGuiNative.igBeginPopupModal(name, ref opened, extraFlags));
 }
Пример #4
0
 public static bool BeginPopupModal(string name, ref bool opened)
 {
     return(ImGuiNative.igBeginPopupModal(name, ref opened, WindowFlags.Default));
 }
Пример #5
0
 public static unsafe bool BeginPopupModal(string name, ImGuiWindowFlags extra_flags)
 {
     return(ImGuiNative.igBeginPopupModal(name, null, extra_flags));
 }