Mouse input not working on PopupMenu

PopeRigbyPopeRigby Posts: 41Member
in GUI

I have a PopupMenu node that has a few buttons as children that I'm using to make a pause menu that can be activated in-game by pressing Esc. The only problem is mouse input won't work on this menu. The buttons aren't detecting input from left click. I tried putting the player's input handling into _unhandled_input() because they player also uses left click for shooting, but that didn't work either.

Best Answer

  • PopeRigbyPopeRigby Posts: 41
    Accepted Answer

    I think I'm going to scrap what I've made currently and try and follow a tutorial on it. I'll post here again if it's still not working.

Answers

  • MegalomaniakMegalomaniak Posts: 2,618Admin

    Whats their pause mode?

  • PopeRigbyPopeRigby Posts: 41Member

    Process

  • MegalomaniakMegalomaniak Posts: 2,618Admin

    On the buttons, right? What about the rest of the nodes that make up the menu?

  • PopeRigbyPopeRigby Posts: 41Member

    I set it to process on the PopupMenu node. All the buttons are children of PopupMenu.

  • TwistedTwiglegTwistedTwigleg Posts: 2,635Admin

    Are there any nodes that cover the entire screen and/or the popup? If so, I would double check that their input filter is set to something like ignore so it does not capture mouse clicks. I'm not sure if that is causing the issue here, but it might be something to double check.

  • PopeRigbyPopeRigby Posts: 41Member

    Nothing is covering the entire screen that I can see.

  • TwistedTwiglegTwistedTwigleg Posts: 2,635Admin

    When you hover the mouse over the buttons, does the UI change a little in response? It should become a tad brighter when the mouse is over it. If it becomes brighter with the mouse over it but still does not allow clicks, then it is the click itself that is being lost. If it does not become brighter, then the mouse is not being seen correctly by the UI. I do not know how helpful knowing this will be, but it might help narrow down what is causing the issue.

  • PopeRigbyPopeRigby Posts: 41Member

    The buttons don't react to me hovering over them. Also, the first button, which is resume, is always highlighted no matter where I move my mouse.

  • TwistedTwiglegTwistedTwigleg Posts: 2,635Admin

    Hmm, strange. Does the main control, presumably used to place the health/lifebar in the top left corner of the screen, have a mouse filter set to ignore/pass? Maybe it is covering the whole thing and that is causing the UI to not work.

    Another thing to try is making the pause menu, but not actually pausing the game. This can help narrow down if pausing the game itself is causing the issue. If it works when the game is not paused, then it is likely something with the process mode that is causing the issue, while if it does not, then it is likely something with the UI setup.

  • PopeRigbyPopeRigby Posts: 41Member
    Accepted Answer

    I think I'm going to scrap what I've made currently and try and follow a tutorial on it. I'll post here again if it's still not working.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file