public void SetActiveButton(GazeableButtons activeButton) { if (currentActiveButton != null) { currentActiveButton.SetButtonColor(unselectedColor); } if (activeButton != null && currentActiveButton != activeButton) { currentActiveButton = activeButton; currentActiveButton.SetButtonColor(selectedColor); } else { Debug.Log("Resetting"); currentActiveButton = null; Player.instance.activeMode = InputMode.NONE; } }
public void SetActiveButton(GazeableButtons activeButton) { //If there was a previously active Button, disable it. if (currentSelectedButton != null) { currentSelectedButton.SetButtonColor(unselectedColor); } if (activeButton != null && currentSelectedButton != activeButton) { currentSelectedButton = activeButton; currentSelectedButton.SetButtonColor(selectedColor); } else { Debug.Log("Resetting"); currentSelectedButton = null; SpaceShuttleSystemInstance.instance.activeMode = SpaceShuttleSystemInstance.InputModes.NONE; } }