kick
/Users/morten/Programmering/cpp/kick/src/kick/core/default_key_handler.cpp
00001 //
00002 // Created by morten on 04/05/14.
00003 //
00004 
00005 #include "kick/core/default_key_handler.h"
00006 #include "kick/core/engine.h"
00007 #include "kick/context/context.h"
00008 #include <iostream>
00009 #include <vector>
00010 
00011 using namespace std;
00012 
00013 kick::DefaultKeyHandler::DefaultKeyHandler()
00014 :fullScreen({KeyMapping{Key::LGUI, Key::f}, KeyMapping{Key::RGUI, Key::f}})
00015 {
00016 }
00017 
00018 void kick::DefaultKeyHandler::handleKeyPress(kick::Engine *engine) {
00019     if (kick::KeyInput::down(fullScreen)){
00020         auto context = engine->context();
00021         context->setFullscreen(!context->isFullscreen());
00022     }
00023 }
 All Classes Functions Variables