Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
How to catch mouse
Print
Pages: [
1
]
Author
Topic: How to catch mouse (Read 2246 times)
0 Members and 1 Guest are viewing this topic.
Ockonal
Jr. Member
Posts: 58
How to catch mouse
«
on:
August 24, 2010, 09:10:52 am »
Hello, by default, mouse isn't catched by application, so I'm able to move cursor out the window area. How can I bind/catch it for my application?
Logged
Developing 2d engine&game using: sfml, box2d, librocket, spark2, zoom&zoost, thor
Mindiell
Hero Member
Posts: 1261
How to catch mouse
«
Reply #1 on:
August 24, 2010, 09:28:30 am »
Normally, there is a
sf::Window::SetCrsorPosition
.
But if you are using a windowed app, you should not, IMO, block the cursor (apart if you have a key (like escape maybe) to release the mouse).
Logged
Mindiell
----
newn
Guest
How to catch mouse
«
Reply #2 on:
August 24, 2010, 09:46:47 am »
http://www.sfml-dev.org/tutorials/1.6/graphics-views.php
This might be helpful, there's some code about the mouse... I'm a newbie myself, don't know if that's what you want, but maybe it'll help anyway.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
How to catch mouse
anything