Multiple Mouse Cursors

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

Garibalde
Just popping in
Just popping in
Posts: 10
Joined: Tue Sep 14, 2010 17:50
Location: Montreal, Quebec
Contact:

Multiple Mouse Cursors

Postby Garibalde » Wed Aug 06, 2014 19:55

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
Garibalde
VIRMED Simulation Technologies Inc
http://www.virmedsim.com

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Multiple Mouse Cursors

Postby Ident » Wed Aug 06, 2014 20:40

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
CrazyEddie: "I don't like GUIs"

Garibalde
Just popping in
Just popping in
Posts: 10
Joined: Tue Sep 14, 2010 17:50
Location: Montreal, Quebec
Contact:

Re: Multiple Mouse Cursors

Postby Garibalde » Wed Aug 06, 2014 21:38

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.
Garibalde
VIRMED Simulation Technologies Inc
http://www.virmedsim.com

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Multiple Mouse Cursors

Postby Ident » Thu Aug 07, 2014 05:06

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?
CrazyEddie: "I don't like GUIs"

Garibalde
Just popping in
Just popping in
Posts: 10
Joined: Tue Sep 14, 2010 17:50
Location: Montreal, Quebec
Contact:

Re: Multiple Mouse Cursors

Postby Garibalde » Thu Aug 07, 2014 17:29

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.
Garibalde
VIRMED Simulation Technologies Inc
http://www.virmedsim.com

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Multiple Mouse Cursors

Postby Ident » Thu Aug 07, 2014 19:16

https://bitbucket.org/cegui/cegui/branch/v0

Check out the repository and update to v0 branch (the tip version)
CrazyEddie: "I don't like GUIs"

timotei
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Mon Apr 29, 2013 14:17

Re: Multiple Mouse Cursors

Postby timotei » Sat Oct 04, 2014 16:23

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?


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 19 guests