예제 #1
0
        void OnGUI()
        {
            if (initialized)
            {
                EditorGUILayout.LabelField(tokenMethod, EditorStyles.whiteLargeLabel);
                username = EditorGUILayout.TextField(tokenMethod.usernameName, username);
                password = EditorGUILayout.PasswordField(tokenMethod.passwordName, password);

                if (GUILayout.Button("Login"))
                {
                    if (tokenMethod.action(registry, username, password))
                    {
                        CloseWindow();
                    }
                }

                if (GUILayout.Button("Close"))
                {
                    CloseWindow();
                }

                if (!string.IsNullOrEmpty(error))
                {
                    EditorGUILayout.HelpBox(error, MessageType.Error);
                }
            }
        }
예제 #2
0
        void OnGUI()
        {
            if (initialized)
            {
                EditorGUILayout.LabelField(tokenMethod, EditorStyles.whiteLargeLabel);
                username = EditorGUILayout.TextField(tokenMethod.usernameName, username);
                password = EditorGUILayout.PasswordField(tokenMethod.passwordName, password);

                if (GUILayout.Button("Login"))
                {
                    tokenMethod.action(registry, username, password);
                    CloseWindow();
                }

                if (GUILayout.Button("Close"))
                {
                    CloseWindow();
                }
            }
        }