- Home /
GUI Note taking box
Hey there! :)
Long story short, I have a project for school where I have to create a game, In the game I want to create a note taking box where people that play the game can take notes while they play the game. I've created so far a box where you can type something into it, but the problem s that I want to be able to resize it and drag it around on the screen
Here is the code that I've created so far:
var stringToEdit : String = "Notes Here";
function OnGUI () {
// Make a multiline text area that modifies stringToEdit.
stringToEdit = GUI.TextArea (Rect (10, 10, 200, 100), stringToEdit, 200);
stringToEdit = GUI.Window (0, String, DoMyWindow, "My Window");
}
// 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));
}
This is the code that i'm using but it just won't work :(
Any help would be so appreciated,
thank you!
E5indesign
Comment
Your answer
Follow this Question
Related Questions
How Do I make a Note Taking Box? 0 Answers
Applying a script to multiple gui boxes 0 Answers
GUI box problem? 0 Answers