Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Custom PopUp, but pop menu position is weird

Discussion in 'Immediate Mode GUI (IMGUI)' started by ganquan109, Apr 26, 2016.

  1. ganquan109

    ganquan109

    Joined:
    Jan 20, 2015
    Posts:
    13
    I try to select call event with PopUp, I use code :

    for (int i = 0; i < btnList.Count; i++)
    names.Add( btnList.target.GetType().Name+"/"+ btnList.name);

    myTarget.mCallIndex = EditorGUILayout.Popup(myTarget.mCallIndex, names );

    and the pop menu look good when it start:


    but,when i select the menu at bottom, the pop position is not from the popup button:



    how to make the popup position start on the pop button?
     
    Last edited: Apr 27, 2016
  2. crispybeans

    crispybeans

    Joined:
    Apr 13, 2015
    Posts:
    210
    You might be able to find a way to tweak it however they are OSX specific popup's and depending on the position of the window and how much space there is to the left or right you will experience that they move around.