diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-10-10 19:33:33 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-10-10 19:33:33 +0200 |
commit | 753f71536339b78c49468ba6452c96d6b3c345b2 (patch) | |
tree | 0f3edbef6b2a34a738dc37cc8dd8c11a98e54c85 /src/interface.cpp | |
parent | ff4929c650e6ed446b6faff9f6b0f078d0a3644c (diff) |
Finish work on world entities, start experimenting with world generation.
Diffstat (limited to 'src/interface.cpp')
-rw-r--r-- | src/interface.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/interface.cpp b/src/interface.cpp index 16fc77d..17c1727 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -68,8 +68,16 @@ void state_t::tick(void) camera.target_zoom -= event.mouseWheelScroll.delta; if (camera.target_zoom < 0) camera.target_zoom = 0; - if (camera.target_zoom > 10) - camera.target_zoom = 10; + if (camera.target_zoom > 11) + camera.target_zoom = 11; + break; + + case sf::Event::KeyPressed: + if (event.key.code == sf::Keyboard::Key::I) { + sf::Vector2i mouse = sf::Mouse::getPosition(*window); + sf::Vector2f vmouse = window->mapPixelToCoords(mouse); + game->world.debug_point(vmouse); + } break; default:; |