Skip to content

Instantly share code, notes, and snippets.

@svenstaro
Created May 27, 2010 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svenstaro/415806 to your computer and use it in GitHub Desktop.
Save svenstaro/415806 to your computer and use it in GitHub Desktop.
#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