internal void open_quick_tag() { if (!QuickTag.instance) { QuickTag.open(gameObject); } }
private void toggle_quick_tag() { if (QuickTag.instance) { QuickTag.close(); } else { CraftManager.main_ui.open_quick_tag(); } }
private void Start() { instance = this; set_window_pos_from_settings(); prevent_click_through = true; alt_window_style = new GUIStyle(HighLogic.Skin.window); alt_window_style.padding.top = 8; //remove excess padding to hide titlebar window_title = ""; tags_menu_content.remote_data = tags_menu_data; tags_menu_content.special_items.Add("new_tag", "New Tag"); get_current_craft(); }
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(); } } } } }