예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TextControl"/> class.
        /// </summary>
        /// <param name="guiManager">The GUI manager this <see cref="Control"/> will be managed by.</param>
        /// <param name="position">Position of the Control reletive to its parent.</param>
        /// <param name="clientSize">The size of the <see cref="Control"/>'s client area.</param>
        /// <exception cref="ArgumentNullException"><paramref name="guiManager"/> is null.</exception>
        public TextBox(IGUIManager guiManager, Vector2 position, Vector2 clientSize) : base(guiManager, position, clientSize)
        {
            _numCharsToDraw.TextBox = this;
            _editableTextHandler = new EditableTextHandler(this);

            // Set the initial line length and number of visible lines
            UpdateMaxLineLength();
            UpdateMaxVisibleLines();
        }
예제 #2
0
파일: TextBox.cs 프로젝트: wtfcolt/game
        /// <summary>
        /// Initializes a new instance of the <see cref="TextControl"/> class.
        /// </summary>
        /// <param name="guiManager">The GUI manager this <see cref="Control"/> will be managed by.</param>
        /// <param name="position">Position of the Control reletive to its parent.</param>
        /// <param name="clientSize">The size of the <see cref="Control"/>'s client area.</param>
        /// <exception cref="ArgumentNullException"><paramref name="guiManager"/> is null.</exception>
        public TextBox(IGUIManager guiManager, Vector2 position, Vector2 clientSize) : base(guiManager, position, clientSize)
        {
            _numCharsToDraw.TextBox = this;
            _editableTextHandler    = new EditableTextHandler(this);

            // Set the initial line length and number of visible lines
            UpdateMaxLineLength();
            UpdateMaxVisibleLines();
        }