Advertisement
LittleAngel

Window

Apr 27th, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. var openWindow : boolean = false;
  2. var windowRect : Rect = Rect (20, 20, 120, 50);
  3.  
  4. OnMouseDown () {
  5. openWindow = ! openWindow;
  6. }
  7.  
  8. OnGUI () {
  9. if (openWindow) {
  10. windowRect = GUI.Window (0, windowRect, DoMyWindow, "My Window");
  11. }
  12. }
  13.  
  14. function DoMyWindow (windowID : int) {
  15. if (GUI.Button (Rect (10,20,100,20), "Hello World"))
  16. print ("Got a click");
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement