public void SetActiveButton(GazeableButton activeButton) { if (currentActiveButton != null) { currentActiveButton.SetButtonColor(unselectedColor); } if (activeButton != null && currentActiveButton != activeButton) { currentActiveButton = activeButton; currentActiveButton.SetButtonColor(selectedColor); } else { Debug.Log("resetting"); currentActiveButton = null; } }
public void SetActiveButton(GazeableButton activeButton) { if (currentActiveButton != null) { currentActiveButton.SetButtonColor(unselectedColor); } if (activeButton != null && currentActiveButton != activeButton) { currentActiveButton = activeButton; currentActiveButton.SetButtonColor(selectedColor); } else { currentActiveButton = null; Player.Instance.ActiveMode = InputMode.NONE; } }
// this will basically set the active button and do the stuff // whenever any button is pressed it will set it to currentActiveButton public void SetActiveButton(GazeableButton activeButton) { // if we have curentlly any active button then it reset the color of the button 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(GazeableButton activeButton) { // If there was previously an active button, disable it. 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(GazeableButton activeButton) { //If there was a previous active button, disable it if (currentButton != null) { currentButton.SetButtonColor(unselectColor); } //If a new button is selected, make it current button if (currentButton != activeButton && activeButton != null) { currentButton = activeButton; currentButton.SetButtonColor(selectColor); } else { Debug.Log("Resetting"); currentButton = null; Player.instance.activeMode = InputMode.NONE; } } //end SetActiveButton