private bool ProcessRemoveOrReassignElementAssignment(ControlRemappingDemo1.ElementAssignmentChange entry)
 {
     if (entry.controllerMap == null)
     {
         return true;
     }
     if (entry.state == ControlRemappingDemo1.QueueEntry.State.Canceled)
     {
         ControlRemappingDemo1.ElementAssignmentChange elementAssignmentChange = new ControlRemappingDemo1.ElementAssignmentChange(entry);
         elementAssignmentChange.changeType = ControlRemappingDemo1.ElementAssignmentChangeType.Remove;
         this.actionQueue.Enqueue(elementAssignmentChange);
         return true;
     }
     if (entry.state == ControlRemappingDemo1.QueueEntry.State.Confirmed)
     {
         ControlRemappingDemo1.ElementAssignmentChange elementAssignmentChange2 = new ControlRemappingDemo1.ElementAssignmentChange(entry);
         elementAssignmentChange2.changeType = ControlRemappingDemo1.ElementAssignmentChangeType.Replace;
         this.actionQueue.Enqueue(elementAssignmentChange2);
         return true;
     }
     this.dialog.StartModal(entry.id, ControlRemappingDemo1.DialogHelper.DialogType.AssignElement, new ControlRemappingDemo1.WindowProperties
     {
         title = "Reassign or Remove",
         message = "Do you want to reassign or remove this assignment?",
         rect = this.GetScreenCenteredRect(250f, 200f),
         windowDrawDelegate = new Action<string, string>(this.DrawReassignOrRemoveElementAssignmentWindow)
     }, new Action<int, ControlRemappingDemo1.UserResponse>(this.DialogResultCallback));
     return false;
 }
 private bool ProcessAddOrReplaceElementAssignment(ControlRemappingDemo1.ElementAssignmentChange entry)
 {
     if (ReInput.players.GetPlayer(entry.playerId) == null)
     {
         return true;
     }
     if (entry.controllerMap == null)
     {
         return true;
     }
     if (entry.state == ControlRemappingDemo1.QueueEntry.State.Canceled)
     {
         return true;
     }
     if (entry.state != ControlRemappingDemo1.QueueEntry.State.Confirmed)
     {
         string text;
         if (entry.controllerType == ControllerType.Keyboard)
         {
             if (Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.OSXWebPlayer)
             {
                 text = "Press any key to assign it to this action. You may also use the modifier keys Command, Control, Alt, and Shift. If you wish to assign a modifier key ifselt this action, press and hold the key for 1 second.";
             }
             else
             {
                 text = "Press any key to assign it to this action. You may also use the modifier keys Control, Alt, and Shift. If you wish to assign a modifier key itself to this action, press and hold the key for 1 second.";
             }
             if (Application.isEditor)
             {
                 text += "\n\nNOTE: Some modifier key combinations will not work in the Unity Editor, but they will work in a game build.";
             }
         }
         else if (entry.controllerType == ControllerType.Mouse)
         {
             text = "Press any mouse button or axis to assign it to this action.\n\nTo assign mouse movement axes, move the mouse quickly in the direction you want mapped to the action. Slow movements will be ignored.";
         }
         else
         {
             text = "Press any button or axis to assign it to this action.";
         }
         this.dialog.StartModal(entry.id, ControlRemappingDemo1.DialogHelper.DialogType.AssignElement, new ControlRemappingDemo1.WindowProperties
         {
             title = "Assign",
             message = text,
             rect = this.GetScreenCenteredRect(250f, 200f),
             windowDrawDelegate = new Action<string, string>(this.DrawElementAssignmentWindow)
         }, new Action<int, ControlRemappingDemo1.UserResponse>(this.DialogResultCallback), 5f);
         return false;
     }
     if (Event.current.type != EventType.Layout)
     {
         return false;
     }
     if (!ReInput.controllers.conflictChecking.DoesElementAssignmentConflict(entry.ToElementAssignmentConflictCheck()))
     {
         entry.ReplaceOrCreateActionElementMap();
     }
     else
     {
         ControlRemappingDemo1.ElementAssignmentChange elementAssignmentChange = new ControlRemappingDemo1.ElementAssignmentChange(entry);
         elementAssignmentChange.changeType = ControlRemappingDemo1.ElementAssignmentChangeType.ConflictCheck;
         this.actionQueue.Enqueue(elementAssignmentChange);
     }
     return true;
 }