InputDeviceManager.deviceUsesCursor override?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Snebjorn
Posts: 12
Joined: Sun Apr 17, 2016 4:33 pm

InputDeviceManager.deviceUsesCursor override?

Post by Snebjorn »

Hi,

Working on a project where I want the mouse cursor to always be rendered as a UI sprite (using my own scripts) and never have the system cursor showing, but it seems that InputDeviceManager insists on the system cursor when mouse input is detected.

The static property deviceUsesCursor is true if it detects mouse input. Is there a way to override this, apart from making changes to the InputDeviceManager class itself, which will be overwritten if I update DS at some point?

Not a huge problem, but I try to avoid changes to the framework.

[Edit] Just realised this also affects CursorLockMode - so the question is really: what's the best way to never show the system cursor, but still have normal mouse input?

Cheers,
Snebjørn
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: InputDeviceManager.deviceUsesCursor override?

Post by Tony Li »

Hi Snebjørn,

Untick the Input Device Manager's Control Cursor State checkbox.

If this checkbox is unticked, it won't lock the cursor or control its visibility.

Or you can remove the Input Device Manager component entirely if you prefer. However, if you do this, the Dialogue System's UIs will always auto-focus. That is, when the Dialogue System displays a response menu, it will make sure a response button has focus so you can navigate with joystick or keyboard, and similarly for quest log windows.
User avatar
Snebjorn
Posts: 12
Joined: Sun Apr 17, 2016 4:33 pm

Re: InputDeviceManager.deviceUsesCursor override?

Post by Snebjorn »

Doh - right there in front of my eyes the whole time ...

Thanks!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: InputDeviceManager.deviceUsesCursor override?

Post by Tony Li »

Glad to help!
Post Reply