public void buttonclicked(UIclass button) { if (button.buttonid == 1) { currentselection.GetComponent <Interactable>().destroychild(); currentselection.GetComponent <Interactable>().applychild(3); } if (button.buttonid == 2) { currentselection.GetComponent <Interactable>().destroychild(); currentselection.GetComponent <Interactable>().applychild(2); } if (button.buttonid == 3) { currentselection.GetComponent <Interactable>().destroychild(); currentselection.GetComponent <Interactable>().applychild(8); } if (button.buttonid == 4) { currentselection.GetComponent <Interactable>().destroychild(); currentselection.GetComponent <Interactable>().applychild(7); } // -------------------------- // delete button with confirm if (button.buttonid == 6) { UIconfirm = true; } if (button.buttonid == 7 && UIconfirm == true) { currentselection.GetComponent <Interactable>().destroychild(); UIconfirm = false; } }
public void uiHide(int id, bool hide) { UIclass indexer = GetItem(id); if (hide) { indexer.buttonobj.transform.position = indexer.buttonobjoriginal; } else { indexer.buttonobj.transform.position = indexer.buttonobjhidden; } }