Exemplo n.º 1
0
 public void SetKey(UIMenu.MenuControls menuControl, Control control, int controllerIndex)
 {
     _menuList.ForEach(m => m.SetKey(menuControl, control, controllerIndex));
 }
 /// <summary>
 /// Add a dynamic button to the instructional buttons array.
 /// Changes whether the controller is being used and changes depending on keybinds.
 /// </summary>
 /// <param name="control">GTA.Control that gets converted into a button.</param>
 /// <param name="text">Help text that goes with the button.</param>
 public InstructionalButton(GTA.Control control, string text)
 {
     Text           = text;
     _buttonControl = control;
     _usingControls = true;
 }
Exemplo n.º 3
0
 public void SetKey(UIMenu.MenuControls menuControl, Control control)
 {
     _menuList.ForEach(m => m.SetKey(menuControl, control));
 }
Exemplo n.º 4
0
 public void SetKey(UIMenu.MenuControls menuControl, Control control)
 {
     _menuList.ForEach(m => m.SetKey(menuControl, control));
 }
Exemplo n.º 5
0
 public void SetKey(UIMenu.MenuControls menuControl, Control control, int controllerIndex)
 {
     _menuList.ForEach(m => m.SetKey(menuControl, control, controllerIndex));
 }
 public static float GetDisabledControlNormal(int index, GTA.Control control)
 {
     InputArgument[] arguments = new InputArgument[] { index, control };
     return(Function.Call <float>(Hash.GET_DISABLED_CONTROL_NORMAL, arguments));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Add a dynamic button to the instructional buttons array.
 /// Changes whether the controller is being used and changes depending on keybinds.
 /// </summary>
 /// <param name="control">GTA.Control that gets converted into a button.</param>
 /// <param name="text">Help text that goes with the button.</param>
 public InstructionalButton(GTA.Control control, string text)
 {
     Text = text;
     _buttonControl = control;
     _usingControls = true;
 }
 public static void EnableControlThisFrame(int index, GTA.Control control)
 {
     InputArgument[] arguments = new InputArgument[] { index, control, true };
     Function.Call(Hash.ENABLE_CONTROL_ACTION, arguments);
 }
 public static int GetControlValue(int index, GTA.Control control)
 {
     InputArgument[] arguments = new InputArgument[] { index, control };
     return(Function.Call <int>(Hash.GET_CONTROL_VALUE, arguments));
 }
 public static void SetControlNormal(int index, GTA.Control control, float value)
 {
     InputArgument[] arguments = new InputArgument[] { index, control, value };
     Function.Call(Hash._SET_CONTROL_NORMAL, arguments);
 }
 public static bool IsEnabledControlPressed(int index, GTA.Control control)
 {
     InputArgument[] arguments = new InputArgument[] { index, control };
     return(Function.Call <bool>(Hash.IS_CONTROL_PRESSED, arguments));
 }
 public static bool IsEnabledControlJustReleased(int index, GTA.Control control)
 {
     InputArgument[] arguments = new InputArgument[] { index, control };
     return(Function.Call <bool>(Hash.IS_CONTROL_JUST_RELEASED, arguments));
 }
 public static bool IsDisabledControlPressed(int index, GTA.Control control) =>
 IsControlPressed(index, control) && !IsControlEnabled(index, control);
 public static bool IsControlJustPressed(int index, GTA.Control control)
 {
     InputArgument[] arguments = new InputArgument[] { index, control };
     return(Function.Call <bool>(Hash.IS_DISABLED_CONTROL_JUST_PRESSED, arguments));
 }