internal static bool DropMessage(ref DropNotificationFlags flags, DragEventKind kind, GameObject Pressed, GameObject Released) { bool flag; bool flag2; string str; string str2; DropNotificationFlags dragDrop; DropNotificationFlags dragLand; DropNotificationFlags dragReverse; switch (kind) { case DragEventKind.Drag: flag = true; if (Released == null) { flag2 = false; dragDrop = -2147483648; dragReverse = DropNotificationFlags.DragLandOutside; dragLand = DropNotificationFlags.DragLandOutside; str = "----"; str2 = "OnLandOutside"; break; } flag2 = true; dragDrop = DropNotificationFlags.DragDrop; dragLand = DropNotificationFlags.DragLand; dragReverse = DropNotificationFlags.DragReverse; str = "OnDrop"; str2 = "OnLand"; break; case DragEventKind.Alt: flag2 = true; flag = false; dragDrop = DropNotificationFlags.AltDrop; dragLand = DropNotificationFlags.AltLand; dragReverse = DropNotificationFlags.AltReverse; str = "OnAltDrop"; str2 = "OnAltLand"; break; case DragEventKind.Mid: flag2 = true; flag = false; dragDrop = DropNotificationFlags.MidDrop; dragLand = DropNotificationFlags.MidLand; dragReverse = DropNotificationFlags.MidReverse; str = "OnMidDrop"; str2 = "OnMidLand"; break; default: throw new ArgumentOutOfRangeException(); } if ((flags & dragReverse) == dragReverse) { if ((flags & dragLand) == dragLand) { if (flag2) { Message(Pressed, Released, str2, Pressed, kind, ref flag); } else { Message(Pressed, str2, Pressed, kind, ref flag); } } if ((flags & dragDrop) == dragDrop) { if (flag2) { Message(Released, Pressed, str, Pressed, kind, ref flag); return(flag); } Message(Released, str, Pressed, kind, ref flag); } return(flag); } if ((flags & dragDrop) == dragDrop) { if (flag2) { Message(Released, Pressed, str, Pressed, kind, ref flag); } else { Message(Released, str, Pressed, kind, ref flag); } } if ((flags & dragLand) == dragLand) { if (flag2) { Message(Pressed, Released, str2, Pressed, kind, ref flag); return(flag); } Message(Pressed, str2, Pressed, kind, ref flag); } return(flag); }
internal static bool DropMessage(ref DropNotificationFlags flags, DragEventKind kind, GameObject Pressed, GameObject Released) { bool flag; bool flag1; string str; string str1; DropNotificationFlags dropNotificationFlag; DropNotificationFlags dropNotificationFlag1; DropNotificationFlags dropNotificationFlag2; switch (kind) { case DragEventKind.Drag: { flag = true; if (!Released) { flag1 = false; dropNotificationFlag = (DropNotificationFlags)-2147483648; dropNotificationFlag2 = DropNotificationFlags.DragLandOutside; dropNotificationFlag1 = DropNotificationFlags.DragLandOutside; str = "----"; str1 = "OnLandOutside"; } else { flag1 = true; dropNotificationFlag = DropNotificationFlags.DragDrop; dropNotificationFlag1 = DropNotificationFlags.DragLand; dropNotificationFlag2 = DropNotificationFlags.DragReverse; str = "OnDrop"; str1 = "OnLand"; } break; } case DragEventKind.Alt: { flag1 = true; flag = false; dropNotificationFlag = DropNotificationFlags.AltDrop; dropNotificationFlag1 = DropNotificationFlags.AltLand; dropNotificationFlag2 = DropNotificationFlags.AltReverse; str = "OnAltDrop"; str1 = "OnAltLand"; break; } case DragEventKind.Mid: { flag1 = true; flag = false; dropNotificationFlag = DropNotificationFlags.MidDrop; dropNotificationFlag1 = DropNotificationFlags.MidLand; dropNotificationFlag2 = DropNotificationFlags.MidReverse; str = "OnMidDrop"; str1 = "OnMidLand"; break; } default: { throw new ArgumentOutOfRangeException(); } } if (((int)flags & (int)dropNotificationFlag2) != (int)dropNotificationFlag2) { if (((int)flags & (int)dropNotificationFlag) == (int)dropNotificationFlag) { if (!flag1) { DropNotification.Message(Released, str, Pressed, kind, ref flag); } else { DropNotification.Message(Released, Pressed, str, Pressed, kind, ref flag); } } if (((int)flags & (int)dropNotificationFlag1) == (int)dropNotificationFlag1) { if (!flag1) { DropNotification.Message(Pressed, str1, Pressed, kind, ref flag); } else { DropNotification.Message(Pressed, Released, str1, Pressed, kind, ref flag); } } } else { if (((int)flags & (int)dropNotificationFlag1) == (int)dropNotificationFlag1) { if (!flag1) { DropNotification.Message(Pressed, str1, Pressed, kind, ref flag); } else { DropNotification.Message(Pressed, Released, str1, Pressed, kind, ref flag); } } if (((int)flags & (int)dropNotificationFlag) == (int)dropNotificationFlag) { if (!flag1) { DropNotification.Message(Released, str, Pressed, kind, ref flag); } else { DropNotification.Message(Released, Pressed, str, Pressed, kind, ref flag); } } } return flag; }
internal static bool DropMessage(ref DropNotificationFlags flags, DragEventKind kind, GameObject Pressed, GameObject Released) { bool flag; bool flag1; string str; string str1; DropNotificationFlags dropNotificationFlag; DropNotificationFlags dropNotificationFlag1; DropNotificationFlags dropNotificationFlag2; switch (kind) { case DragEventKind.Drag: { flag = true; if (!Released) { flag1 = false; dropNotificationFlag = (DropNotificationFlags) - 2147483648; dropNotificationFlag2 = DropNotificationFlags.DragLandOutside; dropNotificationFlag1 = DropNotificationFlags.DragLandOutside; str = "----"; str1 = "OnLandOutside"; } else { flag1 = true; dropNotificationFlag = DropNotificationFlags.DragDrop; dropNotificationFlag1 = DropNotificationFlags.DragLand; dropNotificationFlag2 = DropNotificationFlags.DragReverse; str = "OnDrop"; str1 = "OnLand"; } break; } case DragEventKind.Alt: { flag1 = true; flag = false; dropNotificationFlag = DropNotificationFlags.AltDrop; dropNotificationFlag1 = DropNotificationFlags.AltLand; dropNotificationFlag2 = DropNotificationFlags.AltReverse; str = "OnAltDrop"; str1 = "OnAltLand"; break; } case DragEventKind.Mid: { flag1 = true; flag = false; dropNotificationFlag = DropNotificationFlags.MidDrop; dropNotificationFlag1 = DropNotificationFlags.MidLand; dropNotificationFlag2 = DropNotificationFlags.MidReverse; str = "OnMidDrop"; str1 = "OnMidLand"; break; } default: { throw new ArgumentOutOfRangeException(); } } if (((int)flags & (int)dropNotificationFlag2) != (int)dropNotificationFlag2) { if (((int)flags & (int)dropNotificationFlag) == (int)dropNotificationFlag) { if (!flag1) { DropNotification.Message(Released, str, Pressed, kind, ref flag); } else { DropNotification.Message(Released, Pressed, str, Pressed, kind, ref flag); } } if (((int)flags & (int)dropNotificationFlag1) == (int)dropNotificationFlag1) { if (!flag1) { DropNotification.Message(Pressed, str1, Pressed, kind, ref flag); } else { DropNotification.Message(Pressed, Released, str1, Pressed, kind, ref flag); } } } else { if (((int)flags & (int)dropNotificationFlag1) == (int)dropNotificationFlag1) { if (!flag1) { DropNotification.Message(Pressed, str1, Pressed, kind, ref flag); } else { DropNotification.Message(Pressed, Released, str1, Pressed, kind, ref flag); } } if (((int)flags & (int)dropNotificationFlag) == (int)dropNotificationFlag) { if (!flag1) { DropNotification.Message(Released, str, Pressed, kind, ref flag); } else { DropNotification.Message(Released, Pressed, str, Pressed, kind, ref flag); } } } return(flag); }