void BuildComponents()
        {
            VisualElement root = rootVisualElement;

            root.Clear();
            mTabView = new TabView();

            mSignInPanel = new SignInPanel(
                this,
                sRestApi,
                sCmConnection);

            mSSOSignUpPanel = new SSOSignUpPanel(
                this,
                sRestApi,
                sCmConnection);

            mTabView.AddTab(
                PlasticLocalization.GetString(PlasticLocalization.Name.SignIn),
                mSignInPanel).clicked += () =>
            {
                mIsOnSignIn  = true;
                titleContent = new GUIContent(GetWindowTitle());
            };
            mTabView.AddTab(
                PlasticLocalization.GetString(PlasticLocalization.Name.SignUp),
                mSSOSignUpPanel).clicked += () =>
            {
                mIsOnSignIn  = false;
                titleContent = new GUIContent(GetWindowTitle());
            };

            root.Add(mTabView);
            if (sAutoLogin)
            {
                mSignInPanel.SignInWithUnityIdButtonAutoLogin();
            }
        }
Ejemplo n.º 2
0
        internal void BuildComponents()
        {
            VisualElement root = rootVisualElement;

            root.Clear();
            mTabView = new TabView();

            mSignInPanel    = new SignInPanel(this);
            mSSOSignUpPanel = new SSOSignUpPanel(this, mRestApi);

            mTabView.AddTab(
                PlasticLocalization.GetString(PlasticLocalization.Name.Login),
                mSignInPanel);
            mTabView.AddTab(
                PlasticLocalization.GetString(PlasticLocalization.Name.SignUp),
                mSSOSignUpPanel).clicked += () =>
            {
                titleContent = new GUIContent(
                    PlasticLocalization.GetString(PlasticLocalization.Name.SignUp));
            };

            root.Add(mTabView);
        }