public override void OnInspectorGUI() { // show Trello info if setup if (Config == null || !Config.objectReferenceValue) { EditorGUILayout.LabelField("Easy Feedback is not yet configured!"); if (GUILayout.Button("Configure Now")) { ConfigWindow.Init(); } } else { EFConfig config = Config.objectReferenceValue as EFConfig; if (string.IsNullOrEmpty(config.Token)) { EditorGUILayout.LabelField("Not authenticated with Trello!"); if (GUILayout.Button("Authenticate Now")) { ConfigWindow.Init(); } } } base.OnInspectorGUI(); }
public static void Init() { // get existing window or make a new one ConfigWindow window = GetWindow <ConfigWindow>(true, WINDOW_TITLE); // set window size window.maxSize = new Vector2(WIDTH, HEIGHT); window.minSize = window.maxSize; }
public static NewBoardWindow GetWindow(ConfigWindow configWindow) { NewBoardWindow window = GetWindow <NewBoardWindow>(true, WINDOW_TITLE); window.SetConfigWindow(configWindow); // set window size window.minSize = new Vector2(WIDTH, HEIGHT); window.maxSize = window.minSize; return(window); }
/// <summary> /// Called when the window is shown by the ConfigWindow /// </summary> /// <param name="configWindow"></param> public void SetConfigWindow(ConfigWindow configWindow) { this.configWindow = configWindow; }