예제 #1
0
            public override void Write(FileWriter writer, LayoutHeader header)
            {
                long pos = writer.Position;

                base.Write(writer, header);
                writer.Write(TextLength);
                writer.Write(MaxTextLength);
                writer.Write(MaterialIndex);
                writer.Write(FontIndex);
                writer.Write(TextAlignment);
                writer.Write(LineAlignment, false);
                writer.Write(_flags);
                writer.Seek(1);
                long _ofsTextPos = writer.Position;

                writer.Write(0); //text offset
                writer.Write(FontForeColor.ToBytes());
                writer.Write(FontBackColor.ToBytes());
                writer.Write(FontSize);
                writer.Write(CharacterSpace);
                writer.Write(LineSpace);

                writer.WriteUint32Offset(_ofsTextPos, pos);
                if (RestrictedTextLengthEnabled)
                {
                    writer.WriteString(Text, MaxTextLength);
                }
                else
                {
                    writer.WriteString(Text, TextLength);
                }
            }
예제 #2
0
 public static string FontColor(this string input, FontForeColor color)
 {
     return("\x1b[" + (int)color + "m" + input + "\x1b[" + (int)FontForeColor.RESET + "m");
 }
예제 #3
0
파일: Utils.cs 프로젝트: vadian/Novus
 public static string FontColor(this string input, FontForeColor color)
 {
     return ("\x1b[" + (int)color + "m" + input + "\x1b[" + (int)FontForeColor.RESET + "m");
 }