public void rebind() { activated = true; rebindVisual.Active = true; rebindVisual.writeText(0, 0, "Please press the key you wish to assign to LEFT", visualFront, visualBack); keyToRebind = Input.ButtonKind.Left; Input.Instance.RebindKey(Input.ButtonKind.Left); }
private void rebindNext() { rebindVisual.localPositions.Clear(); switch (keyToRebind) { case Input.ButtonKind.Left: rebindVisual.writeText(0, 0, "Please press the key you wish to assign to DOWN", visualFront, visualBack); keyToRebind = Input.ButtonKind.Down; Input.Instance.RebindKey(Input.ButtonKind.Down); break; case Input.ButtonKind.Down: rebindVisual.writeText(0, 0, "Please press the key you wish to assign to UP", visualFront, visualBack); keyToRebind = Input.ButtonKind.Up; Input.Instance.RebindKey(Input.ButtonKind.Up); break; case Input.ButtonKind.Up: rebindVisual.writeText(0, 0, "Please press the key you wish to assign to RIGHT", visualFront, visualBack); keyToRebind = Input.ButtonKind.Right; Input.Instance.RebindKey(Input.ButtonKind.Right); break; case Input.ButtonKind.Right: rebindVisual.writeText(0, 0, "Please press the key you wish to assign to CONFIRM", visualFront, visualBack); keyToRebind = Input.ButtonKind.Confirm; Input.Instance.RebindKey(Input.ButtonKind.Confirm); break; case Input.ButtonKind.Confirm: rebindVisual.writeText(0, 0, "Please press the key you wish to assign to CANCEL", visualFront, visualBack); keyToRebind = Input.ButtonKind.Cancel; Input.Instance.RebindKey(Input.ButtonKind.Cancel); break; case Input.ButtonKind.Cancel: rebindVisual.localPositions.Clear(); rebindVisual.Active = false; activated = false; optionsObject.returnFocus(); Input.Instance.SaveCurrentBindings(); break; default: break; } }