コード例 #1
0
ファイル: Textbox.cs プロジェクト: DrMelon/SpaceQuestionmark
        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);
 }