I’m trying to do something that seemingly should work but I’m figuring that it clearly won’t, so my questions here are, basically, why it doesn’t work, and how it should be implemented.
What I’m doing is implementing a custom mouse cursor into the game which should change into a different graphic when the player pushes down the mouse button (and back when the mouse button is released). What I did was to create a widget with the mouse cursor graphic (two Images, one visible one invisible, which would then be alternated) and tried to detect when the mouse button is down… to no avail.
This is what I have now in the widget’s blueprint, which is just placeholder code to figure if the click is being detected (it’s not). I noticed that if I instance the widget into the game in any other way (inserting it into my title menu, for example) Listen for Input Action works, which leads me to the conclusion that it won’t work specifically when the widget is a software cursor, but I can’t understand why, especially because I know for a fact that the blueprint is running (the debugger will stop at a breakpoint in the Construct event, and I can do stuff like printing the mouse position in the Tick event).
So, again:
- Why doesn’t this work specifically in these conditions?
- How could this be done, then?