Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Multiple mouse inputs?
Print
Pages: [
1
]
Author
Topic: Multiple mouse inputs? (Read 4400 times)
0 Members and 1 Guest are viewing this topic.
ath88
Newbie
Posts: 12
Multiple mouse inputs?
«
on:
August 18, 2013, 10:41:29 pm »
Hello there,
I am interesting in receiving several mouse pointer inputs for a project i am working on. Will there be any way to make this work in SFML? I tried searching, but came up empty-handed.
Regards, ath88
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: Multiple mouse inputs?
«
Reply #1 on:
August 18, 2013, 10:51:23 pm »
This is not supported in SFML.
Can you tell me more about your use case? I can't think of any useful case where multiple mice would be used, except in academic projects.
Logged
Laurent Gomila - SFML developer
ath88
Newbie
Posts: 12
Re: Multiple mouse inputs?
«
Reply #2 on:
August 18, 2013, 10:57:16 pm »
It is a simple arcade-type game with multiple players at the same screen. The player entity is moved with the mouse, so multiple players will require multiple mice. Imagine a split-screen game.
I would imagine that it might be possible to get some kind of device-identification passed along with a move-event. Perhaps some USB device library could help me.
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: Multiple mouse inputs?
«
Reply #3 on:
August 18, 2013, 11:16:41 pm »
What SFML gives you is the pointer events; can you even have multiple mouse pointers in any desktop OS? To be honest I don't know much about how OSes and their libraries handle multiple mice, but you may have to handle things at a lower level.
Logged
Laurent Gomila - SFML developer
ath88
Newbie
Posts: 12
Re: Multiple mouse inputs?
«
Reply #4 on:
August 18, 2013, 11:25:53 pm »
I guess SFML gives me the pointer events from the OS device driver, which normally only supports a single pointer. As with laptops with a connected mouse, both touch pad and mouse controls the same pointer. But since mice are 'just' USB devices, it should be possible to get the events directly from there via some USB device library.
I see that SFML can not help me here. Thank you for your help.
Logged
spacechase0
Newbie
Posts: 39
Re: Multiple mouse inputs?
«
Reply #5 on:
August 19, 2013, 12:56:54 am »
You might be able to use
ManyMouse
. It also has a zlib license. It seemed to work well when I tried it.
Logged
ath88
Newbie
Posts: 12
Re: Multiple mouse inputs?
«
Reply #6 on:
August 19, 2013, 02:34:37 pm »
ManyMouse looks perfect! I will post here when i know how it cooperates with SFML.
Regards
Logged
ath88
Newbie
Posts: 12
Re: Multiple mouse inputs?
«
Reply #7 on:
August 08, 2014, 02:20:14 am »
For future reference and people searching, this is indeed possible.
I've got a slightly long minimal example here:
https://github.com/ath88/MMSFML
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
Multiple mouse inputs?
anything