Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Creating pop up window in unity

Discussion in 'Immediate Mode GUI (IMGUI)' started by jaycee09, Aug 11, 2010.

  1. jaycee09

    jaycee09

    Joined:
    Jun 24, 2010
    Posts:
    26
    Hi,

    A quick question.

    Does any body know the syntax for creating a pop up window. I basically want to have a small button on top left corner of my screen which when clicked, pops up a small window that shows all the different resources the player is left with. I want this window to stick out on top of my current scene and go off when i press an esc button.

    Thanks!
     
  2. rouhee

    rouhee

    Joined:
    Dec 23, 2008
    Posts:
    194
  3. jaycee09

    jaycee09

    Joined:
    Jun 24, 2010
    Posts:
    26
    yeah that was the first thing i wanted to do and i later figured out how to do it with GUI.window. But now, I want to pretty up the way it should appear over the scene. For instance, instead of just appearing from no where, i would like it to pop-out from a location and the window quickly grows to its size (or any interesting animation effect).....i just don;t know if it's possible in unity.

    Any help here?


    Thanks!
     
  4. AkilaeTribe

    AkilaeTribe

    Joined:
    Jul 4, 2010
    Posts:
    1,149
    Some kind of Lerp applied to the Rect of the GUI.Window. Some effect like window taskbar ? I think it is not impossible...
     
  5. Maker16

    Maker16

    Joined:
    Mar 4, 2009
    Posts:
    779
    Yeah. I would think if you set the size of the window Rect when it is fully openned, and then use a Lerp-ed scalar value on that Rect, that would essentially do what you want.