示例#1
0
        internal ViewSwitcher(
            WorkspaceInfo wkInfo,
            ViewHost viewHost,
            bool isGluonMode,
            PlasticGui.WorkspaceWindow.PendingChanges.PendingChanges pendingChanges,
            NewIncomingChangesUpdater developerNewIncomingChangesUpdater,
            GluonNewIncomingChangesUpdater gluonNewIncomingChangesUpdater,
            IIncomingChangesNotificationPanel incomingChangesNotificationPanel,
            IAssetStatusCache assetStatusCache,
            NotificationDrawer notificationDrawer,
            EditorWindow parentWindow)
        {
            mWkInfo         = wkInfo;
            mViewHost       = viewHost;
            mIsGluonMode    = isGluonMode;
            mPendingChanges = pendingChanges;
            mDeveloperNewIncomingChangesUpdater = developerNewIncomingChangesUpdater;
            mGluonNewIncomingChangesUpdater     = gluonNewIncomingChangesUpdater;
            mIncomingChangesNotificationPanel   = incomingChangesNotificationPanel;
            mAssetStatusCache   = assetStatusCache;
            mNotificationDrawer = notificationDrawer;
            mParentWindow       = parentWindow;

            mPendingChangesTabButton  = new TabButton();
            mIncomingChangesTabButton = new TabButton();
            mChangesetsTabButton      = new TabButton();
            mHistoryTabButton         = new TabButton();
        }
示例#2
0
        static void DoHeader(
            WorkspaceInfo workspaceInfo,
            PlasticGUIClient plasticClient,
            IMergeViewLauncher mergeViewLauncher,
            IGluonViewSwitcher gluonSwitcher,
            bool isGluonMode,
            IIncomingChangesNotificationPanel incomingChangesNotificationPanel)
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);

            GUILayout.Label(
                plasticClient.HeaderTitle,
                UnityStyles.PlasticWindow.HeaderTitleLabel);

            GUILayout.FlexibleSpace();

            DrawIncomingChangesNotificationPanel.ForMode(
                workspaceInfo, plasticClient,
                mergeViewLauncher, gluonSwitcher, isGluonMode,
                incomingChangesNotificationPanel.IsVisible,
                incomingChangesNotificationPanel.Data);

            //TODO: Codice - beta: hide the switcher until the update dialog is implemented
            //DrawGuiModeSwitcher.ForMode(
            //    isGluonMode, plasticClient, changesTreeView, editorWindow);

            EditorGUILayout.EndHorizontal();
        }
示例#3
0
        internal static void For(
            WorkspaceInfo workspaceInfo,
            WorkspaceWindow workspaceWindow,
            IMergeViewLauncher mergeViewLauncher,
            IGluonViewSwitcher gluonSwitcher,
            bool isGluonMode,
            IIncomingChangesNotificationPanel notificationPanel)
        {
            var barStyle = new GUIStyle();

            var barTexture = GetBarTexture();

            barTexture.SetPixel(0, 0, UnityStyles.Colors.BackgroundBar);
            barTexture.Apply();

            barStyle.normal.background = barTexture;

            EditorGUILayout.BeginVertical(barStyle, GUILayout.Height(mBarHeight));
            GUILayout.FlexibleSpace();

            EditorGUILayout.BeginHorizontal();

            if (notificationPanel.IsVisible)
            {
                DrawIncomingChangesNotificationPanel.For(
                    workspaceInfo,
                    workspaceWindow,
                    mergeViewLauncher,
                    gluonSwitcher,
                    isGluonMode,
                    notificationPanel.IsVisible,
                    notificationPanel.Data);
            }

            GUILayout.FlexibleSpace();

            DrawStatusBarIcon();
            DrawStatusBarLabel(workspaceWindow.WorkspaceStatus);

            EditorGUILayout.EndHorizontal();

            GUILayout.FlexibleSpace();
            EditorGUILayout.EndVertical();
        }
示例#4
0
 internal ViewSwitcher(
     WorkspaceInfo wkInfo,
     ViewHost viewHost,
     bool isGluonMode,
     PlasticGui.WorkspaceWindow.PendingChanges.PendingChanges pendingChanges,
     NewIncomingChangesUpdater developerNewIncomingChangesUpdater,
     GluonNewIncomingChangesUpdater gluonNewIncomingChangesUpdater,
     IIncomingChangesNotificationPanel incomingChangesNotificationPanel,
     EditorWindow parentWindow)
 {
     mWkInfo         = wkInfo;
     mViewHost       = viewHost;
     mIsGluonMode    = isGluonMode;
     mPendingChanges = pendingChanges;
     mDeveloperNewIncomingChangesUpdater = developerNewIncomingChangesUpdater;
     mGluonNewIncomingChangesUpdater     = gluonNewIncomingChangesUpdater;
     mIncomingChangesNotificationPanel   = incomingChangesNotificationPanel;
     mParentWindow = parentWindow;
 }