Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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:
    11
    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.
     
unityunity