Page 1 of 1

Multiple Mouse Cursors

Posted: Wed Aug 06, 2014 19:55
by Garibalde
Hi

I am looking to have two mouse cursors on screen at the same time controller by two different mouse inputs.
So basically i would like to have a left hand and a right hand mouse. Is this possible with CEGUI? Is there
an example for it somewhere i could look through?

Thanks

Re: Multiple Mouse Cursors

Posted: Wed Aug 06, 2014 20:40
by Ident
Hi,

Which version do you intend to use? Cegui currently has the v0-8 branch (ABI compatible), v0 branch (API compatible) and default (unstable development) branch as well as the latest stable releases (0.8.5) available.
In the v0 and default branch we have made big changes to the input system. The v0 branch is quite stable while the default branch is under constant development so it might be broken or semi-broken at times (we of course try to always keep everything working on every OS in every configuration but can't guarantee momentary issues). Timotei has made these changes to the input system so he probably can respond to this better, i will notify him of this thread. It might be possible that having multiple cursors is doable there, but I am not certain at all.

I can only speak for the latest stable Release (0.8.5) and the v0-8 branch in that regard and must say that these are not really prepared for multiple cursors. However, changes can definitely be done to make it work to some extent at least. What you can do at least is make a fake cursor using a CEGUI::Window that is attached to the root, and move it around. You could then provide click events manually. This of course requires some custom code in your application, and things like reacting to hovering wouldn't be covered, but it would be functional to a limited extent.

Other than that, I personally would find the discussed feature useful for a lot of purposes (virtual reality application, split screen or offline multiplayer games, online games with shared screens, etc). It would make a great addition to the library. In case v0 branch does not cover these changes already, or not to that extent you would want it to cover, I would like to mention the possibility of paid support: http://cegui.org.uk/paid-support .

I hope this helped,
Lukas

Re: Multiple Mouse Cursors

Posted: Wed Aug 06, 2014 21:38
by Garibalde
I am currently using 0.8.3 build with Ogre. I am looking into this feature exactly for virtual reality purpose. Its a hobby currently so paid support is not an option lol!!.. I dont get paid either, developing a proof of concept. But i will try out your idea of an additional cegui window and handling them two mouses via callbacks.

Any other info you can provide will be great.

Thanks.

Re: Multiple Mouse Cursors

Posted: Thu Aug 07, 2014 05:06
by Ident
I suggest you to switch to v0 branch. It should work with Ogre just the same way as 0.8.3 does and will most likely be prepared for this better. Do you want to switch?

Re: Multiple Mouse Cursors

Posted: Thu Aug 07, 2014 17:29
by Garibalde
Sure, can you tell me where the v0 branch is and i will switch. You mean by v0 as in v0.8.0?
I thought v0.8.3 was more recent than v0.8.0? Maybe i didnt understand you correctly. :( :shock:

Thanks.

Re: Multiple Mouse Cursors

Posted: Thu Aug 07, 2014 19:16
by Ident
https://bitbucket.org/cegui/cegui/branch/v0

Check out the repository and update to v0 branch (the tip version)

Re: Multiple Mouse Cursors

Posted: Sat Oct 04, 2014 16:23
by timotei
Hi,

With a bit of delay, I got to this thread by means of my TODO list (kindly inserted there by Ident :D)

So, the first thing is that most/many/all of the controls/widgets so far use the GUIContext's cursor to compute certain... operations, like how much to drag a list header, or where to put a Tooltip.

To implement multiple cursor, would be easy, at least from the API point of view, given that the GUIContext hold the reference to the current cursor(s).

But, a harder decision is related to the design of this system: how each widget would interpret a collection of multiple cursors? Have a default one and use that by default - to maintain current behaviour, while other custom controls would use the collection depending on their own logic? Or, perhaps, have multiple states for each cursor to allow proper logic - thinking here about something like a by-mouse-scrollable pane? What would be the logic in the case of the tooltip? Put it near the last active cursor? Use the default one thing?