示例#1
0
文件: GUI.cs 项目: randomcrab/SE
        public static string GetDragDropPayload()
        {
            ImGuiPayloadPtr ptr = ImGui.GetDragDropPayload();
            string          str = Marshal.PtrToStringUni(ptr.Data);

            ptr.Clear();
            return(str);
        }
示例#2
0
文件: GUI.cs 项目: randomcrab/SE
        public static unsafe string AcceptDragDropPayload(string type)
        {
            ImGuiPayloadPtr payload = ImGui.AcceptDragDropPayload(type);

            if (payload.NativePtr != null)
            {
                string str = Marshal.PtrToStringUni(payload.Data);
                payload.Clear();
                return(str);
            }
            return(null);
        }