Created
May 27, 2010 13:40
-
-
Save svenstaro/415806 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SFML/Window.hpp> | |
#include <iostream> | |
int main() { | |
size_t windowHnd = 0; | |
MyOgreWin->getCustomAttribute("WINDOW", &windowHnd); | |
sf::Window MyWindow(windowHnd); | |
const sf::Input& MyInput = MyWindow.GetInput(); | |
while(true) { | |
std::cout << "x: " << MyInput.GetMouseX() << " y: " << MyInput.GetMouseY() << std::endl; | |
sf::Event Event; | |
while(MyWindow.GetEvent(Event)) | |
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape)) | |
std::cout << "lol press" << std::endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment