예제 #1
0
        public Textbox(float ScrX, float ScrY, float Width, float Height, int MaxLength, bool GradualAppear, Font NewFont)
        {
            X = ScrX;
            Y = ScrY;
            BoxWidth = Width;
            BoxHeight = Height;
            MaxTextLength = MaxLength;
            TextGraduallyAppears = GradualAppear;
            ChosenFont = NewFont;

            // Create Box Graphic at the right size :D
            Graphic = Image.CreateRectangle((int)Width, (int)Height, Color.Black);
            Graphic.Scroll = 0;

            // Create RichText
            Text = new RichText("");

            // Add borders & corners
        }
예제 #2
0
파일: Text.cs 프로젝트: voiddaek/STD
 /// <summary>
 /// Create a new Text object.
 /// </summary>
 /// <param name="str">The string to display.</param>
 /// <param name="font">The Font to use.</param>
 /// <param name="size">The size of the font.</param>
 public Text(string str, Font font, int size = 16) : base() {
     Initialize(str, font.font, size);
 }