private void toggle_quick_tag() { if (QuickTag.instance) { QuickTag.close(); } else { CraftManager.main_ui.open_quick_tag(); } }
protected override void key_event_handler() { Event e = Event.current; if (e.type == EventType.KeyDown) { //'esc' - close interface if (e.keyCode == KeyCode.Escape) { e.Use(); QuickTag.close(); } } }
public void Update() { if (CraftManager.use_editor_key_shortcuts && !CraftManager.main_ui.visible) { if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) { if (Input.GetKeyDown(KeyCode.O)) { CraftManager.main_ui.show(); } else if (Input.GetKeyDown(KeyCode.S)) { if (EditorLogic.fetch.saveBtn.enabled) { EditorLogic.fetch.saveBtn.onClick.Invoke(); ScreenMessages.PostScreenMessage("Craft Saved!"); } } else if (Input.GetKeyDown(KeyCode.N)) { EditorLogic.fetch.newBtn.onClick.Invoke(); } else if (Input.GetKeyDown(KeyCode.T)) { if (QuickTag.instance == null) { QuickTag.open(gameObject); } else { QuickTag.close(); } } } } }