SetControlActions() 공개 정적인 메소드

public static SetControlActions ( bool b ) : void
b bool
리턴 void
예제 #1
0
 /// <summary>
 ///     Show the console
 /// </summary>
 /// <param name="show">Whether or not the console should be shown</param>
 public void ShowConsole(bool show)
 {
     _isHidden      = !show;
     _lineOffset    = 0;
     _historyCursor = -1;
     if (show)
     {
         _disabledControls = GTAFuncs.DisableAllControls();
         SetConsoleControls();
     }
     else
     {
         GTAFuncs.SetControlActions(false);
         GTAFuncs.EnableControls(_disabledControls);
         _disabledControls.Clear();
     }
 }
예제 #2
0
 /// <summary>
 /// Disables all controls not enabled while using the console
 /// </summary>
 private void SetConsoleControls()
 {
     GTAFuncs.SetControlActions(false);
     GTAFuncs.EnableControlAction(Control.MoveLeftRight, true);
     GTAFuncs.EnableControlAction(Control.MoveUpDown, true);
     GTAFuncs.EnableControlAction(Control.VehicleAccelerate, true);
     GTAFuncs.EnableControlAction(Control.VehicleBrake, true);
     GTAFuncs.EnableControlAction(Control.VehicleDriveLook, true);
     GTAFuncs.EnableControlAction(Control.VehicleDriveLook2, true);
     GTAFuncs.EnableControlAction(Control.VehicleMoveLeftRight, true);
     GTAFuncs.EnableControlAction(Control.VehicleMoveUpDown, true);
     GTAFuncs.EnableControlAction(Control.LookLeftRight, true);
     GTAFuncs.EnableControlAction(Control.LookUpDown, true);
     GTAFuncs.EnableControlAction(Control.FlyUpDown, true);
     GTAFuncs.EnableControlAction(Control.FlyLeftRight, true);
     GTAFuncs.EnableControlAction(Control.VehicleFlyRollLeftRight, true);
     GTAFuncs.EnableControlAction(Control.VehicleFlyPitchUpDown, true);
     GTAFuncs.EnableControlAction(Control.VehicleFlyYawLeft, true);
     GTAFuncs.EnableControlAction(Control.VehicleFlyYawRight, true);
     GTAFuncs.EnableControlAction(Control.VehicleFlyThrottleDown, true);
     GTAFuncs.EnableControlAction(Control.VehicleFlyThrottleUp, true);
 }