Beispiel #1
0
        public void DumpWrapped()
        {
            var stringBuilder = new StringBuilder();


            foreach (var icon in Icons)
            {
                var wrappedLines = LabelVisualizer.WrapText(icon.Description, MaxDescriptionSegmentLength);

                var lineIndex = 0;

                foreach (var line in wrappedLines)
                {
                    stringBuilder.AppendLine(String.Format("{0,4} |{1,-" + MaxDescriptionSegmentLength + "}|", lineIndex == 0 ? icon.Name : "", line));

                    lineIndex++;
                }

                if (lineIndex > 2)
                {
                    stringBuilder.AppendLine("^^^^^^^^^^^^^^^^^^^^^^^^^^^");
                }

                stringBuilder.AppendLine();
            }


            Debug.Log(stringBuilder.ToString());
        }
Beispiel #2
0
        public void ValidateLineSegments()
        {
            foreach (var icon in Icons)
            {
                var wrappedLines = LabelVisualizer.WrapText(icon.Description, MaxDescriptionSegmentLength);

                if (wrappedLines.Count > 2)
                {
                    Debug.LogError("Icon " + icon.Name + " has too many lines: (" + wrappedLines.Count + ", with max of 2).");
                    continue;
                }

                var lineIndex = 0;
                foreach (var line in wrappedLines)
                {
                    if (line.Length > MaxDescriptionSegmentLength)
                    {
                        Debug.LogError("Icon " + icon.Name + " has too many characters in line index " + lineIndex + ": (" + wrappedLines.Count + ", with max of 2).");
                    }

                    lineIndex++;
                }
            }
        }