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"

Why is UMG button widget only clickable once?

I have a button. I created an on click event that spawns a print to screen (for testing) followed by spawning another widget to the screen ( a different widget). When I click the button the first time, I see the print to screen, and I see the new widget spawn. When I click a second time, I do not see the print to screen again. It is not being "clicked". Is there some way I need to reset the button after it has been clicked? When I test an ever simpler version by just putting a button on the screen and having it print when clicked, everything works fine. Why is creating this new widget making the button not usable?

Product Version: UE 4.13
more ▼

asked Oct 19 '16 at 01:38 PM in Blueprint Scripting

avatar image

966 143 150 390

avatar image Thumper Oct 19 '16 at 03:17 PM

This question can be simplified. if I spawn a widget using "Create Widget", how can I return the focus to the previous widget?

avatar image Doug E ♦♦ STAFF Oct 19 '16 at 05:42 PM

Hey Thumper-

Can you provide a screenshot of the setup that prints to the screen and adds the second widget to the screen? In my test my first widget has a button that, On Clicked, prints a message and adds a second widget. The printed message appears on screen each time I press the button.

avatar image Thumper Oct 19 '16 at 08:08 PM

alt text

widget.jpg (284.0 kB)
avatar image Thumper Oct 19 '16 at 08:10 PM

Also I've tried setting focus on the Widget that owns "Add Noise", I've done this immediately after the widget is spawned and also I've used the event Lost focus and set the focus back on it's self.

avatar image Doug E ♦♦ STAFF Oct 20 '16 at 02:22 PM

I'm having a hard time following what your screenshot is doing. Where is the print you were referring to? I also noticed that your OnClicked first runts into a branch check, how are you incrementing the Num Layers variable? I assume that the nodes shown are in the first widget class? What happens when yoiu click the AddNoise button when Num Layers does not equal 0?

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

1 answer: sort voted first

Even though the print isn't in the screen shot, it was there. You'll just have to trust me. I drew the line because I wanted to show where the print was located - immediately following the on clicked event. This morning I made a test where I create a button on the main widget, that on clicked spawns a second widget. During this test I noticed that I did not encounter the issue where the original widget button was no longer interacting with the mouse or clickable. This time everything worked. So I made it spawn the original widget in question and the problem occurred again. So the widget that was being spawned had an error or something in it prohibiting the original layer (widget button) was being accessed. To further complicate this I rebuild the widget from scratch basically copying over node for node and adjusting any naming issues along the way. I had several functions on this widget as well that I needed to rebuild too. It was not fun, and guess what, the rebuilt widget works fine. So I'm very confused. The only thing I can think is either the widget was corrupt/ broken, or I toggled something in the original that prohibited the button that spawned the widget from being usable anymore.

So I have a question and some feedback for you. Is there a toggle or option that could exist on the spawned widget that would make it behave this way? I kept the original widget so I can test more (because I want to know what the problem was).

The feedback is this (because I suspect the widget became broken by my usage, perhaps a copy/ paste kerfuffle), There needs to be a copy input parameters/. output parameters option. I had several functions that had many pins in and out. Even though drag dropping pins onto an empty "entry node" creates the type of input, it doesn't facilitate the naming. You can duplicate within the same class but not to copy of that class (that you may be using to rebuild the broken class).

more ▼

answered Oct 20 '16 at 02:39 PM

avatar image

966 143 150 390

avatar image elanishere Sep 26 '17 at 07:31 AM

I had this same problem and found the following solution... When I was triggering a screenshot, I was also adding an animation widget to simulate the shutter clapping in a DSLR viewfinder. What was happening is that the animation had a z-index set to "0" in the expanded settings of the "add to viewport" node in the CameraButton blueprint. Instead of destroying this animation widget that was covering my other widget UMG buttons/controls, I set the animation widget's, "add to viewport," node z-index integer to -100. When I set it to -2, I was still not able to interact with my MobileTouchInterface UI controls, but -100 seems to be behind them and works fine.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question