protected virtual void ActionInput() { if (!Game.GameActive) { return; } if (UIRadialMenu.Active) { for (int i = 0; i < _numericKeys.Length; i++) { if (Input.GetKeyDown(_numericKeys[i])) { UIRadialMenu.Confirm(i); } } return; } if (InputSystem.GetButtonDown(BaseControls.Use)) { if (!WorldControlMonitor.Use()) { UICenterButton.TryClickEvent(); } } }
public override void Init(UIRadialMenu radialMenu, float targetAngle) { base.Init(radialMenu, targetAngle); ClearList(); Radial.SetCenterText(Description); Populate(targetAngle); _cursorOffset = _elementAngleDeg / 2.0f; TransitionSetup(true); }
public void AssignParent(UIRadialMenu menu, int index, MenuAction menuAction) { //_parentRm = menu; //_assignedIndex = index; _label = menuAction.Description; if (menuAction.Icon != null) { _icon.overrideSprite = menuAction.Icon; _textLabel.gameObject.SetActive(false); _icon.gameObject.SetActive(true); } else { _textLabel.text = _label; _textLabel.gameObject.SetActive(true); _icon.gameObject.SetActive(false); } _cg.blocksRaycasts = false; SetAlpha(0); ResetScale(); }
void Awake() { _main = this; PanelTransform = transform as RectTransform; }