00001 /* $Id: key.hpp 23842 2008-02-16 08:47:16Z mordante $ */ 00002 /* 00003 Copyright (C) 2003 - 2008 by David White <dave@whitevine.net> 00004 Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License version 2 00008 or at your option any later version. 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY. 00011 00012 See the COPYING file for more details. 00013 */ 00014 00015 #ifndef KEY_HPP_INCLUDED 00016 #define KEY_HPP_INCLUDED 00017 00018 #include "SDL.h" 00019 00020 //object which keeps track of all the keys on the keyboard, and 00021 //whether any key is pressed or not can be found by using its 00022 //operator[]. Note though that it is generally better to use 00023 //key events to see when keys are pressed rather than poll using 00024 //this object. 00025 class CKey { 00026 public: 00027 CKey(); 00028 00029 int operator[](int) const; 00030 void SetEnabled(bool enable); 00031 private: 00032 Uint8 *key_list; 00033 bool is_enabled; 00034 }; 00035 00036 #endif
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |