I’m making a test, where you can select mutiple buttons (actually artworks) before pressing “next page” - I just want to know how I can have two highlighted buttons at once without one of the highlight dissapering when clicking another button. Is it possible?
You can do it in many ways.
- By changing the sprites after clicking it.
- Set the Disabled color of Button component to the color which you want to see highlighted. Add a script with the following code on each button:
Button btn;
void Start()
{
btn = gameObject.GetComponent<Button> ();
btn.onClick.AddListener(TaskOnClick);
}
void TaskOnClick()
{
btn.interactable = false;
}
// but you can only tap once and you to enable the button interaction when coming back to this page