Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var openWindow : boolean = false;
- var windowRect : Rect = Rect (20, 20, 120, 50);
- OnMouseDown () {
- openWindow = ! openWindow;
- }
- OnGUI () {
- if (openWindow) {
- windowRect = GUI.Window (0, windowRect, DoMyWindow, "My Window");
- }
- }
- function DoMyWindow (windowID : int) {
- if (GUI.Button (Rect (10,20,100,20), "Hello World"))
- print ("Got a click");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement