public ETCAxis(string axisName) { name = axisName; enable = true; range = AxisRange.Classical; speed = 15; invertedAxis = false; isEnertia = false; inertia = 0; inertiaThreshold = 0.08f; axisValue = 0; axisSpeedValue = 0; gravity = 0; isAutoStab = false; autoStabThreshold = 0.01f; autoStabSpeed = 10; maxAngle = 90; minAngle = 90; axisState = AxisState.None; maxOverTimeValue = 1; overTimeStep = 1; isValueOverTime = false; axisThreshold = 0.5f; deadValue = 0.1f; actionOn = ActionOn.Press; }
public void SetupInputButton(InputAction input, AxisRange range, string action) { InputAction = input; AxisRange = range; LabelText.SetText(action); }
public InputSetting( ControllerType _controllerType, ControllerElementType _elementType, int _elementIdentifierId, AxisRange _axisRange, KeyCode _keyboardKey, ModifierKeyFlags _modifierKeyFlags, int _actionId, Pole _axisContribution, bool _invert, int _elementMapId) { int num = 0; this.layoutId = num; this.categoryId = num; this.controllerType = _controllerType; this.elementType = _elementType; this.elementIdentifierId = _elementIdentifierId; this.axisRange = _axisRange; this.keyboardKey = _keyboardKey; this.modifierKeyFlags = _modifierKeyFlags; this.actionId = _actionId; this.axisContribution = _axisContribution; this.invert = _invert; this.elementMapId = _elementMapId; }
private void CreateUIRow(InputAction action, AxisRange actionRange, string label) { // Create the Action label GameObject labelGo = Object.Instantiate <GameObject>(textPrefab); labelGo.transform.SetParent(actionGroupTransform); labelGo.transform.SetAsLastSibling(); labelGo.GetComponent <Text>().text = label; // Create the input field button GameObject buttonGo = Object.Instantiate <GameObject>(buttonPrefab); buttonGo.transform.SetParent(fieldGroupTransform); buttonGo.transform.SetAsLastSibling(); // Add the row to the rows list rows.Add( new Row() { action = action, actionRange = actionRange, button = buttonGo.GetComponent <Button>(), text = buttonGo.GetComponentInChildren <Text>() } ); }
public ActionEntry(InputAction action, AxisRange axisRange) { this.action = action; this.axisRange = axisRange; this.actionSet = new InputActionSet(action.id, axisRange); fieldSets = new IndexedDictionary <int, FieldSet>(); }
public LineChart(ChartSize size, ChartData data, AxisType axisTypes, AxisLabels labels, AxisRange ranges) : base(LineTypeDefinition, size, data) { _labels = labels; _axisType = axisTypes; _ranges = ranges; }
//[HideInInspector] public GenericXForm targetTranslate; //protected Vector3 snapshot; //private Vector3 lastSentPos; //private CompressedV3 lastSentCompPos; // Constructor public PositionElement() { elementType = ElementType.Position; compression = Compression.LocalRange; xrange = new AxisRange(0, -10, 10, 100); yrange = new AxisRange(1, -10, 10, 100); zrange = new AxisRange(2, -10, 10, 100); }
private void CreateButton(InputAction action, AxisRange axisRange, string label) { GameObject obj = Instantiate(InputButtonTemplate, KeyboardControlContent); obj.GetComponent <Settings.Template.InputButtonTemplate>().SetupInputButton(action, axisRange, label); Buttons.Add(obj.GetComponent <Settings.Template.InputButtonTemplate>()); }
protected void UpdateStoreValue(AxisRange newValue) { if (!newValue.Equals(storeValue.Value)) // value changed // Store new value { storeValue.Value = newValue; } }
private Sprite GetAxis(int elementID, AxisRange range, Pole axis) { if (!dAxes.ContainsKey(elementID)) { return(null); } return(dAxes[elementID].GetImage(range, axis)); }
public ActionEntry GetActionEntry(int actionId, AxisRange axisRange) { int index = IndexOfActionEntry(actionId, axisRange); if (index < 0) { return(null); } return(_actionList[index]); }
public void SetFixedFieldData(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int controllerId) { ActionEntry entry = GetActionEntry(mapCategoryId, actionId, axisRange); if (entry == null) { return; } entry.SetFixedFieldData(controllerType, controllerId); }
public void PopulateField(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int controllerId, int index, int actionElementMapId, string label, bool invert) { ActionEntry entry = GetActionEntry(mapCategoryId, actionId, axisRange); if (entry == null) { return; } entry.PopulateField(controllerType, controllerId, index, actionElementMapId, label, invert); }
public void SetLabel(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int index, string label) { ActionEntry entry = GetActionEntry(mapCategoryId, actionId, axisRange); if (entry == null) { return; } entry.SetFieldLabel(controllerType, index, label); }
public GUIInputField GetGUIInputField(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int fieldIndex) { ActionEntry actionEntry = GetActionEntry(mapCategoryId, actionId, axisRange); if (actionEntry == null) { return(null); } return(actionEntry.GetGUIInputField(controllerType, fieldIndex)); }
public void AddInputField(int mapCategoryId, InputAction action, AxisRange axisRange, ControllerType controllerType, int fieldIndex, GUIInputField inputField) { ActionEntry actionEntry = GetActionEntry(mapCategoryId, action, axisRange); if (actionEntry == null) { return; } actionEntry.AddInputField(controllerType, fieldIndex, inputField); }
public bool Contains(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int fieldIndex) { ActionEntry actionEntry = GetActionEntry(mapCategoryId, actionId, axisRange); if (actionEntry == null) { return(false); } return(actionEntry.Contains(controllerType, fieldIndex)); }
public void AddInputFieldSet(int mapCategoryId, InputAction action, AxisRange axisRange, ControllerType controllerType, GameObject fieldSetContainer) { ActionEntry actionEntry = GetActionEntry(mapCategoryId, action, axisRange); if (actionEntry == null) { return; } actionEntry.AddInputFieldSet(controllerType, fieldSetContainer); }
// Token: 0x0600169F RID: 5791 RVA: 0x00061224 File Offset: 0x0005F424 public static string GetActionNameToken(string actionName, AxisRange axisRange = AxisRange.Full) { string result; if (InputCatalog.actionToToken.TryGetValue(new InputCatalog.ActionAxisPair(actionName, axisRange), out result)) { return(result); } throw new ArgumentException(string.Format("Bad action/axis pair {0} {1}.", actionName, axisRange)); }
public void SetToggleInfoData(int actionId, AxisRange axisRange, ControllerType controllerType, int intData) { base.SetElementInfoData(string.Empty, intData); if (toggleInfo == null) { return; } toggleInfo.actionId = actionId; toggleInfo.axisRange = axisRange; toggleInfo.controllerType = controllerType; }
public Sprite GetGlyph(string joystickGuid, int elementIdentifierId, AxisRange axisRange) { for (int i = 0; i < gamepadModels.Length; i++) { if (gamepadModels[i].joystickGUID == joystickGuid) { return(GetRequestedGlyph(elementIdentifierId, axisRange, i)); } } return(null); }
public bool Matches(int actionId, AxisRange axisRange) { if (this.action.id != actionId) { return(false); } if (this.axisRange != axisRange) { return(false); } return(true); }
public int IndexOfActionEntry(int actionId, AxisRange axisRange) { int count = _actionList.Count; for (int i = 0; i < count; i++) { if (_actionList[i].Matches(actionId, axisRange)) { return(i); } } return(-1); }
public ActionEntry AddAction(InputAction action, AxisRange axisRange) { if (action == null) { return(null); } if (ContainsActionEntry(action.id, axisRange)) { return(null); // already used } _actionList.Add(new ActionEntry(action, axisRange)); return(_actionList[_actionList.Count - 1]); }
public Sprite GetElement(ControllerElementType elementType, int elementID, AxisRange range = AxisRange.Full, Pole axis = Pole.Positive) { if (elementType == ControllerElementType.Axis) { return(GetAxis(elementID, range, axis)); } else if (elementType == ControllerElementType.Button) { return(GetButton(elementID)); } return(null); }
public void RenderKey(int playerId, InputAction inputAction, AxisRange axisRange, ControllerType controllerType, ControllerMap map, ActionElementMap ele) { this.controllerType = controllerType; context = new InputMapper.Context() { actionId = inputAction.id, actionRange = axisRange, controllerMap = map, actionElementMapToReplace = ele }; this.map = map; elementMap = ele; RenderKey(); }
public void MapKey(InputAction action, AxisRange axisRange, int actionElementMapToReplaceId) { statusText.text = "Listening for input..."; MenuButtonNavigator.accept_inputs = false; controllerMap.DeleteElementMap(actionElementMapToReplaceId); inputMapper.Start( new InputMapper.Context() { actionId = action.id, controllerMap = controllerMap, actionRange = axisRange, actionElementMapToReplace = controllerMap.GetElementMap(actionElementMapToReplaceId) } ); }
private ElementAssignment ToElementAssignment( ControllerPollingInfo _pollingInfo, ModifierKeyFlags _modifierKeyFlag, AxisRange _axisRange, int _actionId, ActionElementMap _actionElementMap) { AxisRange axisRange = (AxisRange)1; if (((ControllerPollingInfo) ref _pollingInfo).get_elementType() == null) { axisRange = _axisRange != null ? (((ControllerPollingInfo) ref _pollingInfo).get_axisPole() != null ? (AxisRange)2 : (AxisRange)1) : (AxisRange)0; } return(new ElementAssignment(((ControllerPollingInfo) ref _pollingInfo).get_controllerType(), ((ControllerPollingInfo) ref _pollingInfo).get_elementType(), ((ControllerPollingInfo) ref _pollingInfo).get_elementIdentifierId(), axisRange, ((ControllerPollingInfo) ref _pollingInfo).get_keyboardKey(), _modifierKeyFlag, _actionId, _axisRange != 2 ? (Pole)0 : (Pole)1, false, _actionElementMap == null ? -1 : _actionElementMap.get_id())); }
private ActionEntry GetActionEntry(int mapCategoryId, int actionId, AxisRange axisRange) { if (actionId < 0) { return(null); } MapCategoryEntry entry; if (!entries.TryGet(mapCategoryId, out entry)) { return(null); } ActionEntry actionEntry = entry.GetActionEntry(actionId, axisRange); return(actionEntry); }
public void AddActionLabel(int mapCategoryId, int actionId, AxisRange axisRange, GUILabel label) { MapCategoryEntry entry; if (!entries.TryGet(mapCategoryId, out entry)) { return; } ActionEntry actionEntry = entry.GetActionEntry(actionId, axisRange); if (actionEntry == null) { return; } actionEntry.SetLabel(label); }
private void CreateUIRow(InputAction action, AxisRange actionRange, string label) { GameObject gameObject1 = (GameObject)Object.Instantiate <GameObject>((M0)this.textPrefab); gameObject1.get_transform().SetParent((Transform)this.actionGroupTransform); gameObject1.get_transform().SetAsLastSibling(); ((Text)gameObject1.GetComponent <Text>()).set_text(label); GameObject gameObject2 = (GameObject)Object.Instantiate <GameObject>((M0)this.buttonPrefab); gameObject2.get_transform().SetParent((Transform)this.fieldGroupTransform); gameObject2.get_transform().SetAsLastSibling(); this.rows.Add(new SimpleControlRemapping.Row() { action = action, actionRange = actionRange, button = (Button)gameObject2.GetComponent <Button>(), text = (Text)gameObject2.GetComponentInChildren <Text>() }); }
public bool Contains(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int fieldIndex) { ActionEntry actionEntry = GetActionEntry(mapCategoryId, actionId, axisRange); if(actionEntry == null) return false; return actionEntry.Contains(controllerType, fieldIndex); }
public void AddActionLabel(int mapCategoryId, int actionId, AxisRange axisRange, GUILabel label) { MapCategoryEntry entry; if(!entries.TryGet(mapCategoryId, out entry)) return; ActionEntry actionEntry = entry.GetActionEntry(actionId, axisRange); if(actionEntry == null) return; actionEntry.SetLabel(label); }
public void SetFixedFieldData(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int controllerId) { list.SetFixedFieldData(mapCategoryId, actionId, axisRange, controllerType, controllerId); }
public void SetFieldLabel(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int index, string label) { list.SetLabel(mapCategoryId, actionId, axisRange, controllerType, index, label); }
public bool Contains(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int fieldIndex) { return list.Contains(mapCategoryId, actionId, axisRange, controllerType, fieldIndex); }
public void SetFixedFieldData(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int controllerId) { ActionEntry entry = GetActionEntry(mapCategoryId, actionId, axisRange); if(entry == null) return; entry.SetFixedFieldData(controllerType, controllerId); }
public void PopulateField(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int controllerId, int index, int actionElementMapId, string label, bool invert) { ActionEntry entry = GetActionEntry(mapCategoryId, actionId, axisRange); if(entry == null) return; entry.PopulateField(controllerType, controllerId, index, actionElementMapId, label, invert); }
public void AddInputField(int mapCategoryId, InputAction action, AxisRange axisRange, ControllerType controllerType, int fieldIndex, GUIInputField inputField) { ActionEntry actionEntry = GetActionEntry(mapCategoryId, action, axisRange); if(actionEntry == null) return; actionEntry.AddInputField(controllerType, fieldIndex, inputField); }
private ActionEntry GetActionEntry(int mapCategoryId, InputAction action, AxisRange axisRange) { if(action == null) return null; return GetActionEntry(mapCategoryId, action.id, axisRange); }
private ActionEntry GetActionEntry(int mapCategoryId, int actionId, AxisRange axisRange) { if(actionId < 0) return null; MapCategoryEntry entry; if(!entries.TryGet(mapCategoryId, out entry)) return null; ActionEntry actionEntry = entry.GetActionEntry(actionId, axisRange); return actionEntry; }
public bool Matches(int actionId, AxisRange axisRange) { if(this.action.id != actionId) return false; if(this.axisRange != axisRange) return false; return true; }
public ActionEntry GetActionEntry(int actionId, AxisRange axisRange) { int index = IndexOfActionEntry(actionId, axisRange); if(index < 0) return null; return _actionList[index]; }
public void AddActionLabel(int mapCategoryId, int actionId, AxisRange axisRange, GUILabel label) { list.AddActionLabel(mapCategoryId, actionId, axisRange, label); }
public int IndexOfActionEntry(int actionId, AxisRange axisRange) { int count = _actionList.Count; for(int i = 0; i < count; i++) { if(_actionList[i].Matches(actionId, axisRange)) return i; } return -1; }
public GUIInputField GetGUIInputField(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int fieldIndex) { return list.GetGUIInputField(mapCategoryId, actionId, axisRange, controllerType, fieldIndex); }
public void AddInputFieldSet(int mapCategoryId, InputAction action, AxisRange axisRange, ControllerType controllerType, GameObject fieldSetContainer) { list.AddInputFieldSet(mapCategoryId, action, axisRange, controllerType, fieldSetContainer); }
public void PopulateField(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int controllerId, int index, int actionElementMapId, string label, bool invert) { list.PopulateField(mapCategoryId, actionId, axisRange, controllerType, controllerId, index, actionElementMapId, label, invert); }
public bool ContainsActionEntry(int actionId, AxisRange axisRange) { return IndexOfActionEntry(actionId, axisRange) >= 0; }
public void AddInputFieldSet(int mapCategoryId, InputAction action, AxisRange axisRange, ControllerType controllerType, GameObject fieldSetContainer) { ActionEntry actionEntry = GetActionEntry(mapCategoryId, action, axisRange); if(actionEntry == null) return; actionEntry.AddInputFieldSet(controllerType, fieldSetContainer); }
public ActionEntry AddAction(InputAction action, AxisRange axisRange) { if(action == null) return null; if(ContainsActionEntry(action.id, axisRange)) return null; // already used _actionList.Add(new ActionEntry(action, axisRange)); return _actionList[_actionList.Count - 1]; }
private ActionEntry AddActionEntry(int mapCategoryId, InputAction action, AxisRange axisRange) { if(action == null) return null; MapCategoryEntry entry; if(!entries.TryGet(mapCategoryId, out entry)) return null; return entry.AddAction(action, axisRange); }
public void AddInputField(int mapCategoryId, InputAction action, AxisRange axisRange, ControllerType controllerType, int fieldIndex, GUIInputField inputField) { list.AddInputField(mapCategoryId, action, axisRange, controllerType, fieldIndex, inputField); }
public void AddAction(int mapCategoryId, InputAction action, AxisRange axisRange) { AddActionEntry(mapCategoryId, action, axisRange); }
public ActionEntry(InputAction action, AxisRange axisRange) { this.action = action; this.axisRange = axisRange; this.actionSet = new InputActionSet(action.id, axisRange); fieldSets = new IndexedDictionary<int, FieldSet>(); }
public void AddAction(int mapCategoryId, InputAction action, AxisRange axisRange) { list.AddAction(mapCategoryId, action, axisRange); }
public bool Contains(int mapCategoryId, int actionId, AxisRange axisRange) { return GetActionEntry(mapCategoryId, actionId, axisRange) != null; }
public GUIInputField GetGUIInputField(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int fieldIndex) { ActionEntry actionEntry = GetActionEntry(mapCategoryId, actionId, axisRange); if(actionEntry == null) return null; return actionEntry.GetGUIInputField(controllerType, fieldIndex); }
public void SetLabel(int mapCategoryId, int actionId, AxisRange axisRange, ControllerType controllerType, int index, string label) { ActionEntry entry = GetActionEntry(mapCategoryId, actionId, axisRange); if(entry == null) return; entry.SetFieldLabel(controllerType, index, label); }