Tweaked just a wee bit

This commit is contained in:
2015-08-22 16:24:11 -07:00
parent 98b3e75503
commit 8fc8db2d78
2 changed files with 10 additions and 6 deletions

View File

@@ -29,6 +29,11 @@ void App::Input() {
while (window->pollEvent(event)) {
if (event.type == sf::Event::Closed)
window->close();
if (sf::Mouse::isButtonPressed(sf::Mouse::Left)) {
sf::Vector2i mouse_position = sf::Mouse::getPosition(*window);
explorer->setDestination(sf::Vector2i(mouse_position.x/ 5, mouse_position.y/ 5));
}
if (event.type == sf::Event::KeyPressed) {
if (event.key.code == sf::Keyboard::Q) {
explorer->setDestination(sf::Vector2i(20, 20));
@@ -99,7 +104,6 @@ void App::Render() {
}
// Draw the explorer
for (int x2 = 1; x2 < 5; x2++) {
for (int y2 = 1; y2 < 5; y2++) {