Slate Custom Cursor problems

Guys,

Me and patricknegri have been trying to get our game’s custom cursor working, but for some reason the mouse events do not work when the cursor DISPLAY is off (Via PlayerController settings).

We have a video up showing our problem:

[video]https://dl.dropboxusercontent.com/u/17910607/SlateUI-CursorProblems.mp4[/video]

This is our cursor code:

This is how we are hiding the default cursor (Show Mouse Cursor is unchecked):

http://sc-cdn.scaleengine.net/i/ccaf2274e3d5345e701fdd6332801388.png

Any clues?

Bump!

Added more info to the topic!

Sorry it took me a while to get back to this! The extra info does help.

Could you enable the widget reflector, and see which widgets are getting hit when you have the cursor enabled and not enabled? That should go a long way toward helping us understand what’s going on. You can do that in game by typing ~WidgetReflector. Then select PickWidget and hover over the widgets in question.

Also, have you considered AnswerHUB for such questions?

Hey ! Thanks for your time.

We will take a look and post back the results.

About the AnswerHUB, we consider it always and search there and on the internet before asking questions (If you take a look, you will find some people with the same problems). The main problem is that we are now a bit advanced in such topics and we found the best way is to get in touch directly with guys with more experience. Its the price of being on the edge :frowning:

Best!

Ok . Just tested. It works exactly the same in both cases.

You can simulate the stuff said here very fast.

  1. Create a Player Controller in BluePrint, disable Show Mouse Cursor
  2. Create a basic HUD + Add a TextBox of Slate
  3. Test it with the Show enabled and with Show disabled.

I did what you suggested, and it did not seem to repro. However, I don’t think hiding the cursor via PlayerController is the preferred way.

The way to make the mouse cursor invisible in Slate is to have your widgets reply to QueryCursor() with ESlateMouseCursor::None. This can also be accomplished by setting the .Cursor properly to ESlateMouseCursor::None on a widget. The default for most widgets is TOptional<EMouseCursor>() , which is an unspecified value. This leaf-most widget to reply with anything other than the TOptional<EMouseCursor>() will win. So, you could just set this on some widget further up the hierarchy, it should be enough.