public override void hit(bool on, int ID = -1) { if (!on) { return; } if (ID == -4) //save { rootMenu.saveFile(filenames[curSelect]); clearPanels(); transform.gameObject.SetActive(false); } else if (ID == -2) //load { rootMenu.loadFile(filenames[curSelect]); clearPanels(); transform.gameObject.SetActive(false); } else if (ID == -3) //cancel { rootMenu.cancelFileMenu(); cancel(); } else { if (saveMode) { saveButton.SetActive(true); } else { loadButton.SetActive(true); } curSelect = ID; if (filenames[curSelect] != "[new file]") { updatePreview(); } else { if (previewTransform != null) { Destroy(previewTransform.gameObject); oldsavenote.SetActive(false); } } for (int i = 0; i < panels.Count; i++) { if (i != ID) { panels[i].keyHit(false); } } } }
public override void hit(bool on, int ID = -1) { if (!on) { return; } if (ID == -2) //okay { rootMenu.cancelFileMenu(); //not right transform.gameObject.SetActive(false); } else if (ID == 3) { bool b = !masterControl.instance.handlesEnabled; masterControl.instance.toggleHandles(b); string s = b ? "ENABLE POS LOCK" : "DISABLE POS LOCK"; handlepanel.label.text = s; handlepanel.newColor(b ? colorGreen : colorRed); } else if (ID == 4) { bool b = !masterControl.instance.jacksEnabled; masterControl.instance.toggleJacks(b); string s = b ? "ENABLE JACK LOCK" : "DISABLE JACK LOCK"; jackpanel.label.text = s; jackpanel.newColor(b ? colorGreen : colorRed); } else if (ID == 5) { bool b = !menuMgr.midiOutEnabled; menuMgr.toggleMidiOut(b); string s = b ? "DISABLE MIDI OUT" : "ENABLE MIDE OUT"; midipanel.label.text = s; midipanel.newColor(b ? colorRed : colorGreen); } else { curSelect = ID; masterControl.instance.updateWireSetting(curSelect); for (int i = 0; i < panels.Length; i++) { if (i != ID) { panels[i].keyHit(false); } } } }