Game Development Community

Text in a window

by Jacob Clark · in Torque X 2D · 05/21/2008 (4:27 pm) · 1 replies

Ok guys basically i want to use user keyboard input to type something in the window. It will show up in a box sort of like on IE. When the text box is clicked you can type in it and it will show what you have typed. When done you hit enter and there will be an out put box right above this. It will spawn the text you just entered, and then give you feed back, such as a command of some kind or a password. I know how to do this with the console but it seems that i cant use Console.Writeline in torque. I want this to be on a background and look nice with a nice font and such so x builder will be involved. I do have TGB but i would like to use C# to create this because i already know alot of it and i think it would be easier. Most of my code will be one large array....

Anyway i need a way to do input and show out put using simple text preferably with out images because this can become very tedious when working with 26 images 1 for each letter, and also when alot of the text im going to be showing are from varibles.

Thanks
Jake

#1
05/21/2008 (11:10 pm)
In Torque X, you probably want to use GUIText and GUITextEdit.

Or DrawUtil.JustifiedText or FontRenderer.Instance.DrawString etc.