summaryrefslogtreecommitdiff
path: root/src/game/interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/interface.cpp')
-rw-r--r--src/game/interface.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/interface.cpp b/src/game/interface.cpp
index f574732..f4403ea 100644
--- a/src/game/interface.cpp
+++ b/src/game/interface.cpp
@@ -3,6 +3,8 @@
namespace interface {
+using namespace game; // FIXME
+
state_t::state_t(sf::RenderWindow *window_, game::state_t *game_)
{
window = window_;
@@ -101,6 +103,13 @@ void state_t::tick(double dt)
case sf::Event::KeyPressed:
switch (event.key.code) {
+ case sf::Keyboard::Key::Space:
+ game->paused ^= 1;
+ if (game->paused)
+ print(text::get(text::PAUSED));
+ else
+ print(text::get(text::UNPAUSED));
+ break;
case sf::Keyboard::Key::F1:
debug_draw_cmodels ^= 1;
print("debug_draw_cmodels = " + std::to_string(debug_draw_cmodels));