x

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"

"consume mouse wheel" problem

Hello

i have a problem to change "consume mouse wheel " to be "never " Can you help me ? Thanks so much !

exampel: https://i.ibb.co/HCxP7YR/example.jpg

Product Version: UE 4.14
Tags:
more ▼

asked Mar 26 '19 at 08:24 PM in Using UE4

avatar image

Aliensa
8 3

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

3 answers: sort voted first

Hi Aliensa

You can set "Consume Mouse Wheel" directly in the details panel like this:

alt text

If you are creating the scroll box at run time, setting this requires a custom scroll box class. For some reason, the dev team never exposed a "Set Consume Mouse Wheel" function to blueprints, which means you cannot dynamically set it at run time.

To get around this, you can create a custom scroll box object, disable "Consume Mouse Wheel" by default, and use that object instead.

1) In the content browser, right click -> Selelct "New Blueprint Class".

2) Expose all classes and search for "Scroll Box"

alt text

3) Open the widget class you have just created and set the default value for "ConsumeMouseWheel"

4) Go back to your main widget blueprint graph. Instead of creating the normal scroll box, create an instance of your object instead. Right-click -> Construct object from class -> Select your custom class

alt text

Do a simple print just to test:

alt text

alt text

Note you can also use your custom scroll box in the widget designer as well. Just search for it in your pallet.

I hope this helps.

Good luck! :)

more ▼

answered Mar 26 '19 at 11:37 PM

avatar image

Alekann01
441 4 5 6

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

Thanks so much for the answer Alekann01 !

I really appreciate your great answer. But i need to change the"Set Consume Mouse Wheel" dynamic . For example in my level BP i have added "Any key" event .Also I have Widget with scrollBox with few buttons . If i use mouse wheel in the scrollBox i get key info from "Any Keys" only on the top and end of the scroll Box. But if i set "Set Consume Mouse Wheel" to be never and use scroll with mouse wheel i always getting key info from "Any Key " event .

BTW: I try to make key binds option in UE 4.14 And when i click on the button in the scrollBox i want "Any key" event to detect mouse wheel .

I hope all this make sens

Thanks alot !

more ▼

answered Mar 27 '19 at 08:12 AM

avatar image

Aliensa
8 3

avatar image Alekann01 Mar 27 '19 at 09:57 AM

Hi Aliensa

I have just had a look at the source code for the scroll box widget. The property is only applied when the widget is constructed or rebuilt, this is why they have made "ConsumeMouseWheel" read-only.

For the times where you don't want the user to be able to scroll, you can set the widget visibility to "Self-Hit Test Invisible", which will stop the scroll box from being seen by any input event. (You might need to ensure the scroll box isn't focussed as well).

If you have created an event ("Any Keys") which responds to any keyboard or mouse event fired, I think it will still get triggered regardless of your scroll box being enabled or not, however, I would need to see your setup for this to confirm 100%.

Play around with the visibility settings and see if you can get the results, but I strongly suspect you will need a workaround for your "Any Keys" event to not fire on MouseWheel inputs. If you're still struggling, could you explain exactly what you're trying to achieve, there might be a different approach I could suggest.

Good luck! :)

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

Hey Alekann01

Thanks again ! . I try some of the things that you recommended with the visibility and i get the result that i wanted .

Thanks so much

more ▼

answered Mar 27 '19 at 10:04 PM

avatar image

Aliensa
8 3

avatar image Alekann01 Mar 27 '19 at 10:16 PM

Hi Aliensa. That's great news! Would you mind marking my answer as correct so other people can find this thread if they encounter the same problem.

Glad I could help. Good luck with the rest of your project! :)

(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