- Home /
How Do I make a Note Taking Box?
I've made a Box that can be dragged around, but I want to be able to write in the box for note taking :)
here is the code:
var windowRect : Rect = Rect (20, 20, 120, 50); var stringToEdit : String = "Hello World\nI've got 2 lines...";
function OnGUI () { // Register the window. windowRect = GUI.Window (0, windowRect, DoMyWindow, "My Window"); stringToEdit = GUI.TextArea (Rect (10, 10, 200, 100), stringToEdit, 200);
} // Make the contents of the window function DoMyWindow (windowID : int) { // Make a very long rect that is 20 pixels tall. // This will make the window be resizable by the top // title bar - no matter how wide it gets. GUI.DragWindow (Rect (0,0, 10000, 20)); }
Your post is probably too general for UnityAnswers. The UnityAnswers philosophy is:
"[Unity Answers] is a place to ask specific questions that have specific answers. The forum is a better place to post discussions and non-technical questions."
As a general rule, posts should probably have the following:
A clear question (what, specifically, are you trying to do?)
Relevant background information (what have you already tried? what other things might be important for us to know?)
Context information (what do you expect to happen? What is happening ins$$anonymous$$d?)
Your request (what specifically do you expect of the UnityAnswers community? Are you looking for links to relevant information, a chunk of code that you can use, ...?)
If your post is one of the following, you should consider changing it or asking on the forums ins$$anonymous$$d:
A one- or couple-sentence post, especially with a broad question ("how do I make a game like Halo?") or no discernible question ("WebPlayer doesn't allow me to save to disk"). We'll need more specific information to help you.
Asking the opinion of the community ("Best method to store files?"). $$anonymous$$uch better to discuss these on the forums.
A question that focuses on the end result, rather than anything technical ("how do I make a laser beam?"). These mean that you probably haven't done enough research. If you're just starting out and don't even know where to look, try searching here, the forums, and Google first and then posting your question to the forums. The Unity resources are a great place to start (http://unity3d.com/support/resources/). When you get to a more technical point ("how do I adjust the color of a line renderer for a laser beam?") we can probably help you.
A disjointed or incomplete question ("How do I make a jumping enemy? Physics doesn't look right."). It will help us if you take a moment to add some context information, background, and general explanation.
Of course, the members here are awesome folks and will probably try to help you anyway - hopefully you'll get an answer or some helpful comments. If not, now you know why.
Your answer
Follow this Question
Related Questions
GUI Note taking box 0 Answers
GUI box problem? 0 Answers
How to display a rectangle around a player? 1 Answer
Custom GUI.Box function dilemma 1 Answer
Strange behaviour GUI.Box 1 Answer