Exemplo n.º 1
0
        private static void DrawSampleDeletionLabel(Rect rect, MulliganUserPreferences preferences)
        {
            var diffLabelStyle = new MulliganEditorGUIUtilities.DiffLabelStyle()
            {
                HideDiff            = false,
                OperationToShow     = DiffOperation.Deletion,
                DiffBackgroundColor = preferences.DeletionBackgroundColor,
                DiffTextColor       = preferences.DeletionTextColor,
            };

            var renameResult = CreateSampleTextForDiffOp(new string[] { "exampleSampleText", "exampleDeleted" }, DiffOperation.Deletion);

            MulliganEditorGUIUtilities.DrawDiffLabel(rect, renameResult, true, diffLabelStyle, SampleDiffLabelStyle);
        }
        private static void DrawSampleDeletionLabel(Rect rect, MulliganUserPreferences preferences)
        {
            var diffLabelStyle = new MulliganEditorGUIUtilities.DiffLabelStyle()
            {
                HideDiff            = false,
                OperationToShow     = DiffOperation.Deletion,
                DiffBackgroundColor = preferences.DeletionBackgroundColor,
                DiffTextColor       = preferences.DeletionTextColor,
            };

            var renameResult = new RenameResult();

            renameResult.Add(new Diff(LocalizationManager.Instance.GetTranslation("exampleThisIs") + " ", DiffOperation.Equal));
            renameResult.Add(new Diff(LocalizationManager.Instance.GetTranslation("exampleSampleText"), DiffOperation.Deletion));
            renameResult.Add(new Diff(" " + LocalizationManager.Instance.GetTranslation("exampleWithWords") + " ", DiffOperation.Equal));
            renameResult.Add(new Diff(LocalizationManager.Instance.GetTranslation("exampleDeleted"), DiffOperation.Deletion));

            MulliganEditorGUIUtilities.DrawDiffLabel(rect, renameResult, true, diffLabelStyle, SampleDiffLabelStyle);
        }