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 get real mouse coordinates
Print
Pages: [
1
]
Author
Topic: How to get real mouse coordinates (Read 2649 times)
0 Members and 1 Guest are viewing this topic.
Felshire
Newbie
Posts: 6
How to get real mouse coordinates
«
on:
February 18, 2012, 07:58:52 am »
How do you get the real mouse coordinates??
I know how to get the mouse coordinates relative to the window, but I need the coordinates from the (0,0) point of the actual game. (Not window)
Ive been trying for like 3 hours
:C
Logged
Grimshaw
Hero Member
Posts: 631
Nephilim SDK
How to get real mouse coordinates
«
Reply #1 on:
February 18, 2012, 08:37:15 am »
Hint: the window has a function to convert local mouse coordinates to global ones according to the current view.
enjoy!
Logged
Indie game developer -
http://daevatheory.com/
Engine -
https://github.com/DevilWithin/Nephilim
http://www.packtpub.com/sfml-game-development/book
Felshire
Newbie
Posts: 6
How to get real mouse coordinates
«
Reply #2 on:
February 18, 2012, 09:20:49 am »
NVM
TOOK ME 4 HOURS
But I finally got it
Might want to update document because it says nothing about event MouseButton
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
How to get real mouse coordinates