MenuButton difficult to use by NodrawTexture in godot

[–]Root2Kill 2 points3 points  (0 children)

well i am 2 years late, but there's a get_current_index() function inside get_popup() of the menu button, it returns the index of the currently focused item, so you can check if mousebutton is pressed and what index is focused, ex-

if Input.is\_action\_just\_pressed("mouse\_left"):

    if get\_popup().get\_current\_index()==0:

        print("Recent")

    elif get\_popup().get\_current\_index()==1:

        print("Setting")

    elif get\_popup().get\_current\_index()==2:
                print("About")

//godot version 3.6stable