Cant Set Brush Color

Hey

I want to highlight Items in my Inventory. I have Item_Widget which holds my Items and a Grid Layout Widget which is my posible iventory slots.

When Im hovering over an Item_Widget I want to make the Background Border brighter with this code:

and this designer layout:
image

The weird thing is the print string gets printed when hovering over different items but the set brush color doesnt get executed. Maybe one of you knows why the brush color doesnt change.

Best regards
Alexs

It should work. Maybe the visibility is setup wrong for the surrounding elements? Maybe a parent canvas or size-box is set to visible instead of Not Hit-Testable?

Add a break-point (F9) to the mouse enter and leave and see if it all fires.

p.s.

Try hiding the ItemImage during a test to see if it’s not covering the border by any chance (set it’s visibility to none for one go)

Hey there @HerrSchnuffler! So for one, any item in the canvas will trigger the On Mouse enter and On Mouse Leave events you have here, but that may be intentional. Otherwise, nothing’s wrong with your BP here. I recreated it because I couldn’t tell what you’d done wrong. That said, I’d take a look around your BP to verify nothing is over it. There shouldn’t be any issues because you have a bounding box.

This is just a standard border right?

My Test:

Hey thank you for your replys. I checked all parent canvases and size boxes and they are set to Not Hit-Testable. I also I hide the Image but had no change.

Its also every complete standart SizeBox and Border.

I tried adding a new Border (Border_66) outside the Sizebox with no success. The weird thing there I can set the Brush Color at the On Initialize Event but after that in the On Mouse Events not.

I also added the On Mouse Button Down Event inside I made the same settup with change color and print string and also there the String gets printed but the color doesnt get changed.

Thank you very much for your help it was a classic Layer 8 Problem xD

In my Inventory Component I had a variable to trigger a refresh if a Item gets removed or added. After the check of the boolean I set this refresh bool to true instead of false. I got it after checking with the debugger through my scripts and noticed that my inventory gets refreshed multiple times a second. So the color couldnt change cause every frame the item widget gets deleted and replaced with a brand new one.

Thank you very much for your help with this silly mistake

2 Likes