Download

Get widget hovering over widget?

I have 4 widgets that are cursors for 4 controllers in local multiplayer, I also have a character selection screen in UMG with buttons for character portraits. Is there anyway to detect these buttons under the cursor widgets? (They are not mouse cursors, just 4 widgets that look like cursors that can move around in the UI). Perhaps there is a node I’m unaware of?

I found an isHovered node but I can’t seem to cast it to my CharacterSelect UI from the cursor UI

Definitely not in blueprints, you’ll need to dive into C++. Slate application is written to be mostly authoritative in marshaling input, therefore you need to have it be aware of you, and exclude you from clicks and the like. We don’t currently to my knowledge support multiple analog or mouse cursors, but modifying FSlateApplication to support multiple cursors probably wouldn’t be that hard, seeing as how a lot of the plumbing was necessary to support multitouch.

Is the correct way to control a widget as the mouse cursor. Further mods to the engine would allow you to register an input processor per user index, and similar work would need to be done to support registering a unique widget to represent each cursor entry per user. If you took apart FAnalogCursor, you’d see how it’s faking the mouse input, you could potentially ignore the work above entirely, if you made an IInputProcessor that did what FAnalogCursor did, but for 4 controllers, and gave unique user ids foreach cursor event it attempted to fake, and it’s possible, FSlateApplication will deal with it accordingly. Then it would just be on you to render the cursors at the appropriate locations since FSlateApplication only knows about the cursor position for a single user.

So that would in theory allow me to fake clicking for multiple cursors? I’ve already gotten 4 individual widgets to move independently with their registered controller id’s.

Thanks for the info!

EDIT: I think I’ll try creating this screen on a paper2dtile map or in a regular umap and then treat each pawn as a cursor instead. Then I can use collisions to detect which character portrait they are on.

EDIT2: This hack job of a method works nicely! Thanks for the knowledge though!