Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] UMG mouse issues

(UE4.6 BTW) I'm trying to create a dialog menu system so that when the user "interacts" (defaults to right click) with a character, it will open up a menu. Before I try to do anything useful, I'm trying to get the basics down. So I created a simple menu that just has one button designed to close the menu.

The issue I have is that the mouse is not locked to the viewport and I can't get rid of it after the menu is closed. My common script in all attempts are interact->create widget->add to viewport First I tried a separate show mouse cursor on get player controler 0. In the widget the button removes the widget and reverses the show mouse controller. No luck the mouse is not bound to the window and is still visible afterword.

Then I tried changing show mouse cursor to set input mode UIOnly. I actually like this better as it forces you to complete the dialog before you can do anything else. Unfortunately it has the same problem. It correctly returns control back after close, but the mouse is still there.

In both cases if you click anywhere but the button, it vanishes. The mouse shouldn't vanish until the dialog menu is closed.

Product Version: Not Selected
more ▼

asked Nov 25 '14 at 03:02 AM in Using UE4

avatar image

241 19 31 41

avatar image awilliams1701 Nov 25 '14 at 03:37 AM

ok now randomly for no reason at all the mouse is disappearing with the menu closing. I swear I didn't change anything. Now my problem is that if I click anything but a button, the mouse vanishes. I have to get it back by hitting the windows key.

avatar image Rudy Q ♦♦ STAFF Dec 02 '14 at 04:04 PM

Hello awilliams1701,

I was unable to reproduce this issue. Would it be possible for you to provide a screen shot of your blueprints? This way I can see how it is you have your "Set show mouse" nodes set up.

avatar image awilliams1701 Dec 03 '14 at 12:20 AM

The only issue I'm still having is that if you click on anything other than the 2 buttons (one is a dummy that does nothing) the mouse disapears. However I noticed that the "Lock Mouse to Viewport" checkbox does nothing. In the screenshot its off, but even if its on it doesn't actually restrict to the viewport. I've tried both the main viewport and a new window. alt text

dialog_bp.png (280.7 kB)
avatar image Rudy Q ♦♦ STAFF Dec 03 '14 at 04:13 PM

Hello awilliams1701,

Have you tried setting your "Set Show Mouse Cursor" node to True after adding your widget to the viewport? You could then have it set to False when the widget is removed.

avatar image awilliams1701 Dec 03 '14 at 10:42 PM

I've done that too. From what I can tell there isn't much of a difference between "set input mode uionly" and "show mouse cursor" other than you can't move anymore. In both cases it actually releases the mouse from the window but it will still interact with the UI, but it will go to the desktop at that point no problem. If I make the mistake of clicking on the in game rendering rather than one of the buttons, the mouse vanishes and there is no way to get it back short of hitting the windows key or ctrl+esc.

avatar image Rudy Q ♦♦ STAFF Dec 04 '14 at 09:14 PM

Hello awilliams1701,

I was able to get this working using the following blueprint.

alt text

mouseshowhelp.png (73.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Dec 18 '14 at 09:31 PM by awilliams1701 for the following reason:

The question is answered, right answer was accepted

1 answer: sort voted first

Hello awilliams1701,

I haven't heard back from you in a few days, so I am marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and I will offer further assistance.

Make it a great day

more ▼

answered Dec 15 '14 at 10:07 PM

avatar image

Rudy Q ♦♦ STAFF
47.4k 545 132 525

avatar image awilliams1701 Dec 18 '14 at 09:31 PM

Took a while for me to be able to test this because until now my project had been crashing on launch. Apparently this sequence really makes the difference.

BTW: this engine hates objects with circular references. That's why it was crashing on launch. I had to remove and alter one of my blueprints to fix the issue.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question