如何为XNA创建输入框(how to Create an XNA Textbox)

Introduction 

As there was no text box in the XNA environment I was forced to create a text box by myself, and wanted to share the solution here for programmers.

Using the Code 

First think that we need to draw our text, so what do we need to wrap text in a rectangle? Below is my source code to wrap text in a rectangle by width. So the spirtfont is for measurement purposes, text is what you want to wrap in the textbox, and maxLineWidth is the parameter for the width of the TextBox.

参考:http://xiebaochun.github.io/blog/2013/09/16/how-to-create-an-xna-textbox/

原文地址:https://www.cnblogs.com/xiebaochun/p/3329627.html