public static void OpenMenuItem() { TextLocaliserGUIEditorSearchWindow window = new TextLocaliserGUIEditorSearchWindow(); window.titleContent = new GUIContent("Localiser Key Search"); window.ShowUtility(); }
static void DrawSearchButton(Rect position, SerializedProperty property) { Texture searchIcon = (Texture)Resources.Load("search"); GUIContent _content = new GUIContent(searchIcon); if (GUI.Button(position, _content)) { TextLocaliserGUIEditorSearchWindow.Open(property); } }
static void DrawSearchButton() { Texture searchIcon = (Texture)Resources.Load("search"); GUIContent _content = new GUIContent(searchIcon); if (GUILayout.Button(_content, GUILayout.MaxHeight(17), GUILayout.MaxWidth(17))) { TextLocaliserGUIEditorSearchWindow.Open(); } }
public static void Open(SerializedProperty property = null) { TextLocaliserGUIEditorSearchWindow window = new TextLocaliserGUIEditorSearchWindow(); window.titleContent = new GUIContent("Localiser Key Search"); Vector2 mouse = GUIUtility.GUIToScreenPoint(Event.current.mousePosition); Rect r = new Rect(mouse.x - 450, mouse.y + 10, 10, 10); window.ShowAsDropDown(r, new Vector2(500, 300)); window.property = property; window.isDropdown = true; }